AventIQ-AI / Beans-Image-Classification-AI-Model

huggingface.co
Total runs: 11
24-hour runs: 0
7-day runs: 2
30-day runs: 4
Model's Last Updated: June 11 2025

Introduction of Beans-Image-Classification-AI-Model

Model Details of Beans-Image-Classification-AI-Model

๐Ÿง  Beans-Image-Classification-AI-Model

A fine-tuned image classification model trained on the Beans dataset with 3 classes: angular_leaf_spot, bean_rust, and healthy. This model is built using Hugging Face Transformers and the ViT (Vision Transformer) architecture and is suitable for educational use, plant disease classification tasks, and image classification experiments.


โœจ Model Highlights
  • ๐Ÿ“Œ Base Model: google/vit-base-patch16-224-in21k
  • ๐Ÿ“š Fine-tuned: Beans dataset
  • ๐ŸŒฟ Classes: angular_leaf_spot, bean_rust, healthy
  • ๐Ÿ”ง Framework: Hugging Face Transformers + PyTorch
  • ๐Ÿ“ฆ Preprocessing: AutoImageProcessor from Transformers

๐Ÿง  Intended Uses
  • โœ… Educational tools for training and evaluation in agriculture and plant disease detection
  • โœ… Benchmarking vision transformer models on small datasets
  • โœ… Demonstration of fine-tuning workflows with Hugging Face

๐Ÿšซ Limitations
  • โŒ Not suitable for real-world diagnosis in agriculture without further domain validation
  • โŒ Not robust to significant background noise or occlusion in images
  • โŒ Trained on small dataset, may not generalize beyond bean leaf diseases

๐Ÿ“ Input & Output

  • Input: RGB image of a bean leaf (expected size 224x224)
  • Output: Predicted class label โ€” angular_leaf_spot, bean_rust, or healthy

๐Ÿ‹๏ธโ€โ™‚๏ธ Training Details
Attribute Value
Base Model `google/vit-base-patch16-224-in21k
Dataset Beans Dataset (train/val/test)
Task Type Image Classification
Image Size 224 ร— 224
Epochs 3
Batch Size 16
Optimizer AdamW
Loss Function CrossEntropyLoss
Framework PyTorch + Transformers
Hardware CUDA-enabled GPU

๐Ÿ“Š Evaluation Metrics
Metric Score
Accuracy 0.98
F1-Score 0.99
Precision 0.98
Recall 0.99


๐Ÿš€ Usage

from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
import torch

model_name = "AventIQ-AI/Beans-Image-Classification-AI-Model"

processor = AutoImageProcessor.from_pretrained(model_name)
model = AutoModelForImageClassification.from_pretrained(model_name)
model.eval()

def predict(image_path):
    image = Image.open(image_path).convert("RGB")
    inputs = processor(images=image, return_tensors="pt").to(model.device)
    with torch.no_grad():
        outputs = model(**inputs)
    preds = torch.argmax(outputs.logits, dim=1)
    return model.config.id2label[preds.item()]

# Example
print(predict("example_leaf.jpg"))


  • ๐Ÿงฉ Quantization
  • Post-training static quantization applied using PyTorch to reduce model size and accelerate inference on edge devices.

๐Ÿ—‚ Repository Structure

.
beans-vit-finetuned/
โ”œโ”€โ”€ config.json               โœ… Model architecture & config
โ”œโ”€โ”€ pytorch_model.bin         โœ… Model weights
โ”œโ”€โ”€ preprocessor_config.json  โœ… Image processor config
โ”œโ”€โ”€ special_tokens_map.json   โœ… (Auto-generated, not critical for ViT)
โ”œโ”€โ”€ training_args.bin         โœ… Training metadata
โ”œโ”€โ”€ README.md                 โœ… Model card

๐Ÿค Contributing

Open to improvements and feedback! Feel free to submit a pull request or open an issue if you find any bugs or want to enhance the model.

Runs of AventIQ-AI Beans-Image-Classification-AI-Model on huggingface.co

11
Total runs
0
24-hour runs
1
3-day runs
2
7-day runs
4
30-day runs

More Information About Beans-Image-Classification-AI-Model huggingface.co Model

Beans-Image-Classification-AI-Model huggingface.co

Beans-Image-Classification-AI-Model huggingface.co is an AI model on huggingface.co that provides Beans-Image-Classification-AI-Model's model effect (), which can be used instantly with this AventIQ-AI Beans-Image-Classification-AI-Model model. huggingface.co supports a free trial of the Beans-Image-Classification-AI-Model model, and also provides paid use of the Beans-Image-Classification-AI-Model. Support call Beans-Image-Classification-AI-Model model through api, including Node.js, Python, http.

Beans-Image-Classification-AI-Model huggingface.co Url

https://huggingface.co/AventIQ-AI/Beans-Image-Classification-AI-Model

AventIQ-AI Beans-Image-Classification-AI-Model online free

Beans-Image-Classification-AI-Model huggingface.co is an online trial and call api platform, which integrates Beans-Image-Classification-AI-Model's modeling effects, including api services, and provides a free online trial of Beans-Image-Classification-AI-Model, you can try Beans-Image-Classification-AI-Model online for free by clicking the link below.

AventIQ-AI Beans-Image-Classification-AI-Model online free url in huggingface.co:

https://huggingface.co/AventIQ-AI/Beans-Image-Classification-AI-Model

Beans-Image-Classification-AI-Model install

Beans-Image-Classification-AI-Model is an open source model from GitHub that offers a free installation service, and any user can find Beans-Image-Classification-AI-Model on GitHub to install. At the same time, huggingface.co provides the effect of Beans-Image-Classification-AI-Model install, users can directly use Beans-Image-Classification-AI-Model installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Beans-Image-Classification-AI-Model install url in huggingface.co:

https://huggingface.co/AventIQ-AI/Beans-Image-Classification-AI-Model

Url of Beans-Image-Classification-AI-Model

Beans-Image-Classification-AI-Model huggingface.co Url

Provider of Beans-Image-Classification-AI-Model huggingface.co

AventIQ-AI
ORGANIZATIONS

Other API from AventIQ-AI