ifzhang/ByteTrack

トラッキングにおけるエラー  No ground truth

sakai5678 opened this issue · 3 comments

TrainingのTrain ablation model (MOT17 half train and CrowdHuman)を行った後、TrackingのEvaluation on MOT17 half valの以下のコードを実行した際にエラーが発生しました。
解決法がわかる方がいましたら、教えていただきたいです。

[実行コード]
python3 tools/track.py -f exps/example/mot/yolox_x_ablation.py -c pretrained/bytetrack_ablation.pth.tar -b 1 -d 1 --fp16 --fuse

[実行結果]
2024-06-04 07:46:46 | INFO | main:154 - Args: Namespace(batch_size=1, ckpt='pretrained/bytetrack_ablation.pth.tar', conf=0.01, devices=1, dist_backend='nccl', dist_url=None, exp_file='exps/example/mot/yolox_x_ablation.py', experiment_name='yolox_x_ablation', fp16=True, fuse=True, local_rank=0, machine_rank=0, match_thresh=0.9, min_box_area=100, mot20=False, name=None, nms=0.7, num_machines=1, opts=[], seed=None, speed=False, test=False, track_buffer=30, track_thresh=0.6, trt=False, tsize=None)
2024-06-04 07:46:46 | INFO | main:164 - Model Summary: Params: 99.00M, Gflops: 793.21
2024-06-04 07:46:46 | INFO | yolox.data.datasets.mot:39 - loading annotations into memory...
2024-06-04 07:46:47 | INFO | yolox.data.datasets.mot:39 - Done (t=0.23s)
2024-06-04 07:46:47 | INFO | pycocotools.coco:88 - creating index...
2024-06-04 07:46:47 | INFO | pycocotools.coco:88 - index created!
2024-06-04 07:46:51 | INFO | main:186 - loading checkpoint
2024-06-04 07:47:02 | INFO | main:191 - loaded checkpoint done.
2024-06-04 07:47:02 | INFO | main:197 - Fusing model...
/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py:561: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the gradient for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more information.
if param.grad is not None:
11%|#1 | 298/2652 [00:13<01:29, 26.39it/s]2024-06-04 07:47:16 | INFO | yolox.evaluators.mot_evaluator:39 - save results to ./YOLOX_outputs/yolox_x_ablation/track_results/MOT17-02-FRCNN.txt
31%|###1 | 823/2652 [00:34<01:11, 25.49it/s]2024-06-04 07:47:38 | INFO | yolox.evaluators.mot_evaluator:39 - save results to ./YOLOX_outputs/yolox_x_ablation/track_results/MOT17-04-FRCNN.txt
47%|####6 | 1240/2652 [00:49<00:50, 28.03it/s]2024-06-04 07:47:53 | INFO | yolox.evaluators.mot_evaluator:39 - save results to ./YOLOX_outputs/yolox_x_ablation/track_results/MOT17-05-FRCNN.txt
57%|#####6 | 1501/2652 [00:59<00:41, 28.06it/s]2024-06-04 07:48:02 | INFO | yolox.evaluators.mot_evaluator:39 - save results to ./YOLOX_outputs/yolox_x_ablation/track_results/MOT17-09-FRCNN.txt
69%|######8 | 1828/2652 [01:11<00:30, 27.12it/s]2024-06-04 07:48:14 | INFO | yolox.evaluators.mot_evaluator:39 - save results to ./YOLOX_outputs/yolox_x_ablation/track_results/MOT17-10-FRCNN.txt
86%|########5 | 2278/2652 [01:27<00:13, 28.21it/s]2024-06-04 07:48:30 | INFO | yolox.evaluators.mot_evaluator:39 - save results to ./YOLOX_outputs/yolox_x_ablation/track_results/MOT17-11-FRCNN.txt
100%|#########9| 2651/2652 [01:40<00:00, 29.50it/s]2024-06-04 07:48:43 | INFO | yolox.evaluators.mot_evaluator:39 - save results to ./YOLOX_outputs/yolox_x_ablation/track_results/MOT17-13-FRCNN.txt
100%|##########| 2652/2652 [01:41<00:00, 26.23it/s]
2024-06-04 07:48:43 | INFO | yolox.evaluators.mot_evaluator:630 - Evaluate in main process...
2024-06-04 07:48:44 | INFO | yolox.evaluators.mot_evaluator:659 - Loading and preparing results...
2024-06-04 07:48:45 | INFO | yolox.evaluators.mot_evaluator:659 - DONE (t=0.39s)
2024-06-04 07:48:45 | INFO | pycocotools.coco:363 - creating index...
2024-06-04 07:48:45 | INFO | pycocotools.coco:363 - index created!
Running per image evaluation...
Evaluate annotation type bbox
COCOeval_opt.evaluate() finished in 0.71 seconds.
Accumulating evaluation results...
COCOeval_opt.accumulate() finished in 0.15 seconds.
2024-06-04 07:48:46 | INFO | main:218 -
Average forward time: 32.23 ms, Average track time: 2.53 ms, Average inference time: 34.76 ms
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.624
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.893
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.707
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.219
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.542
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.729
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.043
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.331
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.671
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.303
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.610
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.767

gt_type _val_half
gt_files []
2024-06-04 07:48:46 | INFO | main:235 - Found 0 groundtruths and 7 test files.
2024-06-04 07:48:46 | INFO | main:236 - Available LAP solvers ['lap', 'scipy']
2024-06-04 07:48:46 | INFO | main:237 - Default LAP solver 'lap'
2024-06-04 07:48:46 | INFO | main:238 - Loading files.
2024-06-04 07:48:46 | WARNING | main:122 - No ground truth for MOT17-02-FRCNN, skipping.
2024-06-04 07:48:46 | WARNING | main:122 - No ground truth for MOT17-04-FRCNN, skipping.
2024-06-04 07:48:46 | WARNING | main:122 - No ground truth for MOT17-05-FRCNN, skipping.
2024-06-04 07:48:46 | WARNING | main:122 - No ground truth for MOT17-09-FRCNN, skipping.
2024-06-04 07:48:46 | WARNING | main:122 - No ground truth for MOT17-10-FRCNN, skipping.
2024-06-04 07:48:46 | WARNING | main:122 - No ground truth for MOT17-11-FRCNN, skipping.
2024-06-04 07:48:46 | WARNING | main:122 - No ground truth for MOT17-13-FRCNN, skipping.
2024-06-04 07:48:46 | INFO | main:246 - Running metrics
Rcll Prcn GT MT PT ML FP FN IDs FM MOTA MOTP num_objects
OVERALL NaN NaN 0 NaN NaN NaN NaN NaN NaN NaN NaN NaN 0
IDF1 IDP IDR Rcll Prcn GT MT PT ML FP FN IDs FM MOTA MOTP IDt IDa IDm num_objects
OVERALL NaN NaN NaN NaN NaN 0 0 0 0 0 0 0 0 NaN NaN 0 0 0 0
2024-06-04 07:48:46 | INFO | main:271 - Completed

In your result print, gt_files is showing as empty and the message "2024-06-04 07:48:46 | WARNING | main:122 - No ground truth for MOT17-02-FRCNN, skipping." is displayed. You might want to check if the gt.txt file is stored in the correct location.

結果の印刷では、gt_files が空として表示され、「2024-06-04 07:48:46 | 警告 | main:122 - MOT17-02-FRCNN のグラウンド トゥルースがないため、スキップします。」というメッセージが表示されます。gt.txt ファイルが正しい場所に保存されているかどうかを確認することをお勧めします。

回答ありがとうございます。
gt.txtファイルの存在を確認してみたところ、公式のMOT17のデータセットには、training setにはgtファイルが存在しましたが、test setには存在しませんでした。
そのため、別のデータセットを使用しなければならないのでしょうか?
また、MOT17のtraining setを分割してtest setに利用することは可能なのでしょうか?

結果の印刷では、gt_files が空として表示され、「2024-06-04 07:48:46 | 警告 | main:122 - MOT17-02-FRCNN のグラウンド トゥルースがないため、スキップします。」というメッセージが表示されます。gt.txt ファイルが正しい場所に保存されているかどうかを確認することをお勧めします。

回答ありがとうございます。 gt.txtファイルの存在を確認してみたところ、公式のMOT17のデータセットには、training setにはgtファイルが存在しましたが、test setには存在しませんでした。 そのため、別のデータセットを使用しなければならないのでしょうか? また、MOT17のtraining setを分割してtest setに利用することは可能なのでしょうか?

I am currently learning to use these tools, so my answers may not be entirely accurate. If there are any mistakes, please point them out.

In the MOT17 dataset, the test set does not have a gt.txt file. You need to submit the generated txt file to the MOTChallenge website to obtain the MOTA score.
The author mentioned in the paper that both datasets contain training sets and test sets, but no validation sets. For ablation studies, we use the first half of each video in the MOT17 training set for training and the last half for validation. For specific details, you can refer to the paper and read the README file.