How saideva9826/yolo works
Project Type and Purpose
• This is a full-stack Computer Vision application built around YOLO object detection.
• It covers model training/optimization, a prediction API (Flask + AWS Lambda), and a minimal web UI for demoing results.
File Structure
• Top-level files
• main.py, yolo.py, yolo_to_json_converter.py – core Python scripts for training, inference, and output conversion
• deploy_lambda.sh, lambda_requirements.txt – deployment scripts for AWS Lambda
• test_payload.json – sample input for serverless function
• app/
• app/main.py – entry point for on-premise or local inference/training
• app/lambda_yolo_function.py – handler for AWS Lambda inference
• notebooks/
• Research, tutorials, and markdowns documenting every stage (YOLO intro, transfer learning, deployment)
• static/ & templates/
• templates/index.html – minimal web front-end
• zips & PPTX
• yolo_flask_api_src.zip – packaged Flask API source
• “Computer Vision with YOLO…” – slide deck
README
• Confirms four main features: YOLO training, Flask API, AWS Lambda deployment, transfer learning
• Mentions the high-level folder layout
Main Components
a. Model Training & Optimization Layer
– “main.py” orchestrates data loading, model compilation, transfer-learning, and weight export
– Jupyter notebooks feed into your experimentation cycle
b. Conversion Layer
– “yolo_to_json_converter.py” transforms raw YOLO outputs into JSON payloads
c. Inference Services
1. Local/Premise Flask API
• Runs app/main.py or packaged code from yolo_flask_api_src.zip
• Exposes HTTP endpoint POST /detect
• Serves static results and index.html for demo
2. AWS Lambda Serverless Function
• app/lambda_yolo_function.py triggered via API Gateway or CLI
• Receives base64-encoded image, runs YOLO inference, returns JSON
d. Frontend Layer
– index.html + static assets request detection from either local API or Lambda endpoint
e. External Services (optional)
– S3 or other storage for persisting models or storing payloads
– CloudWatch for Lambda logs
Relationships & Data Flows
• Training → exported model weights → (a) Conversion & packaging for Lambda, (b) local Flask container
• Client (browser) → HTTP → Flask API or API Gateway → Lambda function
• Inference results → JSON → converter (if needed) → returned to client → overlay on static image
Architectural Patterns & Principles
• Separation of Concerns: distinct modules for training, conversion, inference, and presentation
• Microservices/Serverless: local Flask vs. AWS Lambda interchangeable inference endpoints
• MVC-lite: index.html (View) ↔ Flask routes or Lambda (Controller) ↔ YOLO model (Model)
Detail
• Script or directory as a component.
• How notebooks feed into main.py and how weights propagate to both local and serverless stacks.
• External integrations (API Gateway, S3) if used or planned.