This project uses YOLOv8 for detecting packages and labels in warehouse images and videos. The dataset is sourced from Roboflow and annotated in YOLO format.
- Classes:
label,package - Source: Roboflow Universe
- Format: YOLOv8 (see
data.yaml) - Train images:
train/images/ - Validation images:
valid/images/ - Test images:
test/images/
git clone <repo-url>
cd <repo-directory>pip install -r requirements.txtTrain a YOLOv8 model on your dataset:
python main.py- This uses
yolov8n.ptas the base model and trains for 100 epochs on GPU (CUDA).
Run detection on test images and save results to the results/ directory:
python test.py- Input: images from
test/images/ - Output: annotated images in
results/
Run detection on a video and save the output video:
python video_test.py- Input: video from
videos/1stvideo.mp4(edit path as needed) - Output:
videos/output_video_with_counts.mp4
- Trained weights are saved in
runs/detect/train5/weights/best.ptby default. - You can change the weights path in
test.pyandvideo_test.pyas needed.
See requirements.txt for all dependencies.
- The project expects a CUDA-capable GPU for training and inference.
- The dataset and code are provided under the CC BY 4.0 License.