Downloads · 30 days
3
9% of all-time downloads
Atensor123/cardamagemodel
cardamagemodel is a image classification model from Atensor123. Use it when you need a label for an image. The card lists the license as mit.
Predict car damage with confidence using the llm VIT bEIT model! This model is trained to classify car damage into six distinct classes:
Downloads · 30 days
3
9% of all-time downloads
All-time downloads
35
Public
Repo size
656 B
Likes
0
Public
Click a slice to open those files.
.json5.2 KB · 54%
From the Hugging Face model README
Predict car damage with confidence using the llm VIT bEIT model! This model is trained to classify car damage into six distinct classes:
This powerful car damage prediction model can be seamlessly integrated into various applications, such as:
Feel free to explore and integrate this model into your applications for accurate car damage predictions! 🌟
import numpy as np
from PIL import Image
from transformers import AutoImageProcessor, AutoModelForImageClassification
# Load the model and image processor
processor = AutoImageProcessor.from_pretrained("beingamit99/car_damage_detection")
model = AutoModelForImageClassification.from_pretrained("beingamit99/car_damage_detection")
# Load and process the image
image = Image.open(IMAGE)
inputs = processor(images=image, return_tensors="pt")
# Make predictions
outputs = model(**inputs)
logits = outputs.logits.detach().cpu().numpy()
predicted_class_id = np.argmax(logits)
predicted_proba = np.max(logits)
label_map = model.config.id2label
predicted_class_name = label_map[predicted_class_id]
# Print the results
print(f"Predicted class: {predicted_class_name} (probability: {predicted_proba:.4f}")
from transformers import pipeline
#Create a classification pipeline
pipe = pipeline("image-classification", model="beingamit99/car_damage_detection")
pipe(IMAGE)