• 카테고리

    질문 & 답변
  • 세부 분야

    컴퓨터 비전

  • 해결 여부

    해결됨

안녕하세요 강사님 ~!!

21.08.23 14:12 작성 조회수 264

0

안녕하세요 .. ?
지금 mmdetection kitti_tiny 학습 강의를 듣고 있습니다.
혹시 Pretrained된 모델을 학습 시키고 나서, 학습 시킨 inference 모델을 다시 불러 올 때, tutorial_exps 폴더에 있는 epoch_12.pth 파일을 가져오면 되나요 .. ?
이렇게 하면 될까요 .. ?
config_file = '/content/mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py' checkpoint_file = '/content/mmdetection/tutorial_exps/epoch_12.pth'

답변 1

답변을 작성해보세요.

1

안녕하십니까, 

네, 맞습니다. 맨 마지막 checkpoint 파일을 inference_detector(마지막 checkpoint 파일, img) 해주시면 됩니다. 

감사합니다. 

bgw2001님의 프로필

bgw2001

질문자

2021.08.24

마지막 checkpoint 파일이 어떤 건지 알 수 있을까요 .. ? 

config_file = '/content/mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py'

checkpoint_file = '/content/mmdetection/tutorial_exps/epoch_12.pth'

model = init_detector(config_file , checkpoint_file, device='cuda:0')

results = inference_detector(model, img_arr)을 수행 했는데 num_classes가 4개가 아닌 80개의 Class에 대하여 예측을 했지만, Objectdetection을 하지못해

결국 학습하는 것부터 다시 시작해서 예측을 했습니다 ~!!! 

학습을 시킨 모델을 다시 불러 오지는 못하는 건가요 .. ? ㅠㅠ

학습을 완료한 모델을 불어올때 이렇게코드를 사진에서 처럼 작성했습니다 ~!! 

kitti 용 config 파일을 사용하지 않고 default용인 coco config 파일을 사용하였기 때문에 80개 class config를 적용하게 됩니다. kitti에서 적용한 config file을 사용하셔야 합니다. 

뒤 강의인 oxford pet 에서 checkpoint 파일을 로딩하여 inference하는 예제가 나옵니다. 참조하시면 될 것 같습니다. 

bgw2001님의 프로필

bgw2001

질문자

2021.08.24

감사합니다 ~!! ㅠㅠ