• 카테고리

    질문 & 답변
  • 세부 분야

    컴퓨터 비전

  • 해결 여부

    해결됨

강사님 mmdetection 질문있습니다.

21.09.07 10:03 작성 조회수 159

0

안녕하세요 .. ? 

mm_faster_rcnn_train_coco_bccd에서

model = build_detector(cfg.model, train_cfg = cfg.get('train_cfg'), test_cfg = cfg.get('test_cfg'))에서

 

질문1

test_cfg = cfg.get(test_cfg) --> 이 부분이 옵션이 의미하는 것이 무엇인지 궁금합니다.

 

질문2

train_detector에서 validate=True라는 옵션은 훈련시  cfg 파일에 있는

validataion 데이터 셋을 사용한다는 의미인가요 ..?

 

답변 1

답변을 작성해보세요.

1

안녕하십니까, 

1. mmdetection의 config에 train_cfg 와 test_cfg 키값으로 지정된 value를 의미합니다. 

train_cfg는 보통 학습 시 필요한 hyper parameter 를 지정하며, test_cfg는 test시에 필요한 하이퍼 파라미터를 지정합니다.  

가령 예를 들어 아래와 같은 설정이 test_cfg에 있을 수 있습니다.   

test_cfg = dict(  # Config for testing hyperparameters for rpn and rcnn
        rpn=dict(  # The config to generate proposals during testing
            nms_across_levels=False,  # Whether to do NMS for boxes across levels. Only work in `GARPNHead`, naive rpn does not support do nms cross levels.
            nms_pre=1000,  # The number of boxes before NMS
            nms_post=1000,  # The number of boxes to be kept by NMS, Only work in `GARPNHead`.
            max_per_img=1000,  # The number of boxes to be kept after NMS.
            nms=dict( # Config of NMS
                type='nms',  #Type of NMS
                iou_threshold=0.7 # NMS threshold
                ),
            min_bbox_size=0),

근데 이걸 train_cfg = cfg.get(train_cfg) test_cfg = cfg.get(test_cfg) 와 같이 굳이 명시하는게 약간 버전 이슈가 있어서 보통 이렇게 인자로 집어 넣습니다. 

2. 네 맞습니다. train_detector에서 validate=True라는 옵션은 훈련시  cfg 파일에 있는

validataion 데이터 셋을 사용해서 검증하라는 의미입니다.