Instructions to use Evet-Africa/poultry-disease-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use Evet-Africa/poultry-disease-detector with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("Evet-Africa/poultry-disease-detector") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
π Poultry Disease Detector β YOLOv11n Fine-tuned
A fine-tuned YOLOv11n model for detecting 26 poultry disease lesions and clinical signs from images. Trained on a custom annotated dataset covering Newcastle Disease, Coccidiosis, and Fowlpox.
This model is intended to assist farmers, veterinary researchers, and agricultural AI developers in early detection of poultry diseases.
π Model Performance
Trained for 100 epochs on a custom dataset of ~400 annotated images.
| Metric | Value |
|---|---|
| mAP@50 | 83.7% |
| mAP@50β95 | 66.4% |
| Precision | 71.2% |
| Recall | 73.7% |
π·οΈ Detectable Classes (26)
The model detects the following clinical signs and lesions:
| # | Class | Associated Disease |
|---|---|---|
| 0 | Torticollis | Newcastle Disease |
| 1 | Oculonasal Discharge | Newcastle Disease |
| 2 | Facial Swelling | Newcastle Disease |
| 3 | Conjunctival Hemorrhage | Newcastle Disease |
| 4 | Tracheal Congestion | Newcastle Disease |
| 5 | Proventricular Hemorrhage | Newcastle Disease |
| 6 | Breast Muscle Congestion | Newcastle Disease |
| 7 | Pulmonary Congestion | Newcastle Disease |
| 8 | Intestinal Hemorrhage | Newcastle Disease |
| 9 | Bursal Edema | Newcastle Disease |
| 10 | Ovarian Follicle Congestion | Newcastle Disease |
| 11 | Intestinal Congestion | Coccidiosis |
| 12 | Intestinal Necrosis | Coccidiosis |
| 13 | Cecal Core | Coccidiosis |
| 14 | Enlarged Cecum | Coccidiosis |
| 15 | Pericardial Hemorrhage | Newcastle Disease |
| 16 | Cutaneous Nodules | Fowlpox |
| 17 | Periocular Hyperemia | Fowlpox |
| 18 | Oral & Pharyngeal Plaques | Fowlpox |
| 19 | Tracheal Fibrinous Exudate | Fowlpox |
| 20 | Splenic Congestion | Newcastle Disease |
| 21 | Scab Formation | Fowlpox |
| 22 | Ceca Hemorrhage | Coccidiosis |
| 23 | Liver Congestion | Newcastle Disease |
| 24 | Congested Lung | Newcastle Disease |
| 25 | Cyanotic Comb & Wattle | Newcastle Disease |
π Usage
Installation
pip install ultralytics
Inference
from ultralytics import YOLO
# Load the model
model = YOLO("model.pt")
# Run detection on an image
results = model("path/to/poultry_image.jpg")
# Show results
results[0].show()
# Print class predictions
for box in results[0].boxes:
class_id = int(box.cls)
confidence = float(box.conf)
class_name = results[0].names[class_id]
print(f"{class_name}: {confidence:.2%}")
Batch Inference
from ultralytics import YOLO
model = YOLO("model.pt")
# Run on a folder of images
results = model("path/to/images/", save=True)
π Repository Structure
βββ model.pt # Fine-tuned model weights (best)
βββ yolo11n.pt # Base YOLOv11n pretrained weights
βββ dataset.yaml # Dataset configuration (26 classes)
βββ clean.py # Dataset cleaning utility
βββ images/ # Labeled training images
βββ labels/ # YOLO-format annotation .txt files
βββ unlabeled_images/ # Additional unannotated images
βββ models/
β βββ history_model.keras # Companion history/feature model
β βββ history_scaler.pkl # Feature scaler
β βββ history_feature_vectors.csv
βββ runs/detect/train/ # Training run outputs & metrics
ποΈ Dataset
- ~406 labeled images across 3 disease categories
- 26 lesion/sign classes annotated in YOLO format
- Annotations created using CVAT
- Images sourced from poultry farm and veterinary postmortem contexts
Disease Categories Covered
- Newcastle Disease β systemic, highly contagious viral disease
- Coccidiosis β intestinal parasitic infection
- Fowlpox β slow-spreading viral disease
ποΈ Training Configuration
model: yolo11n.pt
epochs: 100
batch: 4
imgsz: 640
optimizer: auto
patience: 20
pretrained: true
augment: true (randaugment, mosaic, fliplr)
β οΈ Limitations & Disclaimer
- This model is a research/assistive tool and should not replace veterinary diagnosis.
- Performance may vary on images taken in different lighting conditions or camera setups compared to training data.
- The dataset size (~400 images) is relatively small; predictions should be validated by a qualified veterinarian.
- Model was trained and validated on the same image set (train/val split from same distribution).
π License
This model is released under the AGPL-3.0 License, inherited from Ultralytics YOLOv11.
Any downstream use, modification, or distribution must also be open-sourced under AGPL-3.0. For commercial use without open-sourcing, contact Ultralytics for an Enterprise License.
π Citation
If you use this model in your research, please cite:
@misc{poultry-disease-detector-2025,
title = {Poultry Disease Detector β Fine-tuned YOLOv11n},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/Evet-Africa/poultry-disease-detector}},
note = {Fine-tuned on custom CVAT-annotated poultry disease dataset}
}
@software{yolo11_ultralytics,
author = {Glenn Jocher and Jing Qiu},
title = {Ultralytics YOLO11},
version = {11.0.0},
year = {2024},
url = {https://github.com/ultralytics/ultralytics},
license = {AGPL-3.0}
}
- Downloads last month
- 36
Space using Evet-Africa/poultry-disease-detector 1
Evaluation results
- mAP@0.50self-reported0.837
- mAP@0.50:0.95self-reported0.664
- Precisionself-reported0.712
- Recallself-reported0.737