-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_train.sh
More file actions
68 lines (53 loc) · 2.32 KB
/
run_train.sh
File metadata and controls
68 lines (53 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
############################## Train TransMtmc model with ground true label from CityflowV2 #########################
MCMT_CONFIG_FILE="aic_all_train.yml"
TransMtmc_CONFIG_FILE="configs/aic21/vit_transMtmc_stride.yml"
#### Run Detector.####
cd detector/
## save frames of all videos in [test, train, validation] into
## {datasets/detection/images/test/S06/c041/img1/img001111.jpg}
python gen_images_aic.py ${MCMT_CONFIG_FILE}
### Save ground true bbox (from gt file -> extract gt bbox -> save)
python gen_bbox_gt.py ${MCMT_CONFIG_FILE}
### Train TransMtmc
cd ../reid/TransReID
python train.py --config_file ${TransMtmc_CONFIG_FILE}
#CUDA_LAUNCH_BLOCKING=1 python train.py --config_file ${TransMtmc_CONFIG_FILE} MODEL.DEVICE_ID "('0')"
cd yolov5/
## detect bbox from saved frame. Save as pkl file in AIC21-MTMC/datasets/detect_merge/cam/{cam}_dets.pkl
# Train dir
#sh gen_det_train0.sh ${MCMT_CONFIG_FILE}
#sh gen_det_train1.sh ${MCMT_CONFIG_FILE}
#sh gen_det_train2.sh ${MCMT_CONFIG_FILE}
#sh gen_det_train3.sh ${MCMT_CONFIG_FILE}
# Val dir
#sh gen_det_train0.sh ${MCMT_CONFIG_FILE}
#sh gen_det_train1.sh ${MCMT_CONFIG_FILE}
#sh gen_det_train2.sh ${MCMT_CONFIG_FILE}
#### Extract reid feature.####
## Load the model, load the saved para, process bbox and
## save feat as pkl file in AIC21-MTMC/datasets/detect_merge/cam/{cam}_dets_feat.pkl
# todo: Add transformer module
#cd ../../reid/
#python extract_image_feat.py "aic_reid1.yml"
#python extract_image_feat.py "aic_reid2.yml"
#python extract_image_feat.py "aic_reid3.yml"
#python merge_reid_feat.py ${MCMT_CONFIG_FILE}
### MOT. ####
#cd ../tracker/MOTBaseline
# Extract MOT tracklets for each camera.
# Output is saved in {AIC21-MTMC/datasets/detect_merge/cam/{cam}_mot.txt} And {..._mot_feat.pkl}
#sh run_aic.sh ${MCMT_CONFIG_FILE}
#wait
### Get results. ####
# todo Add transformer for tracklets
cd ../../reid/reid-matching/tools
## Filter MOT, filter bbox
## Output: {AIC21-MTMC/reid/reid-matching/tools/exp/viz/test/S06/trajectory/c041.pkl}
## Output: {AIC21-MTMC/datasets/detect_merge/cam/cam_mot_feat_break.pkl}
#python trajectory_fusion.py ${MCMT_CONFIG_FILE}
## Output: {reid/reid-matching/tools/test_cluster.pkl}
#python sub_cluster.py ${MCMT_CONFIG_FILE}
#python gen_res.py ${MCMT_CONFIG_FILE}
#### Vis. (optional) ####
#python viz_mot.py ${MCMT_CONFIG_FILE}
#python viz_mcmt.py ${MCMT_CONFIG_FILE}