Skip to content

Commit 14e0a01

Browse files
committed
Updates readme with pre-build docker images instructions
1 parent 186e76a commit 14e0a01

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
The following describes how to use the model in your own project and how to use our conversion and extraction tools.
1616

17-
### In Your Own Project
17+
### PyTorch Models
1818

1919
We provide convenient [PyTorch Hub](https://pytorch.org/docs/stable/hub.html) integration
2020

@@ -27,15 +27,36 @@ We provide convenient [PyTorch Hub](https://pytorch.org/docs/stable/hub.html) in
2727
>>> model = torch.hub.load("moabitcoin/ig65m-pytorch", "r2plus1d_34_32_ig65m", num_classes=359, pretrained=True)
2828
```
2929

30-
We also provide the following tools; see below for how to run them
30+
### Tools
31+
32+
We build and publish Docker images ([see all tags](https://hub.docker.com/r/moabitcoin/ig65m-pytorch/tags)) via Travis CI/CD for master and for all releases.
33+
34+
In these images we provide the following tools:
3135
- `convert` - to convert Caffe2 blobs to PyTorch model and weights
3236
- `extract` - to compute clip features for a video with a pre-trained model
3337
- `semcode` - to visualize clip features for a video over time
3438

35-
Note: we require torchvision v0.4 or later for the model architecture building blocks
39+
Run these pre-built images via
40+
41+
```
42+
docker run moabitcoin/ig65m-pytorch:latest-cpu --help
43+
```
44+
45+
Example for running on CPUs:
3646

47+
```
48+
docker run --ipc=host -v $PWD:/data moabitcoin/ig65m-pytorch:latest-gpu \
49+
extract /data/myvideo.mp4 /data/myfeatures.npy
50+
```
51+
52+
Example for running on GPUs via [nvidia-docker](https://github.com/NVIDIA/nvidia-docker):
53+
54+
```
55+
docker run --runtime=nvidia --ipc=host -v $PWD:/data moabitcoin/ig65m-pytorch:latest-gpu \
56+
extract /data/myvideo.mp4 /data/myfeatures.npy
57+
```
3758

38-
### Development and Tools
59+
### Development
3960

4061
We provide CPU and [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) based GPU Dockerfiles for self-contained and reproducible environments.
4162
Use the convenience Makefile to build the Docker image and then get into the container mounting a host directory to `/data` inside the container:

0 commit comments

Comments
 (0)