🍎 Fruit Detection with YOLOv8s

A high-accuracy YOLOv8s object detection model trained to detect 6 fruit categories.
This model achieves strong performance and supports real-time inference.


πŸ“Œ Model Overview

  • Architecture: YOLOv8s
  • Framework: Ultralytics
  • Fine-tuned from: yolov8s.pt (COCO pretrained)
  • Number of classes: 6
  • Training images: 1692
  • Validation images: 724
  • Image size: 640x640
  • Epochs trained: 100
  • Hardware: NVIDIA GTX 1650 (4GB VRAM)

πŸ“Š Performance

Metric Score
Precision 0.989
Recall 0.974
mAP@0.5 0.992
mAP@0.5:0.95 0.9486

Best checkpoint obtained around epoch 99.


πŸš€ How to Use

Install

pip install ultralytics

Inference on Image

from ultralytics import YOLO

model = YOLO("best.pt")

results = model("test.jpg")
results.show()

Real-Time Webcam

from ultralytics import YOLO

model = YOLO("best.pt")
model.predict(source=0, show=True)

πŸ‹οΈ Training Details

Dataset

  • Source: jamesnguyen831/Fruit-Detection-Dataset
  • Format: YOLO bounding box format
  • 6 fruit categories
  • Balanced dataset
  • No corrupted images

Training Configuration

  • Batch size: 8
  • Image size: 640
  • Optimizer: Default YOLOv8 optimizer
  • Mixed precision: Disabled (AMP off due to GPU compatibility)
  • Device: CUDA (GTX 1650)

⚠️ Limitations

  • Performance may drop under extreme lighting conditions.
  • Limited generalization outside trained fruit classes.
  • Small dataset size may affect unseen environments.

πŸ”¬ Technical Specifications

  • Parameters: ~11.1M
  • GFLOPs: 28.7
  • Anchor-free detection head
  • CSP-based backbone
  • SPPF module

🌱 Environmental Impact

Training performed on a single consumer GPU (GTX 1650) for ~5 hours.
Energy consumption is relatively low compared to large-scale models.


πŸ“š Citation

If you use this model, please cite YOLOv8:

@software{yolov8_ultralytics,
  author = {Ultralytics},
  title = {YOLOv8},
  year = {2023},
  url = {https://github.com/ultralytics/ultralytics}
}

πŸ‘€ Author

Developed by QuΓ’n

Downloads last month
20
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for jamesnguyen831/fruit-detection-yolov8s

Finetuned
(149)
this model

Dataset used to train jamesnguyen831/fruit-detection-yolov8s