How monishkumarvr/ai_clone works
Project type and purpose
• This is an end-to-end, computer-vision microservices pipeline. It ingests CCTV video, runs inference on molten-metal processes, post-processes results, exports metrics, syncs data, and exposes an API for alerts and dashboards—all orchestrated via Docker Compose with no external-cloud dependencies.
File structure
• Top-level microservice folders:
• api_gateway/
• camera_ingest/
• inference/
• post_processing/
• metrics_exporter/
• offline_sync/
• Persistence/config:
• database/init.sql & db/init_db.sql → relational database schema
• gfs/ → shared file storage for raw video frames and intermediate artifacts
• Orchestration:
• docker-compose.yaml → composes all services, volumes, networks
• Each service has its own Dockerfile, requirements.txt, and main.py entrypoint.
README insights
• “Foundry Process Recognition System – CCTV Project”
• Purpose: detect, track, analyze molten-metal processes from CCTV footage
• End-to-end, private pipeline, generates SOP-violation alerts & production intelligence
Main components & interactions
a. camera_ingest
• Connects to CCTV streams or video files
• Extracts frames, drops them into GFS (shared volume) or message queue
b. inference
• Picks up frames from GFS
• Runs OpenVINO models (best_openvino_model, best_yolov11x_v6_openvino_model)
• Emits raw detections to GFS or a Kafka/RabbitMQ topic
c. post_processing
• Consumes detections
• Aggregates tracks, applies business rules (SOP violations)
• Writes structured events/alerts to the relational database
d. metrics_exporter
• Periodically scrapes service health & performance metrics
• Exposes Prometheus-compatible /metrics endpoint
e. offline_sync
• Periodically syncs database dumps, frames, model artifacts for offline analysis
f. api_gateway
• Fronts the pipeline: authenticates, routes requests to DB or metrics exporter
• Exposes RESTful endpoints for dashboards, alert queries, model metadata
g. database
• Stores schema for raw events, processed alerts, SOP violations, telemetry
Architectural patterns & design principles
• Microservices: each step isolated in its own container
• Event-driven pipeline: GFS or pub/sub for decoupling ingest → inference → post_processing
• Single-responsibility: each service does one thing end-to-end
• Orchestration with Docker Compose: shared network, named volumes, service dependencies
• Observability: metrics_exporter + potentially logs shipped to stdout
• Data persistence: relational DB for structured data; GFS for video/frames
Essential details to capture
• The multi-stage pipeline and how data moves from raw CCTV to insights
• Each microservice’s role, boundaries, and persistence mechanisms
• The orchestration and networking via docker-compose.yaml
• External touchpoints: CCTV stream sources and potential archive/offline storage