This is a trimmed version of the code. Full code with detailed documentation, and all models, will be available soon.
Install - if necessary - the required dependencies:
- Python (tested with 3.7.3, conda 4.6.14)
- PyTorch (tested with PyTorch 1.1.0, CUDA 9.2, scipy 1.2.1)
- Other python dependencies: numpy, scipy, matplotlib, opencv-python (cv2)
- CUDA is required.
We have added a test sequence from the UCF-Sports dataset in the dataloaders folder.
- Run
python test_sequence.py
.
- Download Pre-trained UCF-Model.
- Download the model given for UCF-Sports dataset. Place it in
models
folder. - Download the datasets and place them under
dataloaders
. They can be downloaded from https://github.com/wenguanwang/DHF1K. The dataset directory should look like the following:
└── dataloaders
│ ├── ucf
│ │ ├── training
│ │ └── sequence_name
│ │ ├── images
│ │ ├── fixation
│ │ └── maps
│ │ └── testing
│ │ └── sequence_name
│ │ ├── images
│ │ ├── fixation
│ │ └── maps
│ ├── hollywood
│ │ ├── training
│ │ └── sequence_name
│ │ ├── images
│ │ ├── fixation
│ │ └── maps
│ │ └── testing
│ │ └── sequence_name
│ │ ├── images
│ │ ├── fixation
│ │ └── maps
│ └── dhf1k
│ │ ├── training
│ │ └── sequence_name
│ │ ├── images
│ │ ├── fixation
│ │ └── maps
│ │ └── testing
│ │ └── sequence_name
│ │ ├── images
│ │ ├── fixation
│ │ └── maps
- For DHF1K, please put the validation set files in the testing directory (the directory is named testing to streamline code).
- Run
python inference_with_metrics.py
.