How nagapadma/wheat-head-detection-with-yolo works
This repository is a Flask web interface and batch pipeline for wheat-head detection. A user opens the upload page and submits an image; the server saves it and launches the inference script asynchronously. Inference loads the YOLO weights, detects wheat heads, and writes visualizations and count/detail outputs. The server exposes uploaded images and result-related routes. The excerpts show that the server invokes inference, but the invocation passes no uploaded-image or output arguments, while the inference excerpt describes batch-directory processing; the exact end-to-end result wiring is therefore unclear.
Main entry points: app.py Flask routes · inference.py Wheat detector · upload_image_camera.html Upload page · best.pt YOLO weights
Components 10
Web interface
- Flask routes
app.py - Upload page
templates/upload_image_camera.html - Async inference runner
app.py
Detection pipeline
- Batch inference
inference.py - Wheat detector
inference.py - YOLO weights
best.pt
Files and results
- Uploaded images
uploads - Detection outputs
inference.py - Result files
Other components
- User
Connections 10
- User → Flask routes: uses
README.md - Flask routes → Upload page: renders
app.py - User → Flask routes: uploads image
app.py - Flask routes → Uploaded images: saves image
app.py - Flask routes → Async inference runner: dispatches
app.py - Async inference runner → Batch inference: runs script
app.py - Batch inference → Wheat detector: initializes
inference.py - Wheat detector → YOLO weights: loads
inference.py - Wheat detector → Detection outputs: writes detections
inference.py - Flask routes → Result files: serves and checks
app.py