How danmoksh/visionedge works
Project Type and Purpose
• This is a real‐time, full‐stack detection and alert system. The “frontend” is a minimal web UI (Flask app + templates), while the “backend” is responsible for ingesting live video, running a YOLO ML model, capturing telemetry data, logging to a database, and sending alerts. The system coordinates hardware (VTOL drone, camera, transmitter, telemetry module, remote control) with server‐side processing for debris detection and eventual removal.
File Structure
• Top Level
• app.py — Main Flask application plus server‐side processing logic
• templates/index.html — Frontend view
• README.md, LICENSE, .gitignore
• No separate “src” or “backend”/“frontend” folders, but the MVC pattern is implied:
• Controller & business logic in app.py
• View in templates/
• No dedicated “tests” or “config” folder, so configuration is likely embedded in app.py or environment variables.
README for Additional Insights
• System overview describes:
• VTOL drone flight → live video stream → server processing → YOLO inference → telemetry lookup → database log → alerting.
• Future pick‐and‐place rover component marked as “WIP.”
• Technology stack implied: Python, Flask, YOLO (TensorFlow or PyTorch), relational or time‐series database, potential alerting (email/SMS/WebSocket).
a. Main Components
• Hardware Layer
• VTOL Drone
• GoPro Camera
• VTX/HDMI TX‐RX (video link)
• Telemetry Module
• RX Remote Control
• Software Layer
• Web Server (Flask app.py)
• YOLO AI Model
• Database Storage (e.g., PostgreSQL/SQLite)
• Alerting System (e.g., email/SMS/WebSocket)
• Frontend UI (templates/index.html)
• Future Component
• Autonomous Pick‐and‐Place Rover
b. Relationships & Data Flows
• Drone captures video → Camera → VTX → Server endpoint
• Server forwards each frame to YOLO model → returns detection results
• If debris found → Server queries Telemetry Module for GPS → writes record in Database → triggers Alerting System → updates Frontend UI
• Server feeds annotated frames back to UI or ground‐team dashboard
• Controller loop continues until mission end
• Manual override path: RX Remote → Manual Flight Control → conflict resolution → either resumes auto or manual landing
• Future path: After alert, coordinate forwarded to Rover subsystem
c. Architectural Patterns & Principles
• MVC for the web interface
• Event‐driven pipeline for frame processing
• Single‐process monolith for now; could evolve to microservices (separate inference, API, alerting)
• Separation of concerns: hardware ingestion, AI inference, data storage, user interface, alerting
• Fault tolerance: manual override, safe landing path
d. Key Technologies & Frameworks
• Python + Flask
• YOLO model (likely PyTorch or TensorFlow)
• HTML/CSS for frontend
• VTX/HDMI hardware link
• Telemetry API or serial interface
• Relational DB (configurable)
• Alerting (SMTP, SMS gateway, webhooks)
Essential Details
• Don’t omit the manual override branch or the WIP rover path.
• Interactions with external services (e.g., SMTP server, SMS gateway) if in scope.
• Call out real‐time requirements by annotating the video‐inference loop latency constraints.
• Version or environment details only if relevant (e.g., Python 3.8+, Flask version, model framework).