open-mmlab / mmtracking

OpenMMLab Video Perception Toolbox. It supports Video Object Detection (VID), Multiple Object Tracking (MOT), Single Object Tracking (SOT), Video Instance Segmentation (VIS) with a unified framework.
https://mmtracking.readthedocs.io/en/latest/
Apache License 2.0
3.58k stars 597 forks source link

assert len(cls_scores) == len(score_factors) #627

Open Ares-debugger opened 2 years ago

Ares-debugger commented 2 years ago

we use fgfa as VID method and retina-net as detector and change the "num_classes" in config file of retina_net to 3 which is adapted to our dataset. It can be trained normally, but when testing, it reports:

return self.simple_test( File "/home/wzq/mmtracking/mmtrack/models/vid/fgfa.py", line 348, in simple_test bbox_list = self.detector.bbox_head.get_bboxes( File "/raid/wzq/env/anaconda3/envs/open-MMTracking/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 205, in new_func return old_func(*args, **kwargs) File "/raid/wzq/env/anaconda3/envs/open-MMTracking/lib/python3.8/site-packages/mmdet/models/dense_heads/base_dense_head.py", line 81, in get_bboxes assert len(cls_scores) == len(score_factors) AssertionError

Another one-stage method, yolox_x_8x8 model doesn't report this problem, is there any special change for config of retinanet? Thank you for answering.

dyhBUPT commented 2 years ago

Hi, it seems that you wrongly set the score_factors when calling get_bboxes. For RetinaNet, we should set score_factors as None.

Ares-debugger commented 2 years ago

Thank you,but it reported that "get_bboxes() got multiple values for argument 'score_factors'.