Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Walmsley committed Dec 27, 2023
1 parent fb29eb8 commit d7dc406
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,23 +156,37 @@ The resulting animation was saved as `./garlic_out/video.gif`.

#### Alternative: Running locally on macOS

If you're running macOS you may have more success running natively than via Docker.
Here's an example of running natively on macOS rather than via Docker.

To do so, follow these steps:
First install dependencies:

```bash
(animated_drawings) AnimatedDrawings % conda activate animated_drawings
(animated_drawings) AnimatedDrawings % cd torchserve
(animated_drawings) torchserve % torchserve --start --ts-config config.local.properties --foreground
# if you already have java installed, skip this step:
brew install java
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

# install packages
pip install -U openmim torch==1.13.0 torchserve mmdet==2.27.0 mmpose==0.29.0 mmtrack numpy==1.23.3 requests==2.31.0 scipy==1.10.0 tqdm==4.64.1
mim install mmcv-full==1.7.0

# download models
cd torchserve
mkdir -p ./model-store
wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P ./model-store/
wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P ./model-store/
```

Then run the same example we used above with the Docker version:
Now in a new shell activate the animated_drawings env and run

```bash
(animated_drawings) AnimatedDrawings % conda activate animated_drawings
(animated_drawings) AnimatedDrawings % cd examples
(animated_drawings) examples % python image_to_animation.py drawings/garlic.png garlic_out
Writing video to: /Users/you/AnimatedDrawings/examples/garlic_out/video.gif
torchserve --start --ts-config config.local.properties --foreground
```

Now you can `cd examples` and run the examples as described above:

```bash
cd examples
python image_to_animation.py drawings/garlic.png garlic_out
```

### Fixing bad predictions
Expand Down

0 comments on commit d7dc406

Please sign in to comment.