| language: en | |
| license: mit | |
| library_name: tensorflow | |
| tags: | |
| - agriculture | |
| - image-classification | |
| - maize | |
| - plant-disease | |
| datasets: | |
| - custom | |
| metrics: | |
| - accuracy | |
| pipeline_tag: image-classification | |
| # Maize Disease Detection Model | |
| This model identifies common maize diseases from leaf images. | |
| ## Model Description | |
| - **Developed by:** [Your Name/Team] | |
| - **Model type:** Image Classification (CNN) | |
| - **Task:** Maize Disease Detection | |
| - **Training Data:** Maize leaf disease dataset | |
| - **Validation Accuracy:** XX% | |
| ## Diseases Detected | |
| - Northern Leaf Blight | |
| - Gray Leaf Spot | |
| - Common Rust | |
| - Healthy Plants | |
| ## Usage | |
| This model accepts leaf images and returns disease classifications with confidence scores. | |
| ```python | |
| from PIL import Image | |
| import requests | |
| API_URL = "https://api-inference.huggingface.co/models/Janvierscode/maize-disease-detection" | |
| headers = {"Authorization": "Bearer YOUR_API_TOKEN"} | |
| def query(image_path): | |
| with open(image_path, "rb") as f: | |
| data = f.read() | |
| response = requests.post(API_URL, headers=headers, data=data) | |
| return response.json() | |
| # Example usage | |
| result = query("path/to/image.jpg") | |
| print(result) | |