I fix the Faster-RCNN and Mask-RCNN config with softteacher template on my own dataset, it works!
But something crashed when I try to use softteacher with yolact. And it works well when I use raw yolact config from mmdet to train my dataset as below:
So it is not because of dataset corruption. And this issue is easy to reproduce, hope to get your help.
It will be nice if you have a plan to support instance segmentation officially.
Here is the error message:
Traceback (most recent call last):
File "tools/train.py", line 198, in <module>
main()
File "tools/train.py", line 193, in main
meta=meta,
File "SoftTeacher/ssod/apis/train.py", line 206, in train_detector
runner.run(data_loaders, cfg.workflow)
File "anaconda3/envs/yolov5/lib/python3.7/site-packages/mmcv/runner/iter_based_runner.py", line 133, in run
iter_runner(iter_loaders[i], **kwargs)
File "anaconda3/envs/yolov5/lib/python3.7/site-packages/mmcv/runner/iter_based_runner.py", line 60, in train
outputs = self.model.train_step(data_batch, self.optimizer, **kwargs)
File "anaconda3/envs/yolov5/lib/python3.7/site-packages/mmcv/parallel/distributed.py", line 52, in train_step
output = self.module.train_step(*inputs[0], **kwargs[0])
File "SoftTeacher/thirdparty/mmdetection/mmdet/models/detectors/base.py", line 238, in train_step
losses = self(**data)
File "anaconda3/envs/yolov5/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "anaconda3/envs/yolov5/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 128, in new_func
output = old_func(*new_args, **new_kwargs)
File "SoftTeacher/thirdparty/mmdetection/mmdet/models/detectors/base.py", line 172, in forward
return self.forward_train(img, img_metas, **kwargs)
File "SoftTeacher/ssod/models/soft_teacher.py", line 44, in forward_train
sup_loss = self.student.forward_train(**data_groups["sup"])
File "SoftTeacher/thirdparty/mmdetection/mmdet/models/detectors/yolact.py", line 77, in forward_train
*bbox_head_loss_inputs, gt_bboxes_ignore=gt_bboxes_ignore)
File "anaconda3/envs/yolov5/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 214, in new_func
output = old_func(*new_args, **new_kwargs)
File "SoftTeacher/thirdparty/mmdetection/mmdet/models/dense_heads/yolact_head.py", line 189, in loss
return_sampling_results=True)
File "SoftTeacher/thirdparty/mmdetection/mmdet/models/dense_heads/anchor_head.py", line 386, in get_targets
labels_list = images_to_levels(all_labels, num_level_anchors)
File "SoftTeacher/thirdparty/mmdetection/mmdet/core/anchor/utils.py", line 10, in images_to_levels
target = torch.stack(target, 0)
RuntimeError: stack expects each tensor to be equal size, but got [62124] at entry 0 and [45714] at entry 1
and here is my compile config of yolact based softteacher:
Thank you for doing such a great job!
I fix the Faster-RCNN and Mask-RCNN config with softteacher template on my own dataset, it works!
But something crashed when I try to use softteacher with yolact. And it works well when I use raw yolact config from mmdet to train my dataset as below:
So it is not because of dataset corruption. And this issue is easy to reproduce, hope to get your help.
It will be nice if you have a plan to support instance segmentation officially.
Here is the error message:
and here is my compile config of yolact based softteacher: