Skip to content

Instantly share code, notes, and snippets.

@zakirangwala
Created December 1, 2020 06:48
Show Gist options
  • Select an option

  • Save zakirangwala/8ab054afa1d8b1855d3bf25dd6c17c20 to your computer and use it in GitHub Desktop.

Select an option

Save zakirangwala/8ab054afa1d8b1855d3bf25dd6c17c20 to your computer and use it in GitHub Desktop.

Revisions

  1. zakirangwala created this gist Dec 1, 2020.
    6 changes: 6 additions & 0 deletions detect.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    def detect_fn(image):
    detection_model = load_model()
    image, shapes = detection_model.preprocess(image)
    prediction_dict = detection_model.predict(image, shapes)
    detections = detection_model.postprocess(prediction_dict, shapes)
    return detections