Update README.md
Browse files
README.md
CHANGED
@@ -7,22 +7,17 @@ base_model:
|
|
7 |
- Ultralytics/YOLO11
|
8 |
pipeline_tag: image-segmentation
|
9 |
---
|
10 |
-
# Car Damage Segmentation YOLOv11
|
11 |
|
12 |
-
|
13 |
-
This model is a fine-tuned YOLOv11-seg specifically optimized for vehicle damage segmentation. It can accurately detect and segment various types of vehicle damage using the CarDD dataset.
|
14 |
|
15 |
## Model Details
|
16 |
-
|
17 |
-
- **
|
18 |
-
- **
|
19 |
-
- **
|
20 |
-
|
21 |
-
|
22 |
-
- glass shatter
|
23 |
-
- lamp broken
|
24 |
-
- scratch
|
25 |
-
- tire flat
|
26 |
|
27 |
## Performance Metrics
|
28 |
|
@@ -32,16 +27,6 @@ This model is a fine-tuned YOLOv11-seg specifically optimized for vehicle damage
|
|
32 |
| Box | 0.753 | 0.689 | 0.734 | 0.513 |
|
33 |
| Mask | 0.762 | 0.692 | 0.735 | 0.503 |
|
34 |
|
35 |
-
### Class-Specific Performance (Box Detection)
|
36 |
-
| Class | Precision | Recall | mAP50 | mAP50-95 |
|
37 |
-
|---------------|-----------|--------|-------|----------|
|
38 |
-
| crack | 0.649 | 0.362 | 0.452 | 0.249 |
|
39 |
-
| dent | 0.607 | 0.524 | 0.565 | 0.324 |
|
40 |
-
| glass shatter | 0.879 | 1.000 | 0.986 | 0.656 |
|
41 |
-
| lamp broken | 0.749 | 0.816 | 0.838 | 0.639 |
|
42 |
-
| scratch | 0.673 | 0.563 | 0.595 | 0.327 |
|
43 |
-
| tire flat | 0.958 | 0.871 | 0.971 | 0.880 |
|
44 |
-
|
45 |
### Class-Specific Performance (Mask Segmentation)
|
46 |
| Class | Precision | Recall | mAP50 | mAP50-95 |
|
47 |
|---------------|-----------|--------|-------|----------|
|
@@ -52,67 +37,92 @@ This model is a fine-tuned YOLOv11-seg specifically optimized for vehicle damage
|
|
52 |
| scratch | 0.684 | 0.560 | 0.589 | 0.284 |
|
53 |
| tire flat | 0.958 | 0.869 | 0.971 | 0.891 |
|
54 |
|
55 |
-
|
56 |
-
- **Images**: 571
|
57 |
-
- **Instances**: 1247
|
58 |
-
- **Instance Distribution**:
|
59 |
-
- crack: 152
|
60 |
-
- dent: 366
|
61 |
-
- glass shatter: 91
|
62 |
-
- lamp broken: 103
|
63 |
-
- scratch: 482
|
64 |
-
- tire flat: 53
|
65 |
-
|
66 |
-
## Training Configuration
|
67 |
-
```yaml
|
68 |
-
batch: 24
|
69 |
-
imgsz: 1280
|
70 |
-
epochs: 300
|
71 |
-
patience: 15
|
72 |
-
workers: 16
|
73 |
-
device: cuda
|
74 |
-
cache: True
|
75 |
-
amp: True
|
76 |
-
overlap_mask: True
|
77 |
-
warmup_epochs: 3
|
78 |
-
mosaic: 1.0
|
79 |
-
mixup: 0.1
|
80 |
-
copy_paste: 0.1
|
81 |
-
```
|
82 |
|
83 |
-
|
|
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
```
|
89 |
|
90 |
-
###
|
91 |
-
```python
|
92 |
-
from ultralytics import YOLO
|
93 |
|
94 |
-
|
95 |
-
model = YOLO('best.pt')
|
96 |
|
97 |
-
|
98 |
-
results = model('path/to/car/image.jpg')
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
-
|
107 |
-
- Excellent performance on glass shatter (98.6% mAP50) and tire flat (97.1% mAP50)
|
108 |
-
- Good balance between precision and recall for most damage types
|
109 |
-
- High-quality segmentation masks, particularly for well-defined damage types
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
## License
|
118 |
-
|
|
|
|
7 |
- Ultralytics/YOLO11
|
8 |
pipeline_tag: image-segmentation
|
9 |
---
|
10 |
+
# Car Damage Segmentation Model (YOLOv11-seg)
|
11 |
|
12 |
+
This model detects and segments six types of vehicle damage: cracks, dents, glass shatter, broken lamps, scratches, and flat tires. Fine-tuned on the CarDD dataset, it provides precise damage localization and segmentation to support vehicle inspection and repair estimation.
|
|
|
13 |
|
14 |
## Model Details
|
15 |
+
|
16 |
+
- **Architecture**: YOLOv11-seg
|
17 |
+
- **Base Model**: yolo11x-seg.pt
|
18 |
+
- **Task**: Instance Segmentation
|
19 |
+
- **Domain**: Automotive Damage Assessment
|
20 |
+
- **Framework**: Ultralytics YOLOv11
|
|
|
|
|
|
|
|
|
21 |
|
22 |
## Performance Metrics
|
23 |
|
|
|
27 |
| Box | 0.753 | 0.689 | 0.734 | 0.513 |
|
28 |
| Mask | 0.762 | 0.692 | 0.735 | 0.503 |
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
### Class-Specific Performance (Mask Segmentation)
|
31 |
| Class | Precision | Recall | mAP50 | mAP50-95 |
|
32 |
|---------------|-----------|--------|-------|----------|
|
|
|
37 |
| scratch | 0.684 | 0.560 | 0.589 | 0.284 |
|
38 |
| tire flat | 0.958 | 0.869 | 0.971 | 0.891 |
|
39 |
|
40 |
+
## Training Recipe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
+
```python
|
43 |
+
from ultralytics import YOLO
|
44 |
|
45 |
+
model = YOLO('yolo11x-seg.pt')
|
46 |
+
|
47 |
+
model.train(
|
48 |
+
data='path/to/dataset.yaml',
|
49 |
+
epochs=300,
|
50 |
+
batch=16,
|
51 |
+
imgsz=1024,
|
52 |
+
dropout=0.1,
|
53 |
+
multi_scale=True,
|
54 |
+
val=True,
|
55 |
+
patience=25,
|
56 |
+
optimizer='AdamW',
|
57 |
+
cls=0.3, # Reduced to prioritize boundary precision over classification
|
58 |
+
dfl=1.7, # Increased for better damage boundary delineation
|
59 |
+
lr0=0.0001,
|
60 |
+
lrf=0.01,
|
61 |
+
warmup_epochs=10, # Extended warmup for complex damage patterns
|
62 |
+
mosaic=1.0,
|
63 |
+
mixup=0.1,
|
64 |
+
copy_paste=0.1,
|
65 |
+
hsv_h=0.015,
|
66 |
+
hsv_s=0.7,
|
67 |
+
hsv_v=0.4,
|
68 |
+
cos_lr=True,
|
69 |
+
amp=True,
|
70 |
+
overlap_mask=True # Better segmentation for irregular damage shapes
|
71 |
+
)
|
72 |
```
|
73 |
|
74 |
+
### Training Recipe for Car Damage Segmentation
|
|
|
|
|
75 |
|
76 |
+
- `imgsz=1024`: Higher resolution critical for detecting small damage features like fine cracks and scratches
|
|
|
77 |
|
78 |
+
- `optimizer='AdamW'`: Provides better convergence for fine-grained segmentation tasks compared to SGD
|
|
|
79 |
|
80 |
+
- `dropout=0.1`: Light regularization prevents overfitting while preserving ability to detect subtle damage features
|
81 |
+
|
82 |
+
- `multi_scale=True`: Enhances model robustness to different damage sizes and viewing distances
|
83 |
+
|
84 |
+
- `warmup_epochs=10`: Extended warmup period stabilizes early training on complex damage patterns
|
85 |
+
|
86 |
+
- `overlap_mask=True`: Improves segmentation quality for irregular damage shapes with complex boundaries
|
87 |
+
|
88 |
+
|
89 |
+
##### `cls=0.3`
|
90 |
|
91 |
+
• Reduced classification weight prioritizes boundary precision over class distinction
|
|
|
|
|
|
|
92 |
|
93 |
+
• Similar visual appearance between damage types (scratches vs. cracks)
|
94 |
+
|
95 |
+
• Prevents overfitting to specific damage classes
|
96 |
+
|
97 |
+
• Improves localization and segmentation accuracy
|
98 |
+
|
99 |
+
##### `dfl=1.7`
|
100 |
+
|
101 |
+
• Increased DFL for better segmentation of irregular damage boundaries
|
102 |
+
|
103 |
+
• Addresses complex boundaries of car damage shapes
|
104 |
+
|
105 |
+
• Improves bounding box precision
|
106 |
+
|
107 |
+
• Effective for elongated damages like scratches
|
108 |
+
|
109 |
+
|
110 |
+
## Dataset
|
111 |
+
|
112 |
+
The model was trained on the CarDD (Car Damage Detection) dataset with:
|
113 |
+
- 571 images
|
114 |
+
- 1247 total damage instances
|
115 |
+
- Class distribution: scratches (482), dents (366), cracks (152), broken lamps (103), glass shatter (91), and flat tires (53)
|
116 |
+
|
117 |
+
## Usage
|
118 |
+
|
119 |
+
## Limitations
|
120 |
+
|
121 |
+
- Lower recall for crack detection (36.8%)
|
122 |
+
- Performance varies across damage types
|
123 |
+
- Small or fine damages may be missed
|
124 |
+
- Best results with well-lit, clear images of vehicles
|
125 |
|
126 |
## License
|
127 |
+
|
128 |
+
Since this model was trained using Ultralytics, it falls under the AGPL-3.0 License.
|