YOLOv8 Cargo Package Counter
This repository contains a YOLOv8-based model trained to detect and count cargo packages in images. The model was trained on a custom dataset with classe: cargo-package
. It can be used for various cargo logistics and package counting tasks.
Model Description
YOLOv8 is a state-of-the-art object detection architecture, known for its speed and accuracy. This model was trained using a custom dataset containing images of cargo packages, forklifts, and trucks, making it specialized for logistics and transportation industries.
- Model Architecture: YOLOv8
- Number of Classes: 1 (
cargo-package
) - Training: The model was trained using both
best.pt
(the best performing model during training) andlast.pt
(the final checkpoint).- Use Case: Object detection and counting of cargo packages, forklifts, and trucks in warehouses, transportation hubs, or logistics centers.
Evaluation Results
The model was evaluated on the validation set using the following metrics:
Metric | Value |
---|---|
Precision | 0.77187 |
Recall | 0.11111 |
mAP50 | 0.09188 |
mAP50-95 | 0.06383 |
F1 Score | 0.19426 |
These metrics were obtained using a threshold of 0.5 for IoU (Intersection over Union).
How to Use
You can load the model using the ultralytics
library, as shown below:
from ultralytics import YOLO
# Load the model from Hugging Face
model = YOLO('https://huggingface.co/poudel/yolov8-cargo-package-counter/resolve/main/best.pt')
# Run inference on an image
results = model('path_to_image.jpg')
# Display the results
results.show()
Space using poudel/yolov8-cargo-package-counter 1
Evaluation results
- precision on custom-cargo-package-datasetself-reported0.772
- recall on custom-cargo-package-datasetself-reported0.111
- mAP50 on custom-cargo-package-datasetself-reported0.092
- mAP50-95 on custom-cargo-package-datasetself-reported0.064
- F1 on custom-cargo-package-datasetself-reported0.194