How shinryujin03/cameraai2 works
CameraAI2 is a Flask computer-vision API whose main workflow accepts uploaded images, dispatches them to task-specific recognition or detection services, persists image/results in MySQL, and returns JSON. Its domain capabilities include face location, landmarks, attributes, verification and name recognition, plus human and general-object detection. Face enrollment data is read for verification and recognition; the README describes adding training images through face-related endpoints. The graph follows sampled router, service and database calls; unsampled endpoint implementations are shown only where the tree and README establish them.
Main entry points: database.py Metadata database · face_detection_services.py Face location · face_routers.py Face routes · main.py Flask application
Components 19
API entry
- Flask application
app/main/main.py - Face routes
app/routers/face_routers.py - Human route
app/routers/human_detection_routers.py - Object route
app/routers/multiple_objects_detection_routers.py - Test routes
app/routers/test_routers.py
Face analysis
- Face location
app/services/face/face_detection_services.py - Face landmarks
app/services/face/face_landmarks_sevices.py - Facial attributes
app/services/face/facial_attribute_recognition_services.py - Face verification
app/services/face/face_verification_services.py - Name recognition
app/services/face/face_recognition_services.py
Object analysis
- Human detection
app/services/objects/human_detection_services.py - Multiple objects
app/services/objects/multiple_objects_detection_services.py - Image test tools
app/services/test
Metadata storage
- Metadata database
database/database.py
Other components
- API client
- Face recognition library
- DeepFace
- YOLO model
model/yolov8n.pt - MySQL
Connections 32
- API client → Flask application: sends requests
- Flask application → Face routes: registers routes
- Flask application → Human route: registers routes
- Flask application → Object route: registers routes
- Flask application → Test routes: registers routes
- Face routes → Face location: dispatches
- Face routes → Face landmarks: dispatches
- Face routes → Facial attributes: dispatches
- Face routes → Face verification: dispatches
- Face routes → Name recognition: dispatches
- Human route → Human detection: dispatches
- Object route → Multiple objects: dispatches
- Test routes → Image test tools: dispatches
- Face location → Face recognition library: detects faces
- Face landmarks → Face location: requests locations
- Facial attributes → Face location: requests locations
- Facial attributes → DeepFace: analyzes attributes
- Face verification → Face location: requests locations
- Face verification → Face recognition library: encodes and compares
- Name recognition → Face location: requests locations
- Name recognition → Face recognition library: encodes and compares
- Human detection → YOLO model: runs inference
- Multiple objects → YOLO model: runs inference
- Face location → Metadata database: saves results and image
- Face landmarks → Metadata database: saves results
- Facial attributes → Metadata database: saves results and image
- Face verification → Metadata database: reads and saves
- Name recognition → Metadata database: reads enrolled faces
- Name recognition → Metadata database: saves high-confidence image
- Human detection → Metadata database: saves results and image
- Multiple objects → Metadata database: saves results and image
- Metadata database → MySQL: queries and writes