How sanjay4717/border-surveillance-anomaly-detection works
SENTRY is an academic image-based border-surveillance anomaly dashboard. An operator selects a frame, the React app submits it to the FastAPI detection endpoint, and the backend runs YOLO inference, checks relevant-object boxes against a restricted zone, annotates the frame, and logs the scan. The dashboard then refreshes scan history and summary statistics. The graph includes the major documented dashboard capabilities; source excerpts show the main API, inference, persistence, and UI wiring, but do not expose every implementation detail.
Main entry points: detection.py Detection Routes · App.jsx Dashboard App · client.js API Client · detect.py YOLO Detector
Components 17
Operator Dashboard
- Dashboard App
frontend/src/App.jsx - Frame Upload
frontend/src/components/UploadPanel.jsx - Scan Results
frontend/src/components/ResultsPanel.jsx - Alert Log
frontend/src/components/AlertLog.jsx - Summary Stats
frontend/src/components/StatsCards.jsx - Status Bar
frontend/src/components/StatusBar.jsx - API Client
frontend/src/api/client.js
Detection API
- FastAPI App
backend/app/main.py - Detection Routes
backend/app/routes/detection.py
Image Analysis
- Model Loader
backend/app/models/model_loader.py - YOLO Detector
ml/scripts/detect.py - Zone Analysis
ml/scripts/detect.py - Frame Annotation
ml/scripts/detect.py
Scan Records
- Uploaded Frames
backend/uploads - Annotated Frames
backend/detections - Detection Database
backend/app/utils/database.py
Other components
- Operator
Connections 20
- Operator → Frame Upload: selects frame
frontend/src/components/UploadPanel.jsx - Frame Upload → Dashboard App: submits file
frontend/src/App.jsx - Dashboard App → API Client: requests scan
frontend/src/App.jsx - API Client → FastAPI App: calls API
frontend/src/api/client.js - FastAPI App → Detection Routes: registers routes
backend/app/main.py - Detection Routes → Uploaded Frames: writes upload
backend/app/routes/detection.py - Detection Routes → Model Loader: gets detector
backend/app/routes/detection.py - Model Loader → YOLO Detector: loads class
backend/app/models/model_loader.py - Detection Routes → YOLO Detector: runs detection
backend/app/routes/detection.py - YOLO Detector → Zone Analysis: checks overlap
ml/scripts/detect.py - YOLO Detector → Frame Annotation: draws results
ml/scripts/detect.py - Detection Routes → Annotated Frames: sets save path
backend/app/routes/detection.py - Detection Routes → Detection Database: logs scan
backend/app/routes/detection.py - API Client → Detection Routes: requests history
frontend/src/api/client.js - API Client → Detection Routes: requests stats
frontend/src/api/client.js - Dashboard App → Scan Results: renders result
frontend/src/App.jsx - Dashboard App → Alert Log: renders history
frontend/src/App.jsx - Dashboard App → Summary Stats: renders stats
frontend/src/App.jsx - Dashboard App → Status Bar: renders status
frontend/src/App.jsx - API Client → Dashboard App: returns response
frontend/src/App.jsx