Skip to content

Instantly share code, notes, and snippets.

@zakirangwala
Created December 1, 2020 06:48
Show Gist options
  • Save zakirangwala/8ab054afa1d8b1855d3bf25dd6c17c20 to your computer and use it in GitHub Desktop.
Save zakirangwala/8ab054afa1d8b1855d3bf25dd6c17c20 to your computer and use it in GitHub Desktop.
Detection Function - Mask Detection
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment