Championchess / A-Tri-Layer-Plugin-to-Improve-Occluded-Detection

Apache License 2.0
93 stars 8 forks source link

got error after train one epoch #8

Closed DaoCaoRenH closed 1 year ago

DaoCaoRenH commented 1 year ago

I replaced the backbone with resnet50 and train , but got error after train one epoch 2023-03-24 20:54:51,903 - mmdet - INFO - Epoch [1][29300/29317] lr: 5.000e-07, eta: 2 days, 4:42:32, time: 0.574, data_time: 0.122, memory: 11765, loss_rpn_cls: 0.0367, loss_rpn_bbox: 0.0470, s0.loss_cls: 0.5404, s0.acc: 90.9531, s0.loss_bbox: 0.2327, s0.loss_front_mask: 0.2144, s0.loss_back_mask: 0.2236, s0.loss_mask: 0.4398, loss: 1.7345 2023-03-24 20:55:01,876 - mmdet - INFO - Saving checkpoint at 1 epochs [ ] 0/5000, elapsed: 0s, ETA:/root/Tri-Layer_Plugin_Occluded_Detection/mmdet/models/roi_heads/bbox_heads/bbox_head.py:362: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at /opt/conda/conda-bld/pytorch_1634272068694/work/torch/csrc/utils/tensor_new.cpp:201.) scale_factor = bboxes.new_tensor(scale_factor).unsqueeze(1).repeat( [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 5000/5000, 8.0 task/s, elapsed: 629s, ETA: 0sTraceback (most recent call last): File "tools/train.py", line 190, in main() File "tools/train.py", line 179, in main train_detector( File "/root/Tri-Layer_Plugin_Occluded_Detection/mmdet/apis/train.py", line 188, in train_detector runner.run(data_loaders, cfg.workflow) File "/root/miniconda3/envs/occ/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run epoch_runner(data_loaders[i], **kwargs) File "/root/miniconda3/envs/occ/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train self.call_hook('after_train_epoch') File "/root/miniconda3/envs/occ/lib/python3.8/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook getattr(hook, fn_name)(self) File "/root/Tri-Layer_Plugin_Occluded_Detection/mmdet/core/evaluation/eval_hooks.py", line 150, in after_train_epoch key_score = self.evaluate(runner, results) File "/root/Tri-Layer_Plugin_Occluded_Detection/mmdet/core/evaluation/eval_hooks.py", line 179, in evaluate eval_res = self.dataloader.dataset.evaluate( File "/root/Tri-Layer_Plugin_Occluded_Detection/mmdet/datasets/coco_occluder_tri.py", line 436, in evaluate result_files, tmp_dir = self.format_results(results, jsonfile_prefix) File "/root/Tri-Layer_Plugin_Occluded_Detection/mmdet/datasets/coco_occluder_tri.py", line 381, in format_results result_files = self.results2json(results, jsonfile_prefix) File "/root/Tri-Layer_Plugin_Occluded_Detection/mmdet/datasets/coco_occluder_tri.py", line 318, in results2json json_results = self._segm2json(results) File "/root/Tri-Layer_Plugin_Occluded_Detection/mmdet/datasets/coco_occluder_tri.py", line 260, in _segm2json det, seg = results[idx] ValueError: too many values to unpack (expected 2)

Championchess commented 1 year ago

Sorry that I have not got this error before, but I suggest you to use ipdb.set_trace() to figure out the cause of the bug.