YOLOv8s Tree Disease Detection Model

Try the model in action: ๐Ÿš€ Live Demo

This model detects unhealthy/diseased trees in aerial UAV imagery using YOLOv8s architecture. It was trained on the PDT (Pests and Diseases Tree) dataset and achieves high accuracy for agricultural monitoring applications.

Model Description

This YOLOv8s model has been fine-tuned specifically for detecting unhealthy trees affected by pests and diseases in high-resolution UAV imagery. The model is particularly effective for:

  • Precision agriculture monitoring
  • Forest health assessment
  • Early disease detection in orchards
  • Large-scale plantation management
  • Environmental monitoring

Architecture

  • Base Model: YOLOv8s
  • Input Size: 640x640 pixels
  • Framework: Ultralytics YOLOv8
  • Classes: 1 (unhealthy)

Training Details

Dataset

  • Dataset: PDT (Pests and Diseases Tree)
  • Training Images: 4,536
  • Validation Images: 567
  • Test Images: 567
  • Resolution: 640x640 (Low Resolution version)

Training Configuration

  • Epochs: 50
  • Batch Size: 16
  • Optimizer: SGD
  • Learning Rate: 0.01
  • Momentum: 0.9
  • Weight Decay: 0.001
  • Device: NVIDIA A100-SXM4-40GB
  • Training Time: 0.408 hours

Performance Metrics

Metric Value
mAP50 0.933
mAP50-95 0.659
Precision 0.878
Recall 0.863

Usage

Installation

pip install ultralytics

### Inference

```python
from ultralytics import YOLO
import cv2

# Load model
model = YOLO('best.pt')  # or path to downloaded model

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

# Process results
for result in results:
    boxes = result.boxes
    if boxes is not None:
        for box in boxes:
            confidence = box.conf[0]
            coordinates = box.xyxy[0]
            print(f"Unhealthy tree detected with {confidence:.2f} confidence")
            
# Visualize results
annotated_image = results[0].plot()
cv2.imwrite('detection_result.jpg', annotated_image)

Advanced Usage

# Custom inference settings
results = model.predict(
    source='path/to/image.jpg',
    conf=0.25,  # confidence threshold
    iou=0.45,   # IoU threshold for NMS
    imgsz=640,  # inference size
    save=True   # save results
)

# Batch processing
import glob
image_paths = glob.glob('path/to/images/*.jpg')
results = model(image_paths, batch=8)

Model Files

  • best.pt: Best model weights from training
  • tree_disease_detector.pt: Final saved model
  • training_results.png: Training curves and metrics

Limitations and Considerations

  1. The model is trained on UAV imagery at 640x640 resolution
  2. Optimized for detecting single class: "unhealthy" trees
  3. Performance may vary with different tree species or image conditions
  4. Best results with aerial/drone imagery similar to training data

Applications

  • Precision Agriculture: Early detection of diseased trees in orchards
  • Forest Management: Large-scale monitoring of forest health
  • Environmental Monitoring: Tracking disease spread patterns
  • Research: Studying tree disease progression and patterns

Citation

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

@model{yolov8_tree_disease_2024,
  title={YOLOv8s Tree Disease Detection Model},
  author={IsmatS},
  year={2024},
  publisher={HuggingFace},
  url={https://huggingface.co/IsmatS/crop_desease_detection}
}

@dataset{pdt_dataset,
  title={PDT: UAV Pests and Diseases Tree Dataset},
  author={Zhou et al.},
  year={2024},
  publisher={HuggingFace},
  conference={ECCV 2024}
}

License

This model is released under the MIT License.

Acknowledgments

Contact

For questions or collaborations, please reach out through the HuggingFace repository discussions.

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

Dataset used to train IsmatS/crop_desease_detection

Space using IsmatS/crop_desease_detection 1

Evaluation results