Skip to content

Instantly share code, notes, and snippets.

@RITIK-12
Created September 20, 2020 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RITIK-12/83270b8ea76ca1a05adec28fe98d5cba to your computer and use it in GitHub Desktop.
Save RITIK-12/83270b8ea76ca1a05adec28fe98d5cba to your computer and use it in GitHub Desktop.
args = {}
args["face"] = "face_detector"
args["model"] = "mask_detector.model"
args["confidence"] = 0.4
prototxtPath = os.path.sep.join([args["face"], "deploy.prototxt"])
weightsPath = os.path.sep.join([args["face"],
"res10_300x300_ssd_iter_140000.caffemodel"])
faceNet = cv2.dnn.readNet(prototxtPath, weightsPath)
# load the face mask detector model from disk
maskNet = load_model(args["model"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment