/Vehicle-Retrival

[Project] Tracked-Vehicle Retrieval by Natural Language Descriptions

Primary LanguagePython

Tracked-Vehicle Retrieval by Natural Language Descriptions

Source:

Download source and you will get a directory tree like this.

├── vehicle-retrival 
│   ├── xclip
│   │   ├── data
│   ├── data
│   ├── model
│   │   ├── vrm
│   ├── testvideobox
│   ├── preprocessing
│   │   ├── create_video_clip.py
│   │   ├── create_vrm_data.py
│   │   ├── extract_vdo_frms.py
│   │   ├── generate_median.py
│   ├── requirement.txt
│   ├── Readme.md
│   ├── Colab_Instruction.ipynb

Data preparation:

Download the datasets here and move them into 'data/' folder.

git clone https://github.com/vinhhust2806/vehicle-retrival.git
gdown --id 1lYMXLjnWPDUxYDzd2TmeIv-HVK0P2QEE
import os
os.makedirs('vehicle-retrival/testvideobox')
unzip 'AIC22_Track2_NL_Retrieval.zip' -d 'vehicle-retrival/data' 

Extract frames from videos

python vehicle-retrival/preprocessing/extract_vdo_frms.py --data_root vehicle-retrival/data/train/S01
python vehicle-retrival/preprocessing/extract_vdo_frms.py --data_root vehicle-retrival/data/train/S03
python vehicle-retrival/preprocessing/extract_vdo_frms.py --data_root vehicle-retrival/data/train/S04
python vehicle-retrival/preprocessing/extract_vdo_frms.py --data_root vehicle-retrival/data/validation/S02
python vehicle-retrival/preprocessing/extract_vdo_frms.py --data_root vehicle-retrival/data/validation/S05

Generate median background

python vehicle-retrival/preprocessing/generate_median.py

Create text data

python vehicle-retrival/preprocessing/create_vrm_data.py

Create video data

python vehicle-retrival/preprocessing/create_video_clip.py

Model

Please download the pretrain model here for test, and put it in ckpts/.

cd model/vrm
sh ./scripts/train.sh # train
sh ./scripts/test.sh  # test