Closed Samjith888 closed 4 years ago
@Samjith888 > Did you add add_vovnet_config
when you create your cfg
(like here)?
@Samjith888 > Did you add
add_vovnet_config
when you create yourcfg
(like here)?
Yes, i have added it , even after that I'm getting the error and training end like following
[02/10 10:33:17 d2.checkpoint.c2_model_loading]: The checkpoint contains parameters not used by the model:
fc1000_b
fc1000_w
conv1_b
[02/10 10:33:17 d2.engine.train_loop]: Starting training from iteration 0
[02/10 10:33:17 d2.engine.hooks]: Total training time: 0:00:00 (0:00:00 on hooks)
Config file is :
config_file = '/home/detectron2/vovnet-detectron2/configs/faster_rcnn_V_99_FPN_3x.yaml' cfg = get_cfg() add_vovnet_config(cfg) cfg.merge_from_file(config_file) cfg.MODEL.WEIGHTS = os.path.join('output', 'model_final.pth') cfg.MODEL.ROI_HEADS.NUM_CLASSES = 1
@Samjith888
Could you let us know the details of your environments (e.g., the version of pytorch/torchvision, dataset you used, your exact command line)?
@Samjith888
Could you let us know the details of your environments (e.g., the version of pytorch/torchvision, dataset you used, your exact command line)?
I got error while training
ERROR [02/10 18:50:35 d2.engine.train_loop]: Exception during training: Traceback (most recent call last): File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/detectron2/engine/train_loop.py", line 132, in train self.run_step() File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/detectron2/engine/train_loop.py", line 214, in run_step loss_dict = self.model(data) File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in __call__ result = self.forward(*input, **kwargs) File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/detectron2/modeling/meta_arch/rcnn.py", line 123, in forward proposals, proposal_losses = self.proposal_generator(images, features, gt_instances) File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/torch/nn/modules/module.py", line 532, in __call__ result = self.forward(*input, **kwargs) File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/detectron2/modeling/proposal_generator/rpn.py", line 175, in forward outputs.predict_proposals(), File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/detectron2/modeling/proposal_generator/rpn_outputs.py", line 421, in predict_proposals proposals_i = self.box2box_transform.apply_deltas( File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/detectron2/modeling/box_regression.py", line 79, in apply_deltas assert torch.isfinite(deltas).all().item(), "Box regression deltas become infinite or NaN!" AssertionError: Box regression deltas become infinite or NaN!
@Samjith888
I can't help you if you don't answer my question.
Please let me know the details of your environments (e.g., the version of pytorch/torchvision, dataset you used, your exact command line)
Environment
Dataset :
I'm using custom dataset , here my dataset is in kitti format (Xmin,Ymin, Xmax, Ymax) i converted it into COCO format while registering the dataset.
[{'file_name': '/home/samjith/0000180.jpg', 'height': 788, 'width': 1400, 'image_id': 1, 'annotations': [{'bbox': [250.0, 675.0, 23.0, 17.0], 'bbox_mode': <BoxMode.XYWH_ABS: 1>, 'area': 391.0, 'segmentation': [], 'category_id': 0}, {'bbox': [295.0, 550.0, 21.0, 20.0], 'bbox_mode': <BoxMode.XYWH_ABS: 1>, 'area': 420.0, 'segmentation': [], 'category_id': 0},..
@Samjith888 did u solve the problem?
@Samjith888 did u solve the problem? You have to add while creating cfg() Add_vovnet_config
@Samjith888 Oh did you resused those pretrained model, i try to train custom dataset just the same with u but https://github.com/youngwanLEE/vovnet-detectron2/issues/9 occur
@Samjith888 Oh did you resused those pretrained model, i try to train custom dataset just the same with u but #9 occur
UPDATED: Fixed in #9 thanks to @youngwanLEE
Thank you ..
How much mAP you got ?
I got the error following error
WARNING [02/08 15:44:32 d2.config.compat]: Config '/home/detectron2/vovnet-detectron2/configs/faster_rcnn_V_99_FPN_3x.yaml' has no VERSION. Assuming it to be compatible with latest v2. Traceback (most recent call last): File "vovnet-detectron2/custom_vovnet_train.py", line 75, in <module> cfg = prepareConfig() File "vovnet-detectron2/custom_vovnet_train.py", line 69, in prepareConfig cfg.merge_from_file(config_file) File "/mnt/Data_common/PPE_Violation_Detection_Samjith/MPC_model/detectron2/detectron2/config/config.py", line 45, in merge_from_file self.merge_from_other_cfg(loaded_cfg) File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/fvcore/common/config.py", line 121, in merge_from_other_cfg return super().merge_from_other_cfg(cfg_other) File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/yacs/config.py", line 217, in merge_from_other_cfg _merge_a_into_b(cfg_other, self, self, []) File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/yacs/config.py", line 460, in _merge_a_into_b _merge_a_into_b(v, b[k], root, key_list + [k]) File "/opt/anaconda3/envs/d2_train/lib/python3.8/site-packages/yacs/config.py", line 473, in _merge_a_into_b raise KeyError("Non-existent config key: {}".format(full_key)) KeyError: 'Non-existent config key: MODEL.VOVNET'