This repository contains custom image detection models trained with YOLO v5, designed specifically for detecting cannabis buds (flowers).
- Detection Capability: These models can detect cannabis buds in both images and live video.
- Bounding Box: Once a detection occurs, a bounding box is drawn around the detected flower.
- OAK-D Pro Integration: Scripts are available to utilize the YOLO v5 custom models with the OAK-D Pro camera.
- Download Models: Download one of the custom YOLO v5 models.
- Integrate into Python Script: Add the downloaded model to your Python script for object detection.
-
Create a Python Virtual Environment: Set up a virtual environment to manage dependencies.
-
Install Dependencies: Use the following command to install the necessary packages:
pip install torch opencv-python git+https://github.com/ultralytics/yolov5
-
Run Object Detection Script: Execute the object detection script with the custom YOLO v5 models.
These scripts and models were developed as part of a robotics project aimed at automating the trimming of cannabis flowers. The envisioned solution included:
- Two Robotic Arms: One arm equipped with scissors for trimming, and the other for grasping the branch or bud.
- Camera Integration: A camera to detect the bud and guide the movements of both robotic arms.
- Automated Trimming: The camera detection and robotic arms coordination were designed to trim cannabis flowers automatically, without human involvement.
- Model Download and Setup: Download the custom YOLO v5 models and set up your Python environment.
- Object Detection: Use the provided script to perform object detection on images or live video.
- Integration with OAK-D Pro Camera: Utilize the additional scripts to integrate the YOLO v5 models with the OAK-D Pro camera for enhanced functionality.
This repository provides a robust foundation for developing automated cannabis bud detection and trimming solutions, leveraging advanced image detection models and robotics integration.