소개
게시글
질문&답변
2023.04.05
Segmentation
안녕하세요, 강사님.저번 train_detector(model, datasets, cfg, distributed=False, validate=False)으로 일단 코드를 고쳐서 돌려보라고 주신 답변에 학습은 잘 되었습니다. 감사드립니다!이번에는 mm_mask_rcnn_train_balloon 같은 코드를 custom 데이터셋에서 클래스를 하나에서 두개로 추가하여 돌리고 있는 중입니다. # epochs는 config의 runner 파라미터로 지정됨. 기본 12회 train_detector(model, datasets, cfg, distributed=False, validate=False)이번에는 여기서 'NoneType' object has no attribute 'get' 오류가 떠서 해결을 못하고 있는데 혹시 도움을 주실 수 있으실까요?(사진)
- 0
- 3
- 707
질문&답변
2023.03.28
Segmentation
추가적으로 mm_mask_rcnn_train_balloon 를 구글 코랩에서 학습을 시킬 때 (사진)이 부분에서 "세션이 다운되었습니다." 라는 경고창이 뜨면서 학습이 중단되어서function ClickConnect()도 콘솔창에 붙여넣어보고 코랩 pro 버전도 사보았는데 똑같은 문제가 계속 발생해서 학습이 완료되지 않습니다. 무엇이 문제인지 여쭤봐도 될까요?아래는 세션이 다운되었습니다 경고창이 뜨면서 나타난 결과창입니다..!2023-03-28 02:17:28,439 - mmdet - INFO - Automatic scaling of learning rate (LR) has been disabled. 2023-03-28 02:17:28,450 - mmdet - INFO - load checkpoint from local path: /content/mmdetection/checkpoints/mask_rcnn_r101_fpn_1x_coco_20200204-1efe0ed5.pth loading annotations into memory... Done (t=0.00s) creating index... index created! 2023-03-28 02:17:28,700 - mmdet - WARNING - The model and loaded state dict do not match exactly size mismatch for roi_head.bbox_head.fc_cls.weight: copying a param with shape torch.Size([81, 1024]) from checkpoint, the shape in current model is torch.Size([2, 1024]). size mismatch for roi_head.bbox_head.fc_cls.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([2]). size mismatch for roi_head.bbox_head.fc_reg.weight: copying a param with shape torch.Size([320, 1024]) from checkpoint, the shape in current model is torch.Size([4, 1024]). size mismatch for roi_head.bbox_head.fc_reg.bias: copying a param with shape torch.Size([320]) from checkpoint, the shape in current model is torch.Size([4]). size mismatch for roi_head.mask_head.conv_logits.weight: copying a param with shape torch.Size([80, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([1, 256, 1, 1]). size mismatch for roi_head.mask_head.conv_logits.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([1]). 2023-03-28 02:17:28,709 - mmdet - INFO - Start running, host: root@21ec773421f3, work_dir: /content/tutorial_exps 2023-03-28 02:17:28,710 - mmdet - INFO - Hooks will be executed in the following order: before_run: (VERY_HIGH ) StepLrUpdaterHook (NORMAL ) CheckpointHook (LOW ) EvalHook (VERY_LOW ) TextLoggerHook -------------------- before_train_epoch: (VERY_HIGH ) StepLrUpdaterHook (NORMAL ) NumClassCheckHook (LOW ) IterTimerHook (LOW ) EvalHook (VERY_LOW ) TextLoggerHook -------------------- before_train_iter: (VERY_HIGH ) StepLrUpdaterHook (LOW ) IterTimerHook (LOW ) EvalHook -------------------- after_train_iter: (ABOVE_NORMAL) OptimizerHook (NORMAL ) CheckpointHook (LOW ) IterTimerHook (LOW ) EvalHook (VERY_LOW ) TextLoggerHook -------------------- after_train_epoch: (NORMAL ) CheckpointHook (LOW ) EvalHook (VERY_LOW ) TextLoggerHook -------------------- before_val_epoch: (NORMAL ) NumClassCheckHook (LOW ) IterTimerHook (VERY_LOW ) TextLoggerHook -------------------- before_val_iter: (LOW ) IterTimerHook -------------------- after_val_iter: (LOW ) IterTimerHook -------------------- after_val_epoch: (VERY_LOW ) TextLoggerHook -------------------- after_run: (VERY_LOW ) TextLoggerHook -------------------- 2023-03-28 02:17:28,713 - mmdet - INFO - workflow: [('train', 1)], max: 36 epochs 2023-03-28 02:17:28,717 - mmdet - INFO - Checkpoints will be saved to /content/tutorial_exps by HardDiskBackend. 2023-03-28 02:18:51,959 - mmdet - INFO - Saving checkpoint at 12 epochs [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 5/5, 1.3 task/s, elapsed: 4s, ETA: 0s2023-03-28 02:18:58,414 - mmdet - INFO - Evaluating bbox... 2023-03-28 02:18:58,446 - mmdet - INFO - Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.112 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=1000 ] = 0.205 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=1000 ] = 0.065 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.200 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.018 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.272 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=300 ] = 0.272 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=1000 ] = 0.272 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.400 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.071 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = -1.000 2023-03-28 02:18:58,447 - mmdet - INFO - Evaluating segm... /usr/local/lib/python3.9/dist-packages/mmdet-2.28.2-py3.9.egg/mmdet/datasets/coco.py:470: UserWarning: The key "bbox" is deleted for more accurate mask AP of small/medium/large instances since v2.12.0. This does not change the overall mAP calculation. warnings.warn( 2023-03-28 02:18:58,480 - mmdet - INFO - Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.077 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=1000 ] = 0.209 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=1000 ] = 0.008 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.136 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.015 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.250 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=300 ] = 0.250 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=1000 ] = 0.250 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.382 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.043 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = -1.000 2023-03-28 02:18:58,481 - mmdet - INFO - Epoch(val) [12][5] bbox_mAP: 0.1117, bbox_mAP_50: 0.2054, bbox_mAP_75: 0.0645, bbox_mAP_s: 0.2002, bbox_mAP_m: 0.0178, bbox_mAP_l: -1.0000, bbox_mAP_copypaste: 0.1117 0.2054 0.0645 0.2002 0.0178 -1.0000, segm_mAP: 0.0770, segm_mAP_50: 0.2095, segm_mAP_75: 0.0079, segm_mAP_s: 0.1363, segm_mAP_m: 0.0149, segm_mAP_l: -1.0000, segm_mAP_copypaste: 0.0770 0.2095 0.0079 0.1363 0.0149 -1.0000 Loading and preparing results... DONE (t=0.00s) creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.01s). Loading and preparing results... DONE (t=0.00s) creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.01s).
- 0
- 3
- 707