--- license: agpl-3.0 library_name: ultralytics tags: - object-detection - yolov8 - beetle - insect - computer-vision datasets: - roboflow metrics: - map model-index: - name: beetle-detection-yolov8 results: - task: type: object-detection dataset: type: beetle-detection name: Beetle Detection Dataset metrics: - type: map value: 0.9763 name: mAP@0.5 - type: map value: 0.8956 name: mAP@0.5:0.95 --- # 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 mAP@0.5 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 | |--------|-------| | mAP@0.5 | 97.63% | | mAP@0.5: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 ```bash pip install ultralytics ``` ### Python Inference ```python 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 ```bash 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: ```bibtex @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 - **YOLOv8**: [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics) - **Original License**: AGPL-3.0 - **Paper**: [YOLOv8: A Real-Time Object Detection Algorithm](https://arxiv.org/abs/2305.09972) ## Related Projects - [Base Training Repository](https://github.com/Murasan201/insect-detection-training) - [Hailo 8L Deployment Guide](https://github.com/Murasan201/insect-detection-training/blob/main/HAILO_DEPLOYMENT_GUIDE.md) ## Contact For questions or issues, please open an issue in the [base repository](https://github.com/Murasan201/insect-detection-training/issues).