Smart India Hackathon Prototype Submission (Not selected, but fully functional as a proof of concept)
ATC Project is a web based system that detects cattle in images, segments the animal, extracts geometric features, computes body condition scores and generates annotated images.
The system performs:
- YOLOv8 based cattle detection
- Threshold segmentation
- Contour extraction
- Keypoint identification
- Calculation of body length, height and a rump angle estimate
- Normalized measurement scoring
- Annotated output generation
- Flask based web interface with batch upload support
- Clean Flask interface
- Multiple image upload
- YOLOv8 powered detection
- Contour based geometry extraction
- Body, height, rump and total scoring
- Annotated visual output saved automatically
- Easy to use result display
- Upload one or more images
- Detect cattle using YOLOv8
- Segment the detected region
- Extract the largest contour
- Find extreme contour points
- Compute measurements
- Normalize and score
- Produce annotated output
- Python
- Flask
- YOLOv8 (Ultralytics)
- OpenCV
- NumPy
- HTML and CSS
ATC_Project/
app.py
main.py
requirements.txt
static/
uploads/
outputs/
templates/
index.html
results.html
git clone https://github.com/biswajyoti-nath/ATC_Project.git
cd ATC_Project
python -m venv venv
pip install -r requirements.txt
Download yolov8s.pt or yolov8n.pt and place it in the project folder.
Example line in code:
yolo_model = YOLO("yolov8s.pt")
python app.py
http://127.0.0.1:5000
Upload cattle images and view processed results.
The system computes:
- Normalized body length
- Normalized height
- Rump angle estimate
Scores range from 1 to 9 per measurement.
Total score interpretation:
1 to 10 Poor
11 to 20 Average
21 to 27 Excellent
These thresholds were created for prototype demonstration and are not veterinary validated.
- Train a custom YOLO model for Indian cattle
- Replace threshold segmentation with instance segmentation
- Build a labeled dataset for calibration
- Add dashboards and analytics
- Deploy to cloud for field usage
Biswajyoti Nath Barak Valley Engineering College Department of Computer Science and Engineering