How teikgfgt/autolane-assist works
Project type and purpose
• Type: Embedded real-time computer vision control system
• Purpose: Capture live video, detect lane boundaries with a YOLO model and OpenCV, compute steering corrections, send commands to an Arduino-driven motor to keep a vehicle centered.
File structure
• README.md — project description and tech stack
• main.py — orchestrates camera capture, image processing, inference, decision logic, and serial communication
• chi.pt — pre-trained YOLO model weights for lane detection
• teik.mp4 — sample video input for testing or demonstration
README for additional insights
• Confirms use of YOLO for object detection and OpenCV for image processing
• Describes real-time lane deviation detection and Arduino control loop
a. Camera Input
– Live video feed or recorded sample (teik.mp4)
b. Pre-processing (OpenCV)
c. Inference Module (YOLO)
– chi.pt weights + YOLO inference engine
d. Decision Logic
– Compute lane center deviation, steering angle
e. Communication Module
– Serial (e.g., USB or UART) link to Arduino
f. Arduino & Motor Assembly
– Arduino microcontroller reads commands and drives servo/motor
g. (Optional) Logging / Monitoring
– On-screen overlay, log files, or debug stream
Relationships and interactions (data flow)
1. Camera → Pre-processing
2. Pre-processing → YOLO inference
3. YOLO output → Decision Logic
4. Decision Logic → Serial Interface
5. Serial Interface → Arduino
6. Arduino → Motor / Steering Actuator
7. (Parallel) Send processed frames or metrics to display/log
Architectural patterns and design principles
• Pipeline pattern: each stage transforms data and passes it along
• Single-process orchestration in main.py coordinating modules
• Separation of concerns: vision (OpenCV), detection (YOLO), control (logic), actuation (Arduino)
• Real-time constraints: minimal buffering, low-latency serial comm.
Relevant technologies and libraries
• Python 3.x
• OpenCV for image capture and pre-processing
• PyTorch/YOLO API for model inference with chi.pt
• pySerial (or equivalent) for serial communication
• Arduino firmware (sketch) to interpret commands and drive a motor
– Annotations on interfaces (frame rate, serial protocol, model file name)
– Optional: overlay test video node for teik.mp4 as a standalone input