How ganeshmohane/safteycheck works
Project type and purpose
• Project Type: Standalone deep-learning pipeline for real-time PPE detection.
• Purpose: Inference service that ingests camera feed, runs a CNN model (ppe_honors.h5), and flags missing PPE. Training components sit alongside for offline model development.
File structure
• Top-level artifacts:
– honors_app.py – the main inference script
– requirements.txt – Python dependencies (e.g., OpenCV, TensorFlow/Keras)
– trained_model(CNN)/ppe_honors.h5 – serialized CNN model
– dataset/ppe_equipments – organized train/valid/test splits and class mappings
– kaggle notebook.txt – training notebook (Keras)
– outputs-ss/ – screenshot outputs for validation
– Report - SafetyCheck.pdf – design/analysis doc
• No separate “frontend” or “backend” folders: the entire system is a Python‐based monolith that can be later refactored into microservices if needed.
README for additional insights
• Confirms real-time camera input and CNN-based inference.
• Emphasizes “AI-Powered PPE Detection for Healthcare Safety.”
Main components
a. Data & Training Subsystem
– Dataset (ppe_equipments/train, valid, test + class CSVs)
– Training Notebook / Script (kaggle notebook.txt)
– Model Registry / Artifacts (ppe_honors.h5)
b. Inference Subsystem
– Camera / Video Feed (OpenCV capture)
– honors_app.py business logic
• Preprocessing (resize, normalization)
• Model Loader (loads ppe_honors.h5 via Keras)
• Inference Engine (runs CNN forward pass)
• Alert Module (console/UI overlay; could be extended to send notifications)
– Output Display (live annotated stream + optional logging)
c. External / Future Extensions
– Storage (e.g., database or file system for logs)
– Alerting Service (SMS/email/webhook)
– Web Dashboard / REST API
Relationships and interactions
• Training flow (one-time or periodic): Dataset → Training Notebook/Script → Trained Model → Model Registry
• Inference flow (continuous): Camera Feed → honors_app.py → Model Loader → CNN Inference → Post-processing → Display/Alerts → (Optional) Logging/DB
Architectural patterns & design principles
• Separation of Concerns: clearly separate data ingestion, model inference, and output handling.
• Modularization: group preprocessing, model loading, inference, and post-processing into distinct modules (even if currently in one script).