How siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system works
The product is a web-based student uniform-compliance monitor. Users upload a photo or stream webcam frames; the backend identifies faces, evaluates uniform and ID-card compliance, scores the result, and exposes student and violation records to the dashboard. The graph also preserves calibration, enrollment/manual review, and analysis-history capabilities documented in the README. Source excerpts show the main analysis and stream flows; some unsampled route-to-service details are therefore omitted.
Main entry points: Dashboard.jsx Dashboard · main.py FastAPI application · analyze.py Photo analysis route · api.js API and socket client
Components 28
Web dashboard
- Application shell
frontend/src/App.jsx - Dashboard
frontend/src/components/Dashboard.jsx - Camera feed
frontend/src/components/CameraFeed.jsx - Image upload
frontend/src/components/ImageUpload.jsx - Result panels
frontend/src/components/Scorecard.jsx - Identity panel
frontend/src/components/IdentificationPanel.jsx - Manual override
frontend/src/components/ManualOverride.jsx - Analysis audit
frontend/src/components/AnalysisAudit.jsx - Analysis history
frontend/src/components/History.jsx - Violation log
frontend/src/components/ViolationLog.jsx - API and socket client
frontend/src/utils/api.js
API workflows
- FastAPI application
backend/app/main.py - Photo analysis route
backend/app/routes/analyze.py - Live stream route
backend/app/routes/stream.py - Student management
backend/app/routes/students.py - Violation and history routes
backend/app/routes/violations.py - Uniform calibration
backend/app/routes/calibrate.py
Vision and scoring
- Face recognition
backend/app/pipeline/face_recognition.py - Face MLP
backend/app/models/mlp_classifier.py - Uniform detection
backend/app/pipeline/uniform_detection.py - Uniform CNN
backend/app/models/cnn_uniform.py - ID-card detection
backend/app/pipeline/id_card_detection.py - Compliance scoring
backend/app/pipeline/scoring.py - Result annotation
backend/app/utils/drawing.py - Image conversion
backend/app/utils/image_utils.py
Configuration and records
- Runtime settings
backend/app/config.py - SQLite records
backend/app/database.py
Other components
- Staff user
Connections 48
- Staff user → Dashboard: operates
README.md - Application shell → Dashboard: renders
frontend/src/App.jsx - Dashboard → Camera feed: selects
frontend/src/components/Dashboard.jsx - Dashboard → Image upload: selects
frontend/src/components/Dashboard.jsx - Dashboard → Result panels: renders
frontend/src/components/Dashboard.jsx - Dashboard → Identity panel: renders
frontend/src/components/Dashboard.jsx - Dashboard → Manual override: renders
frontend/src/components/Dashboard.jsx - Dashboard → Analysis audit: renders
frontend/src/components/Dashboard.jsx - Dashboard → Violation log: renders
frontend/src/components/Dashboard.jsx - Camera feed → API and socket client: uses
frontend/src/components/CameraFeed.jsx - Image upload → API and socket client: uses
frontend/src/components/ImageUpload.jsx - Dashboard → API and socket client: enrolls unknown face
frontend/src/components/Dashboard.jsx - Analysis history → API and socket client: fetches history
frontend/src/components/History.jsx - Violation log → API and socket client: fetches violations
frontend/src/components/ViolationLog.jsx - API and socket client → Photo analysis route: posts photo
frontend/src/utils/api.js - API and socket client → Live stream route: streams frames
frontend/src/utils/api.js - API and socket client → Student management: fetches students
frontend/src/utils/api.js - API and socket client → Violation and history routes: fetches records
frontend/src/utils/api.js - FastAPI application → Photo analysis route: mounts route
backend/app/main.py - FastAPI application → Live stream route: mounts route
backend/app/main.py - FastAPI application → Student management: mounts route
backend/app/main.py - FastAPI application → Violation and history routes: mounts route
backend/app/main.py - FastAPI application → Uniform calibration: mounts route
backend/app/main.py - FastAPI application → SQLite records: initializes
backend/app/main.py - FastAPI application → Face recognition: initializes
backend/app/main.py - FastAPI application → Uniform detection: initializes
backend/app/main.py - FastAPI application → ID-card detection: initializes
backend/app/main.py - Photo analysis route → Image conversion: decodes upload
backend/app/routes/analyze.py - Photo analysis route → Face recognition: recognizes faces
- Photo analysis route → Uniform detection: detects uniform
- Photo analysis route → ID-card detection: detects card
- Photo analysis route → Compliance scoring: computes score
backend/app/routes/analyze.py - Photo analysis route → Result annotation: annotates result
backend/app/routes/analyze.py - Photo analysis route → SQLite records: saves analysis
backend/app/routes/analyze.py - Live stream route → Image conversion: decodes frames
backend/app/routes/stream.py - Live stream route → Face recognition: recognizes faces
- Live stream route → Uniform detection: detects uniform
- Live stream route → ID-card detection: detects card
backend/app/routes/stream.py - Live stream route → Compliance scoring: computes score
backend/app/routes/stream.py - Live stream route → Result annotation: annotates frame
backend/app/routes/stream.py - Student management → SQLite records: manages records
backend/app/routes/students.py - Violation and history routes → SQLite records: reads and writes
backend/app/routes/violations.py - Uniform calibration → Runtime settings: updates thresholds
backend/app/routes/calibrate.py - Face recognition → Face MLP: classifies embeddings
backend/app/pipeline/face_recognition.py - Uniform detection → Uniform CNN: classifies components
backend/app/pipeline/uniform_detection.py - Face recognition → SQLite records: loads student data
backend/app/pipeline/face_recognition.py - SQLite records → Runtime settings: uses settings
backend/app/database.py - Face MLP → Runtime settings: uses settings
backend/app/models/mlp_classifier.py