Run this model with HF Jobs
Run VCDSA/agriscan-efficientnet on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/VCDSA/agriscan-efficientnet. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/VCDSA/agriscan-efficientnet on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use VCDSA/agriscan-efficientnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VCDSA/agriscan-efficientnet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="VCDSA/agriscan-efficientnet") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("VCDSA/agriscan-efficientnet") model = AutoModelForImageClassification.from_pretrained("VCDSA/agriscan-efficientnet", device_map="auto") - Notebooks
- Google Colab
- Kaggle
agriscan-efficientnet model
#1
by Vernard - opened
123345678910111213141516617188192021221 unmodified line2425261627282930202131323323343525262736373839403041424344454647363738484950424344454647485152505354555657545556585960616263606162646566676869706667687172737475767778797475768081828384788586878880899091928293949596849798991001018687881021039010410510610793108109951101119711299113114101115116103117118105119120107121122109123124111125113114115126127117128119129130121131132123133134125135136137138129130131132139140141142143144137138139145146147148149143144145146147148149150151150151152153154155156157158159157160161159162163161164165163166167165168169167170171169172173174175173174175176177178179180181182183184185186187188189190191176177178179180181182183193184185186187188189190191192195193194195199196---library_name: transformerstags: []tags:- agriculture- plant-disease-classification- computer-vision- efficientnet- Africalicense: apache-2.0datasets:- BrandonFors/Plant-Diseases-PlantVillage-Datasetlanguage:- enpipeline_tag: image-classification---
# Model Card for Model ID# AgriScan-EfficientNet
<!-- Provide a quick summary of what the model is/does. --> Crop Disease Classification Model
1 unmodified line
### Model Description
<!-- Provide a longer summary of what this model is. -->**AgriScan-EfficientNet** is a vision model fine-tuned to identify diseases in key crops critical to smallholder farmers in Africa. It is the core AI engine of the **AgriScan** platform—an initiative by **CDSA (Cross Domain Solution Architect)** to provide accessible, AI-powered agricultural intelligence.
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
- **Developed by:** [More Information Needed]- **Funded by [optional]:** [More Information Needed]- **Developed by:** [Vernard Sharbney Ngomane](https://huggingface.co/VCDSA) of CDSA- **Funded by [optional]:** This model was developed as part of a pro-bono innovation project.- **Shared by [optional]:** [More Information Needed]- **Model type:** [More Information Needed]- **Model type:** Image Classification (Fine-tuned EfficientNet)- **Language(s) (NLP):** [More Information Needed]- **License:** [More Information Needed]- **Finetuned from model [optional]:** [More Information Needed]
- **License:** Apache 2.0- **Finetuned from model [optional]:** [google/efficientnet-b3](https://huggingface.co/google/efficientnet-b3) (via PyTorch Image Models)- **Demo:** [AgriScan Live Demo Space](https://huggingface.co/spaces/VCDSA/agriscan-demo)### Model Sources [optional]
<!-- Provide the basic links for the model. -->- **Repository:** [CDSA AgriScan Project](https://github.com/[Your-Github-Org]/AgriScan) *(Replace with actual link)*- **Paper (For EfficientNet):** [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://arxiv.org/abs/1905.11946)
- **Repository:** [More Information Needed]- **Paper [optional]:** [More Information Needed]- **Demo [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
[More Information Needed]
### Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->This model is intended for **direct use in agricultural decision-support systems**. Its primary function is to analyze images of plant leaves and predict the presence and type of disease.
[More Information Needed]- **Primary Use Case:** Integration into mobile applications (via TFLite), web APIs, or messaging bots (WhatsApp) to provide instant disease diagnosis for farmers and agricultural extension officers.- **Educational Use:** Can be used in training materials or apps to help students and farmers learn to identify common crop diseases.
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
[More Information Needed]- **Medical or Human Diagnosis:** This model is strictly for plant disease classification.- **Absolute Decision-Making:** Predictions are advisory. Final agricultural decisions should involve human expertise and local context.- **Non-Visual Data:** Cannot analyze soil samples, weather patterns, or textual descriptions alone.
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
[More Information Needed]- **Geographic & Crop Bias:** Trained primarily on the PlantVillage dataset, which may not fully represent the diversity of disease manifestations, camera qualities, and environmental conditions (e.g., specific lighting, soil backgrounds) found across all African farms.- **Limited Scope:** Classifies diseases present in the training set. It is not an "unknown disease detector" and may misclassify novel or regional-specific pathogens.- **Field Condition Performance:** Lab/studio images from PlantVillage may lead to lower accuracy on blurry, angled, or occluded field photos.- **Mitigation Strategy:** The AgriScan project employs **IBM AI Fairness 360 (AIF360)** for bias auditing and uses a confidence threshold. Low-confidence predictions are flagged for human review.
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.Users should:1. Treat outputs as a **first alert system**, not a definitive diagnosis.2. Be aware of the model's training background and correlate predictions with local agricultural expert knowledge.3. Report misclassifications to help improve future model versions.
## How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
## Training Details[```pythonfrom transformers import AutoImageProcessor, AutoModelForImageClassificationfrom PIL import Imageimport torch]
### Training Data# Load model and processor from the Hubprocessor = AutoImageProcessor.from_pretrained("VCDSA/agriscan-efficientnet")model = AutoModelForImageClassification.from_pretrained("VCDSA/agriscan-efficientnet")
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --># Load and preprocess an imageimage = Image.open("path_to_your_leaf_image.jpg").convert("RGB")inputs = processor(images=image, return_tensors="pt")
[More Information Needed]# Run inferencewith torch.no_grad(): logits = model(**inputs).logits
### Training Procedure# Get predictionpredicted_class_idx = logits.argmax(-1).item()label = model.config.id2label[predicted_class_idx]print(f"Predicted disease: {label}")
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Preprocessing [optional]## Training Details
[More Information Needed]### Training Data
Primary Dataset: Plant-Diseases-PlantVillage-Dataset
#### Training HyperparametersDescription: Contains over 54,000 images of healthy and diseased leaves across 14 crop species and 38 disease classes.
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->Preprocessing: Images were resized to 300x300 pixels, normalized using ImageNet statistics, and augmented with random horizontal flips and slight rotations to improve generalization.
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->### Training Procedure
[More Information Needed]Fine-tuning Regime: Standard supervised fine-tuning on the PlantVillage classification task.
## EvaluationOptimizer: AdamW
<!-- This section describes the evaluation protocols and provides the results. -->Learning Rate: 5e-5 with linear decay
### Testing Data, Factors & MetricsEpochs: 10
#### Testing DataFramework: PyTorch, using Hugging Face transformers and timm libraries.
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
#### Factors## Evaluation
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]### Testing Data, Factors & Metrics
#### MetricsTesting Data: 20% hold-out split from the PlantVillage dataset.
<!-- These are the evaluation metrics being used, ideally with a description of why. -->Primary Metric: Top-1 Accuracy
[More Information Needed]Secondary Metrics: Precision, Recall, F1-Score (computed per class).
### Results
[More Information Needed]
#### Summary
Overall Accuracy: 98.7% on the PlantVillage test set.
Note on Real-World Performance: This high accuracy reflects performance on curated lab images. Field performance is actively being evaluated through pilot studies and is expected to be lower. Continuous evaluation with real farmer data is a core part of the AgriScan development cycle.
## Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]ExplainabilityTo build trust and transparency, the AgriScan project uses IBM AI Explainability 360 (AIX360) to generate saliency maps (e.g., Grad-CAM). These maps visually highlight the regions of the leaf most influential to the model's prediction, helping users and developers understand the model's "reasoning."
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** [More Information Needed]- **Hours used:** [More Information Needed]- **Cloud Provider:** [More Information Needed]- **Compute Region:** [More Information Needed]- **Carbon Emitted:** [More Information Needed]- **Hardware Type:** 1 x NVIDIA Tesla T4 GPU- **Hours used:** ~4 hours- **Cloud Provider:** Google Colab- **Carbon Emitted:** Estimated < 0.5 kgCO2eq (based on ML CO2 impact calculator)- **Mitigation:** The model's efficiency (EfficientNet architecture) and intended use case—potentially reducing pesticide overuse and crop loss—aim to offset its training footprint with positive environmental impact.
## Technical Specifications [optional]
### Model Architecture and Objective
[More Information Needed]EfficientNet-B3
### Compute Infrastructure### Input
[More Information Needed]3-channel RGB image (300x300 pixels)
#### Hardware#### Output
[More Information Needed]Logits over 38 disease classes (compatible with PlantVillage labels).
#### Software#### Export Formats
[More Information Needed]Available in PyTorch (.bin), ONNX (.onnx), and TensorFlow Lite (.tflite) formats for cross-platform deployment.
## Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
## More Information [optional]
[More Information Needed]@misc{agriscan2025, author = {Ngomane, Vernard Sharbney and CDSA}, title = {AgriScan: An AI-Powered Agricultural Intelligence Platform}, year = {2025}, publisher = {Hugging Face}, url = {https://huggingface.co/VCDSA/agriscan-efficientnet}}
## Model Card Authors [optional]@article{tan2020efficientnet, title={EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks}, author={Tan, Mingxing and Le, Quoc V.}, journal={International Conference on Machine Learning}, pages={6105--6114}, year={2020}, publisher={PMLR}}
[More Information Needed]
## Model Card Contact
[More Information Needed]For questions, comments, or partnership inquiries regarding the AgriScan model, please open a discussion on the AgriScan Hub community.README.md+102-105