YOLOv8 Beetle Detection Model

Model Description

This is a YOLOv8-based object detection model fine-tuned for beetle detection. The model was trained on a custom dataset of 500 beetle images from Roboflow and achieves excellent performance with [email protected] of 97.63%.

Model Details

  • Base Model: YOLOv8n (nano) from Ultralytics
  • Task: Object Detection
  • Classes: 1 (beetle)
  • Input Size: 640x640 pixels
  • Framework: PyTorch
  • License: AGPL-3.0 (inherited from YOLOv8)

Performance Metrics

Metric Value
[email protected] 97.63%
[email protected]:0.95 89.56%
Precision 95.2%
Recall 94.8%
Processing Time (CPU) ~100ms per image

Dataset

  • Source: Roboflow Universe
  • License: CC BY 4.0
  • Images: 500 annotated beetle images
  • Split: 80% train, 15% validation, 5% test
  • Augmentations: Applied during training for robustness

Usage

Installation

pip install ultralytics

Python Inference

from ultralytics import YOLO
import cv2

# Load the model
model = YOLO('best.pt')

# Run inference
results = model('path/to/image.jpg')

# Process results
for result in results:
    boxes = result.boxes
    for box in boxes:
        # Get coordinates and confidence
        x1, y1, x2, y2 = box.xyxy[0].cpu().numpy()
        confidence = box.conf[0].cpu().numpy()
        
        print(f"Beetle detected with confidence: {confidence:.2f}")
        print(f"Bounding box: ({x1}, {y1}, {x2}, {y2})")

Command Line

yolo predict model=best.pt source='path/to/image.jpg'

Training Details

  • Epochs: 100
  • Batch Size: 16
  • Optimizer: AdamW
  • Learning Rate: 0.01 (initial)
  • Hardware: Google Colab GPU
  • Training Time: ~2 hours

Applications

This model is designed for:

  • Agricultural monitoring
  • Entomological research
  • Biodiversity studies
  • Educational purposes
  • IoT-based pest detection systems

Limitations

  • Trained specifically on beetle images
  • Performance may vary with different lighting conditions
  • Best results with clear, well-lit images
  • Single class detection only

Model Files

  • best.pt: PyTorch model weights (recommended)
  • best.onnx: ONNX format for cross-platform deployment

Citation

If you use this model in your research, please cite:

@model{beetle-detection-yolov8,
  title={YOLOv8 Beetle Detection Model},
  author={Insect Detection Training Project},
  year={2025},
  url={https://huggingface.co/Murasan/beetle-detection-yolov8}
}

License

This model is licensed under AGPL-3.0, inherited from the original YOLOv8 implementation by Ultralytics.

Base Model Attribution

Related Projects

Contact

For questions or issues, please open an issue in the base repository.

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

Evaluation results