You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-4Lines changed: 25 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
15
15
The following describes how to use the model in your own project and how to use our conversion and extraction tools.
16
16
17
-
### In Your Own Project
17
+
### PyTorch Models
18
18
19
19
We provide convenient [PyTorch Hub](https://pytorch.org/docs/stable/hub.html) integration
20
20
@@ -27,15 +27,36 @@ We provide convenient [PyTorch Hub](https://pytorch.org/docs/stable/hub.html) in
27
27
>>> model = torch.hub.load("moabitcoin/ig65m-pytorch", "r2plus1d_34_32_ig65m", num_classes=359, pretrained=True)
28
28
```
29
29
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:
31
35
-`convert` - to convert Caffe2 blobs to PyTorch model and weights
32
36
-`extract` - to compute clip features for a video with a pre-trained model
33
37
-`semcode` - to visualize clip features for a video over time
34
38
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:
36
46
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
+
```
37
58
38
-
### Development and Tools
59
+
### Development
39
60
40
61
We provide CPU and [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) based GPU Dockerfiles for self-contained and reproducible environments.
41
62
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