Skip to content

Commit

Permalink
arXiv
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyizhou committed Mar 25, 2022
1 parent 90890d7 commit 5b7e988
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
third_party/detectron2
backup
GTR_models
GTR_models_TAO
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<p align="center"> <img src='docs/GTR_teaser.jpg' align="center" height="300px"> </p>

> [**Global Tracking Transformers**](http://arxiv.org/abs/xxxx.xxxxx),
> [**Global Tracking Transformers**](http://arxiv.org/abs/2203.13250),
> Xingyi Zhou, Tianwei Yin, Vladlen Koltun, Philipp Kr&auml;henb&uuml;hl,
> *CVPR 2022 ([arXiv xxxx.xxxxx](http://arxiv.org/abs/xxxx.xxxxx))*
> *CVPR 2022 ([arXiv 2203.13250](http://arxiv.org/abs/2203.13250))*

## Features
Expand All @@ -24,7 +24,7 @@ See [installation instructions](docs/INSTALL.md).
We use the default detectron2 [demo interface](https://github.com/facebookresearch/detectron2/blob/main/GETTING_STARTED.md). For example, to run [TAO model](configs/GTR_TAO_DR2101.yaml) on an example video (video source: TAO/YFCC100M dataset), download the [model](https://drive.google.com/file/d/1TqkLpFZvOMY5HTTaAWz25RxtLHdzQ-CD/view?usp=sharing) and run

~~~
python demo.py --config-file configs/GTR_TAO_DR2101.yaml --video-input docs/yfcc_v_acef1cb6d38c2beab6e69e266e234f.mp4 --output output/demo_yfcc.mp4 --opts MODEL.WEIGHTS GTR_models/GTR_TAO_DR2101.pth
python demo.py --config-file configs/GTR_TAO_DR2101.yaml --video-input docs/yfcc_v_acef1cb6d38c2beab6e69e266e234f.mp4 --output output/demo_yfcc.mp4 --opts MODEL.WEIGHTS models/GTR_TAO_DR2101.pth
~~~

If setup correctly, the output on `output/demo_yfcc.mp4` should look like:
Expand Down
6 changes: 5 additions & 1 deletion demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def test_opencv_video_format(codec, file_ext):
output_fname = os.path.join(args.output, basename)
output_fname = os.path.splitext(output_fname)[0] + file_ext
else:
folder_name = os.path.dirname(args.output)
if not os.path.exists(folder_name):
os.makedirs(folder_name)
output_fname = args.output
# assert not os.path.isfile(output_fname), output_fname
output_file = cv2.VideoWriter(
Expand All @@ -167,4 +170,5 @@ def test_opencv_video_format(codec, file_ext):
if args.output:
output_file.release()
else:
cv2.destroyAllWindows()
cv2.destroyAllWindows()
print('Done')

0 comments on commit 5b7e988

Please sign in to comment.