YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Waste Classification Model
This model classifies waste items into three categories:
- Recyclable
- Compostable
- General Waste
Model Description
The model is based on the Vision Transformer (ViT) architecture and has been trained on a custom dataset of waste images. It uses the google/vit-base-patch16-224 backbone and has been fine-tuned for waste classification.
Usage
from transformers import ViTForImageClassification, ViTImageProcessor
from PIL import Image
# Load model and processor
model = ViTForImageClassification.from_pretrained("your-username/waste-classifier")
processor = ViTImageProcessor.from_pretrained("your-username/waste-classifier")
# Load and preprocess image
image = Image.open("path_to_image.jpg")
inputs = processor(images=image, return_tensors="pt")
# Get prediction
outputs = model(**inputs)
predicted_class = outputs.logits.argmax(-1).item()
classes = ['compostable', 'general_waste', 'recyclable']
prediction = classes[predicted_class]
Training Data
The model was trained on a custom dataset of waste images, including:
- Recyclable items (plastic, glass, metal, paper)
- Compostable items (food waste, plant materials)
- General waste (non-recyclable materials)
Performance
The model achieves the following performance metrics:
- Accuracy: ~X%
- Precision: ~X%
- Recall: ~X%
- F1 Score: ~X%
Limitations
- The model works best with clear, well-lit images
- Performance may vary with different lighting conditions
- Some items may be ambiguous between categories
License
This model is available for use under the MIT license.
- Downloads last month
- 6
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support