beingamit99 commited on
Commit
4d12ffc
·
1 Parent(s): 1059070

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -4
README.md CHANGED
@@ -1,6 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import numpy as np
2
  from PIL import Image
3
- # Load model directly
4
  from transformers import AutoImageProcessor, AutoModelForImageClassification
5
 
6
  processor = AutoImageProcessor.from_pretrained("beingamit99/car_damage_detection")
@@ -10,12 +26,15 @@ inputs = processor(images=image, return_tensors="pt")
10
  outputs = model(**inputs)
11
  logits = outputs.logits.detach().cpu().numpy()
12
 
13
- # Get the most likely class and its probability
14
  predicted_class_id = np.argmax(logits)
15
  predicted_proba = np.max(logits)
16
 
17
- # Get the class name from the model's label map
18
  label_map = model.config.id2label
19
  predicted_class_name = label_map[predicted_class_id]
20
 
21
- print(f"Predicted class: {predicted_class_name} (probability: {predicted_proba:.4f})")
 
 
 
 
 
 
1
+ 🚗 Car Damage Predictor with llm VIT BEIT Architecture
2
+
3
+ Unleash the power of cutting-edge vision transformers for precise car damage prediction! Introducing our fine-tuned model based on llm VIT BEIT, designed to classify car damage into six distinct classes with remarkable accuracy.
4
+
5
+ 🔍 Key Features:
6
+
7
+ Advanced Vision Transformer (VIT): Benefit from the state-of-the-art llm VIT BEIT architecture, optimized for superior image understanding and feature extraction.
8
+ Six-Class Prediction: Our model excels in distinguishing between six different classes of car damage, providing detailed insights for comprehensive analysis.
9
+ Robust Fine-Tuning: Trained on diverse and extensive datasets, the model exhibits robust performance across various scenarios and damage types.
10
+ Hugging Face Integration: Seamlessly integrate our model into your workflow using Hugging Face, the go-to platform for efficient and user-friendly model deployment.
11
+ 🌐 Applications:
12
+
13
+ Insurance claim processing
14
+ Vehicle inspection automation
15
+ Fleet management optimization
16
+ 🚀 Enhance your car damage prediction tasks with the llm VIT BEIT model. Experience unprecedented accuracy and reliability for a wide range of applications. Get started with Hugging Face integration today!
17
+ # First Approach
18
  import numpy as np
19
  from PIL import Image
 
20
  from transformers import AutoImageProcessor, AutoModelForImageClassification
21
 
22
  processor = AutoImageProcessor.from_pretrained("beingamit99/car_damage_detection")
 
26
  outputs = model(**inputs)
27
  logits = outputs.logits.detach().cpu().numpy()
28
 
 
29
  predicted_class_id = np.argmax(logits)
30
  predicted_proba = np.max(logits)
31
 
 
32
  label_map = model.config.id2label
33
  predicted_class_name = label_map[predicted_class_id]
34
 
35
+ print(f"Predicted class: {predicted_class_name} (probability: {predicted_proba:.4f})")
36
+
37
+ # 2nd Aprroach
38
+ from transformers import pipeline
39
+
40
+ pipe = pipeline("image-classification", model="beingamit99/car_damage_detection")