Skip to content

Instantly share code, notes, and snippets.

@OlafenwaMoses
Last active June 13, 2018 07:35
Show Gist options
  • Save OlafenwaMoses/5cf354473586415e3623442b8454532c to your computer and use it in GitHub Desktop.
Save OlafenwaMoses/5cf354473586415e3623442b8454532c to your computer and use it in GitHub Desktop.
detector = ObjectDetection()
detector.setModelTypeAsRetinaNet()
detector.setModelPath( os.path.join(execution_path , "resnet50_coco_best_v2.0.1.h5"))
detector.loadModel()
detections = detector.detectObjectsFromImage(input_image=os.path.join(execution_path , "image.jpg"), output_image_path=os.path.join(execution_path , "imagenew.jpg"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment