chensnathan / YOLOF

You Only Look One-level Feature (YOLOF), CVPR2021, Detectron2
MIT License
271 stars 28 forks source link

some error with fvcore #3

Closed xiaowanzizz closed 3 years ago

xiaowanzizz commented 3 years ago

File "/home/zzf/miniconda3/envs/torch1.7.1/lib/python3.7/site-packages/fvcore-0.1.3.post20210317-py3.7.egg/fvcore/nn/giou_loss.py", line 32, in giou_loss AssertionError: bad box: x1 larger than x2

chensnathan commented 3 years ago

Could you provide more details about the command you used and post the training log?

xiaowanzizz commented 3 years ago

Exception during training: Traceback (most recent call last): File "/home/zzf/Desktop/CenterNet2/detectron2/engine/train_loop.py", line 138, in train self.run_step() File "/home/zzf/Desktop/CenterNet2/detectron2/engine/defaults.py", line 441, in run_step self._trainer.run_step() File "/home/zzf/Desktop/CenterNet2/detectron2/engine/train_loop.py", line 232, in run_step loss_dict = self.model(data) File "/home/zzf/miniconda3/envs/torch1.7.1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/home/zzf/Desktop/detectron2-0.4/YOLOF-master/yolof/modeling/yolof.py", line 295, in forward pred_logits, pred_anchor_deltas) File "/home/zzf/Desktop/detectron2-0.4/YOLOF-master/yolof/modeling/yolof.py", line 407, in losses matched_predicted_boxes, target_boxes, reduction="sum") File "/home/zzf/miniconda3/envs/torch1.7.1/lib/python3.7/site-packages/fvcore-0.1.3.post20210317-py3.7.egg/fvcore/nn/giou_loss.py", line 32, in giou_loss assert (x2 >= x1).all(), "bad box: x1 larger than x2"

Traceback (most recent call last): File "./tools/train_net.py", line 249, in args=(args,), File "/home/zzf/Desktop/CenterNet2/detectron2/engine/launch.py", line 62, in launch main_func(args) File "./tools/train_net.py", line 236, in main return trainer.train() File "/home/zzf/Desktop/CenterNet2/detectron2/engine/defaults.py", line 431, in train super().train(self.start_iter, self.max_iter) File "/home/zzf/Desktop/CenterNet2/detectron2/engine/train_loop.py", line 138, in train self.run_step() File "/home/zzf/Desktop/CenterNet2/detectron2/engine/defaults.py", line 441, in run_step self._trainer.run_step() File "/home/zzf/Desktop/CenterNet2/detectron2/engine/defaults.py", line 441, in run_step self._trainer.run_step() File "/home/zzf/Desktop/CenterNet2/detectron2/engine/train_loop.py", line 232, in run_step loss_dict = self.model(data) File "/home/zzf/miniconda3/envs/torch1.7.1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(input, **kwargs) File "/home/zzf/Desktop/detectron2-0.4/YOLOF-master/yolof/modeling/yolof.py", line 295, in forward pred_logits, pred_anchor_deltas) File "/home/zzf/Desktop/detectron2-0.4/YOLOF-master/yolof/modeling/yolof.py", line 407, in losses matched_predicted_boxes, target_boxes, reduction="sum") File "/home/zzf/miniconda3/envs/torch1.7.1/lib/python3.7/site-packages/fvcore-0.1.3.post20210317-py3.7.egg/fvcore/nn/giou_loss.py", line 32, in giou_loss AssertionError: bad box: x1 larger than x2

python ./tools/train_net.py --num-gpus 1 --config-file ./configs/yolof_R_50_C5_1x.yaml --> command

chensnathan commented 3 years ago

The learning rate and steps are set for 8 GPUS. Have you modified the learning rate and steps in the config file according to the linear learning rate scaling rule as said in Detectron2?

xiaowanzizz commented 3 years ago

thanks. changing the learning rate can solve this problem.

yarkable commented 3 years ago

meet same problem now……, really awful

DLGreenhand commented 2 years ago

The learning rate and steps are set for 8 GPUS. Have you modified the learning rate and steps in the config file according to the linear learning rate scaling rule as said in Detectron2?

Thanks!