ytrsoymr commited on
Commit
d3aafe8
·
verified ·
1 Parent(s): e0fd03d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -25,19 +25,20 @@ face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_fronta
25
  with st.sidebar:
26
  st.title("VisionGuard: Mask Monitor")
27
  st.markdown("""
28
- **VisionGuard** is a real-time AI system designed to help enforce health safety by detecting face mask compliance from images or webcam input.
29
 
30
  **How it works:**
31
  - Upload or capture an image
32
- - The AI detects face(s) and checks for mask presence
33
- - Results include confidence and visual feedback
34
 
35
- This tool was built with a vision to promote public health and awareness using AI.
36
 
37
  **Built by:** Thirupathirao • 2025
38
  """)
39
  st.info("For best results, use clear, front-facing images with good lighting.")
40
- st.caption("Empowering safety through AI.")
 
41
 
42
  # Resize image
43
  def resize_image(image, max_size=(400, 400)):
@@ -125,8 +126,9 @@ elif input_choice == "Use Webcam":
125
  if confidence is not None:
126
  st.metric("Confidence Score", f"{confidence*100:.2f}%")
127
  if "Mask" in label:
128
- st.success("✔️ You're following safety measures!")
129
  else:
130
- st.error("⚠️ No mask detected! Please wear a mask in public spaces.")
 
131
  else:
132
  st.warning(label)
 
25
  with st.sidebar:
26
  st.title("VisionGuard: Mask Monitor")
27
  st.markdown("""
28
+ **VisionGuard** is a real-time system powered by **Convolutional Neural Networks (CNNs)** to help promote public health by detecting face mask compliance.
29
 
30
  **How it works:**
31
  - Upload or capture an image
32
+ - A CNN-based model detects face(s) and checks for mask presence
33
+ - Results include confidence levels and visual feedback
34
 
35
+ This tool was built as a deep learning project to demonstrate practical applications of CNNs in image classification tasks.
36
 
37
  **Built by:** Thirupathirao • 2025
38
  """)
39
  st.info("For best results, use clear, front-facing images with good lighting.")
40
+ st.caption("Empowering safety through deep learning.")
41
+
42
 
43
  # Resize image
44
  def resize_image(image, max_size=(400, 400)):
 
126
  if confidence is not None:
127
  st.metric("Confidence Score", f"{confidence*100:.2f}%")
128
  if "Mask" in label:
129
+ st.error("No mask detected! Please wear a mask in public spaces.")
130
  else:
131
+ st.success("You're following safety measures!")
132
+
133
  else:
134
  st.warning(label)