Skip to content

Commit

Permalink
update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshohara committed Sep 25, 2017
1 parent f3ab846 commit 1279892
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@ cd ./ffmpeg-3.3.3-64bit-static/; sudo cp ffmpeg ffprobe /usr/local/bin;
* Download the [pretrained model](https://github.com/kenshohara/3D-ResNets-PyTorch/releases).

## Usage
Assume input video files are located in ```./videos```.

To calculate class scores for each 16 frames, use ```--mode score```.
```
python main.py --input ./input --output ./output.json --model ./resnet-34-kinetics.pth
python main.py --input ./input --video_root ./videos --output ./output.json --model ./resnet-34-kinetics.pth --mode score
```

To visualize the classification results, use ```generate_result_video/generate_result_video.py```.

To calculate video features for each 16 frames, use ```--mode feature```.
```
python main.py --input ./input --video_root ./videos --output ./output.json --model ./resnet-34-kinetics.pth --mode feature
```


## Citation
If you use this code, please cite the following:
```
Expand Down
4 changes: 2 additions & 2 deletions input
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
videos/video1.mp4
videos/video2.mp4
video1.mp4
video2.mp4

0 comments on commit 1279892

Please sign in to comment.