Saifali commited on
Commit
3746200
1 Parent(s): a1731eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -67,7 +67,7 @@ def modelpred(img):
67
  return (im_pil,label_list)
68
  imgpath=gr.inputs.Image(type="filepath")
69
  # webcam=gr.inputs.Image(source="webcam",type="filepath",optional=True)
70
- iface = gr.Interface(fn=modelpred, inputs=imgpath, outputs=[gr.outputs.Image(type="pil"),"text"],title="Face Mask Detection using Deep Neural Networks",description="""Implementation of an efficient neural network to detect and differentiate between people with high accuracy into 3 classes - those who have correctly worn face masks, those who have worn masks incorrectly and those who have not worn them. Implemented and fine tuned a MobileNetV2 network for this task and achieved an accuracy of 92.02%.""",allow_flagging="never",live=False,examples=[["images-3.jpeg"],["power-family-with-father-mother-daughter-wearing-medical-face-mask-protect-2019-ncov-covid-19-corona-virus-stay-home-concept_73622-1419.jpg"],["3000-2.jpg"]])
71
  model = keras.models.load_model('model')
72
  faceCascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_alt2.xml')
73
  iface.launch(debug=True)
 
67
  return (im_pil,label_list)
68
  imgpath=gr.inputs.Image(type="filepath")
69
  # webcam=gr.inputs.Image(source="webcam",type="filepath",optional=True)
70
+ iface = gr.Interface(fn=modelpred, inputs=imgpath, outputs=[gr.outputs.Image(type="pil"),"text"],title="Face Mask Detection using Deep Neural Networks",description="""Implementation of an efficient neural network to detect and differentiate between people with high accuracy into 3 classes - those who have correctly worn face masks, those who have worn masks incorrectly and those who have not worn them. Implemented and fine tuned a MobileNetV2 network for this task and achieved an accuracy of 92.39%.""",allow_flagging="never",live=False,examples=[["images-3.jpeg"],["power-family-with-father-mother-daughter-wearing-medical-face-mask-protect-2019-ncov-covid-19-corona-virus-stay-home-concept_73622-1419.jpg"],["3000-2.jpg"]])
71
  model = keras.models.load_model('model')
72
  faceCascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_alt2.xml')
73
  iface.launch(debug=True)