Tony607 / mmdetection_object_detection_demo

How to train an object detection model with mmdetection
https://www.dlology.com/blog/how-to-train-an-object-detection-model-with-mmdetection/
Other
73 stars 194 forks source link

ImportError: cannot import name 'show_result' #12

Open vishaldhull09 opened 4 years ago

vishaldhull09 commented 4 years ago

How to resolve this? I am trying to run mmdetection repo on colab Link : https://colab.research.google.com/github/Tony607/mmdetection_object_detection_demo/blob/master/mmdetection_train_custom_data.ipynb?authuser=1#scrollTo=FNTFhKuVVhMr

CrazyCrud commented 3 years ago

You can try to import the BaseDetector and use its show_result method:

from mmdet.models.detectors import BaseDetector
BaseDetector.show_result(img='data/VOCdevkit/VOC2007/JPEGImages/15.jpg', result=result, self=model, score_thr=score_thr, out_file="result.jpg")