Skip to content

About

Computer Vision system for automated fruit detection and counting.

Topics

Resources

Contributing

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

Fruit Detection & Counting

Real-time fruit detection, tracking and counting from images, video and live camera feeds.

Fruit on a conveyor belt, detected, tracked and counted in real time

CI Python 3.10+ Ultralytics YOLO11 Ruff Checked with mypy Tested with pytest License: MIT

Combines YOLO11 detection with multi-object tracking so each fruit is counted exactly once, reporting unique fruit rather than per-frame detections.

Quick Start

git clone https://github.com/felipebridge/fruit-detection-counting.git
cd fruit-detection-counting
pip install -e .
fruit-counter            # processes every video in videos_to_processing/

Results go to outputs/<video>_<timestamp>/: an annotated H.264 video, summary.json and frames.csv. Install ffmpeg for H.264 output with audio.

fruit-counter -i fruit_bowl.jpg                     # image or folder
fruit-counter -i orchard.mp4 --device cuda:0        # video on a GPU
fruit-counter -i 0 --show                           # webcam
fruit-counter -i video.mp4 --weights my_model.pt    # your own model

Settings live in configs/default.yaml; see fruit-counter --help.

How It Works

Detect (YOLO11, class-agnostic NMS) → Track (constant-velocity + Hungarian IoU matching) → Count (once per confirmed track, label by confidence-weighted vote) → Render.

License

MIT © felipebridge. Powered by Ultralytics YOLO (AGPL-3.0). Contributions welcome, see CONTRIBUTING.md.

About

Computer Vision system for automated fruit detection and counting.

Topics

Resources

Contributing

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages