Commit ·
1aff156
1
Parent(s): fc07460
docs: add README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Cheerios Box Detection Project
|
| 2 |
+
|
| 3 |
+
This project trains a YOLOv8 model to detect Cheerios boxes in images.
|
| 4 |
+
|
| 5 |
+
## Project Overview
|
| 6 |
+
|
| 7 |
+
The goal of this project is to train a model to detect Cheerios boxes in a dataset of images. The original approach was to use a 3D pose estimation model, but due to several challenges, the project was pivoted to a 2D object detection model using YOLOv8.
|
| 8 |
+
|
| 9 |
+
## Challenges Faced
|
| 10 |
+
|
| 11 |
+
The initial approach of using the `YOLOv5-6D-Pose` model for 3D pose estimation was met with several challenges:
|
| 12 |
+
|
| 13 |
+
* **Dependency Issues:** The project had strict dependencies on specific versions of Python and PyTorch, which were not compatible with the available hardware.
|
| 14 |
+
* **Data Formatting:** The data format required by the `YOLOv5-6D-Pose` model was not well-documented, and several attempts to format the data correctly were unsuccessful.
|
| 15 |
+
* **CUDA Incompatibility:** The version of PyTorch required by the `YOLOv5-6D-Pose` model was not compatible with the available NVIDIA drivers.
|
| 16 |
+
|
| 17 |
+
## Solution
|
| 18 |
+
|
| 19 |
+
To overcome these challenges, the project was pivoted to a 2D object detection model using YOLOv8. This approach has several advantages:
|
| 20 |
+
|
| 21 |
+
* **Faster Training:** YOLOv8 is a much faster model to train than the `YOLOv5-6D-Pose` model.
|
| 22 |
+
* **Less Resource-Intensive:** YOLOv8 requires fewer resources to train than the `YOLOv5-6D-Pose` model.
|
| 23 |
+
* **Simplified Data Preparation:** The data preparation for YOLOv8 is much simpler than for the `YOLOv5-6D-Pose` model.
|
| 24 |
+
|
| 25 |
+
## How to Run
|
| 26 |
+
|
| 27 |
+
1. **Set up the environment:**
|
| 28 |
+
```bash
|
| 29 |
+
uv venv .venv --python 3.9
|
| 30 |
+
source .venv/bin/activate
|
| 31 |
+
uv pip install -r requirements.txt
|
| 32 |
+
```
|
| 33 |
+
2. **Prepare the data:**
|
| 34 |
+
```bash
|
| 35 |
+
python3 prepare_cheerios_yolov8.py
|
| 36 |
+
```
|
| 37 |
+
3. **Train the model:**
|
| 38 |
+
```bash
|
| 39 |
+
yolo train data=YOLOv8/cheerios_yolov8.yaml model=yolov8n.pt epochs=100 imgsz=640
|
| 40 |
+
```
|