Team name: iamai
Use git clone --recurse-submodules https://github.com/cw1204772/AIC2018_iamai.git
to clone the repository.
If you have already git clone the repository but have not clone the submodule, execute:
git submodule init
git submodule update
We use iou-tracker for tracking. To use it:
python3 Tracking/iou-tracker/demo.py -d <detection_csv> -o <output_csv> -sl 0.1 -sh 0.7 -si 0.5 -tm 2
python3 SCT.py <tracking_csv> <video> <output_pkl> --reid_model <reid_model> --n_layers <n_layers>
--window 15 --f_th 150 --b_th 200 --int 10
cd ReID/ReID_CNN
-
Create train, query, gallery info .txt files
bash setup.sh <dir_to_VeRi> <dir_to_comp_dataset> <dir_to_sv_dataset>
-
Training
-
Train classification model with VeRi or VeRi_ict dataset
python3 train.py --info VeRi_train_info.txt --lr 0.001 --batch_size 64 --n_epochs 20 --n_layer 18 --dataset VeRi
-
Train triplet model with VeRi dataset
python3 train.py --info VeRi_train_info.txt --n_epochs 1500 --save_model_dir ./ckpt_2 --n_layer 18 --margin soft --class_in_batch 32 --triplet --lr 0.001 --batch_hard --save_every_n_epoch 50
-
-
dump distance matrix
python3 compute_VeRi_dis.py --load_ckpt <model_path> --n_layer <Resnet_layer> --gallery_txt VeRi_gallery_info.txt --query_txt VeRi_query_info.txt --dis_mat dist_CNN.mat
- compute cmc curve
1. open matlab in the "VeRi_cmc/" directory
2. open "baseline_evaluation_FACT_776.m" file
3. change "dis_CNN" mat path, "gt_index", "jk_index" txt file path
4. run and get plot
Use it to draw csv file onto video.
python3 Utils/visualize.py [-h] [--w W] [--h H] [--fps FPS] [--length LENGTH]
[--delimiter DELIMITER] [--offset OFFSET]
[--frame_pos FRAME_POS] [--bbox_pos BBOX_POS]
[--id_pos ID_POS] [--score_pos SCORE_POS]
[--score_th SCORE_TH] [--cam CAM] [--cam_pos CAM_POS]
[--ss SS] [--wh_mode]
INPUT_VIDEO OUTPUT_VIDEO LABEL_FILE MODE