Update README.md

This commit is contained in:
Nikita Karaev 2023-07-21 15:57:03 +01:00 committed by GitHub
parent f25f9c58e3
commit 32aedaf9b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,10 +23,10 @@ Try these tracking modes for yourself with our [Colab demo](https://colab.resear
# Installation Instructions
## Installation Instructions
Ensure you have both PyTorch and TorchVision installed on your system. Follow the instructions [here](https://pytorch.org/get-started/locally/) for the installation. We strongly recommend installing both PyTorch and TorchVision with CUDA support.
## Pretrained models via PyTorch Hub
### Pretrained models via PyTorch Hub
The easiest way to use CoTracker is to load a pretrained model from torch.hub:
```
pip install einops timm tqdm
@ -40,7 +40,7 @@ import tqdm
cotracker = torch.hub.load("facebookresearch/co-tracker", "cotracker_w8")
```
Another option is to install it from this gihub repo. That's the best way if you need to run our demo or evaluate / train CoTracker:
## Steps to Install CoTracker and its dependencies:
### Steps to Install CoTracker and its dependencies:
```
git clone https://github.com/facebookresearch/co-tracker
cd co-tracker
@ -49,7 +49,7 @@ pip install opencv-python einops timm matplotlib moviepy flow_vis
```
## Download Model Weights:
### Download Model Weights:
```
mkdir checkpoints
cd checkpoints
@ -60,13 +60,13 @@ cd ..
```
# Running the Demo:
## Running the Demo:
Try our [Colab demo](https://colab.research.google.com/github/facebookresearch/co-tracker/blob/master/notebooks/demo.ipynb) or run a local demo with 10*10 points sampled on a grid on the first frame of a video:
```
python demo.py --grid_size 10
```
# Evaluation
## Evaluation
To reproduce the results presented in the paper, download the following datasets:
- [TAP-Vid](https://github.com/deepmind/tapnet)
- [BADJA](https://github.com/benjiebob/BADJA)
@ -82,7 +82,7 @@ python ./cotracker/evaluation/evaluate.py --config-name eval_badja exp_dir=./eva
```
By default, evaluation will be slow since it is done for one target point at a time, which ensures robustness and fairness, as described in the paper.
# Training
## Training
To train the CoTracker as described in our paper, you first need to generate annotations for [Google Kubric](https://github.com/google-research/kubric) MOVI-f dataset. Instructions for annotation generation can be found [here](https://github.com/deepmind/tapnet).
Once you have the annotated dataset, you need to make sure you followed the steps for evaluation setup and install the training dependencies:
@ -99,13 +99,13 @@ python train.py --batch_size 1 --num_workers 28 \
--save_every_n_epoch 10 --evaluate_every_n_epoch 10 --model_stride 4
```
# License
## License
The majority of CoTracker is licensed under CC-BY-NC, however portions of the project are available under separate license terms: Particle Video Revisited is licensed under the MIT license, TAP-Vid is licensed under the Apache 2.0 license.
# Acknowledgments
## Acknowledgments
We would like to thank [PIPs](https://github.com/aharley/pips) and [TAP-Vid](https://github.com/deepmind/tapnet) for publicly releasing their code and data. We also want to thank [Luke Melas-Kyriazi](https://lukemelas.github.io/) for proofreading the paper, [Jianyuan Wang](https://jytime.github.io/), [Roman Shapovalov](https://shapovalov.ro/) and [Adam W. Harley](https://adamharley.com/) for the insightful discussions.
# Citing CoTracker
## Citing CoTracker
If you find our repository useful, please consider giving it a star ⭐ and citing our paper in your work:
```
@article{karaev2023cotracker,
@ -114,4 +114,4 @@ If you find our repository useful, please consider giving it a star ⭐ and citi
journal={arXiv:2307.07635},
year={2023}
}
```
```