File size: 2,317 Bytes
03f6a59
 
 
 
 
 
 
 
224c7b3
 
 
03f6a59
930548c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c3a9d45
495f432
1059070
 
930548c
c3a9d45
1059070
 
930548c
c3a9d45
1059070
 
930548c
c3a9d45
1059070
 
 
 
 
 
930548c
c3a9d45
 
f354972
930548c
c3a9d45
4d12ffc
1e1dc8c
495f432
02035d1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
license: mit
tags:
- image-classification
- car-damage-prediction
- beit
- vit
- transformer
metrics:
- accuracy
- code_eval
---
# πŸš— Car Damage Prediction Model πŸ› οΈ

Predict car damage with confidence using the **llm VIT bEIT** model! This model is trained to classify car damage into six distinct classes:

- **"0"**: *Crack*
- **"1"**: *Scratch*
- **"2"**: *Tire Flat*
- **"3"**: *Dent*
- **"4"**: *Glass Shatter*
- **"5"**: *Lamp Broken*

## Key Features πŸ”

- Accurate classification into six car damage categories.
- Seamless integration into various applications.
- Streamlined image processing with transformer-based architecture.

## Applications 🌐

This powerful car damage prediction model can be seamlessly integrated into various applications, such as:

- **Auto Insurance Claim Processing:** Streamline the assessment of car damage for faster claim processing.
- **Vehicle Inspection Services:** Enhance efficiency in vehicle inspection services by automating damage detection.
- **Used Car Marketplaces:** Provide detailed insights into the condition of used cars through automated damage analysis.

Feel free to explore and integrate this model into your applications for accurate car damage predictions! 🌟


## How to Use This Model πŸ€–

### Approach

### First Approach
```python
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}")
```
### Second Approach
```python
from transformers import pipeline
#Create a classification pipeline
pipe = pipeline("image-classification", model="beingamit99/car_damage_detection")
pipe(IMAGE)
```