Closed ToumaKazusa3 closed 3 years ago
Hi @ToumaKazusa3 I would like to ask in what scenario will no proposal appear?Can you describe in detail?
@hhaAndroid In MOT tracker, we will feed the public detections as proposels into roi head. like
if hasattr(self.detector, 'roi_head'):
# TODO: check whether this is the case
if public_bboxes is not None:
public_bboxes = [_[0] for _ in public_bboxes]
proposals = public_bboxes
else:
proposals = self.detector.rpn_head.simple_test_rpn(
x, img_metas)
det_bboxes, det_labels = self.detector.roi_head.simple_test_bboxes(
x,
img_metas,
proposals,
self.detector.roi_head.test_cfg,
rescale=rescale)
# TODO: support batch inference
det_bboxes = det_bboxes[0]
det_labels = det_labels[0]
num_classes = self.detector.roi_head.bbox_head.num_classes
If there is no pedestrian in the current frame or the public detector does not detect pedestrians, then there will be no proposal
@hhaAndroid In MOT tracker, we will feed the public detections as proposels into roi head. like
if hasattr(self.detector, 'roi_head'): # TODO: check whether this is the case if public_bboxes is not None: public_bboxes = [_[0] for _ in public_bboxes] proposals = public_bboxes else: proposals = self.detector.rpn_head.simple_test_rpn( x, img_metas) det_bboxes, det_labels = self.detector.roi_head.simple_test_bboxes( x, img_metas, proposals, self.detector.roi_head.test_cfg, rescale=rescale) # TODO: support batch inference det_bboxes = det_bboxes[0] det_labels = det_labels[0] num_classes = self.detector.roi_head.bbox_head.num_classes
If there is no pedestrian in the current frame or the public detector does not detect pedestrians, then there will be no proposal
Ok, Thank you. I will check it.
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug When I run the simple_test_bboxes function in the D:\anaconda3\envs\open-mmlab\Lib\site-packages\mmdet\models\roi_heads\test_mixins.py file, If there is no proposal in this image (like [tensor([], device='cuda :0', size=(0, 4))]), the function will have the following error: RuntimeError: cannot reshape tensor of 0 elements into shape [1, 0, -1] because the unspecified dimension size -1 can be any value and is ambiguous
Reproduction
Environment sys.platform: linux Python: 3.7.6 (default, Jan 8 2020, 19:59:22) [GCC 7.3.0] CUDA available: True GPU 0,1,2,3,4,5,6,7: GeForce GTX 1080 CUDA_HOME: /mnt/lustre/share/polaris/dep/cuda-9.0-cudnn7.6.5 NVCC: Cuda compilation tools, release 9.0, V9.0.176 GCC: gcc (GCC) 5.4.0 PyTorch: 1.5.0 PyTorch compiling details: PyTorch built with:
TorchVision: 0.6.0 OpenCV: 4.2.0 MMCV: 1.3.1 MMCV Compiler: GCC 5.4 MMCV CUDA Compiler: 9.0 MMDetection: 2.11.0+2313bd7 Error traceback If applicable, paste the error trackback here.
Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!