0

I am using ImageAI to draw bounding boxes on images.

from imageai.Detection import ObjectDetection
detector = ObjectDetection()
detector.setModelTypeAsRetinaNet()

# Load model
model_path = 'resnet50_coco_best_v2.0.1.h5'
detector.setModelPath(model_path)
detector.loadModel()

This raises an error:

----> 6 detector.setModelPath(model_path)
ValueError: invalid path, path not pointing to a valid file.

However, 'resnet50_coco_best_v2.0.1.h5' file exists (https://github.com/OlafenwaMoses/ImageAI/releases/tag/1.0).

Could you suggest I can fix this error? Thank you.

Alena
  • 15
  • 5

1 Answers1

0

You'll have to download it and set the path to the file in model_path . For example if you have the file in the same folder as the script the path would be './resnet50_coco_best_v2.0.1.h5'

Dreamable
  • 1
  • 1