diff --git a/tools/mix_data_ablation.py b/tools/mix_data_ablation.py index b830c691..2c6d53c2 100644 --- a/tools/mix_data_ablation.py +++ b/tools/mix_data_ablation.py @@ -90,4 +90,5 @@ mix_json['annotations'] = ann_list mix_json['videos'] = video_list mix_json['categories'] = category_list -json.dump(mix_json, open('datasets/mix_mot_ch/annotations/train.json','w')) \ No newline at end of file +os.makedirs('datasets/mix_mot_ch/annotations', exist_ok=True) +json.dump(mix_json, open('datasets/mix_mot_ch/annotations/train.json','w')) diff --git a/tools/mix_data_test_mot17.py b/tools/mix_data_test_mot17.py index 5d81855b..0583b0e2 100644 --- a/tools/mix_data_test_mot17.py +++ b/tools/mix_data_test_mot17.py @@ -148,4 +148,5 @@ mix_json['annotations'] = ann_list mix_json['videos'] = video_list mix_json['categories'] = category_list +os.makedirs('datasets/mix_det/annotations', exist_ok=True) json.dump(mix_json, open('datasets/mix_det/annotations/train.json','w')) diff --git a/tools/mix_data_test_mot20.py b/tools/mix_data_test_mot20.py index e7bbafc2..68c7e336 100644 --- a/tools/mix_data_test_mot20.py +++ b/tools/mix_data_test_mot20.py @@ -88,4 +88,5 @@ mix_json['annotations'] = ann_list mix_json['videos'] = video_list mix_json['categories'] = category_list -json.dump(mix_json, open('datasets/mix_mot20_ch/annotations/train.json','w')) \ No newline at end of file +os.makedirs('datasets/mix_mot20_ch/annotations', exist_ok=True) +json.dump(mix_json, open('datasets/mix_mot20_ch/annotations/train.json','w'))