reidddd commited on
Commit
3fc1b98
·
1 Parent(s): c46e667

updated roboflow model to improve accuracy

Browse files
Files changed (1) hide show
  1. app.py +12 -48
app.py CHANGED
@@ -143,53 +143,17 @@ def fetchImage():
143
 
144
  # Define a repair cost dictionary (per part)
145
  repair_costs = {
146
- "Car-Damage-Detection-1KxY": 1000, # General damage assessment cost
147
- "Bodypanel-Dent": 200*2,
148
- "Front-Windscreen-Damage": 400,
149
- "Headlight-Damage": 250*2*2,
150
- "Rear-windscreen-Damage": 350,
151
- "RunningBoard-Dent": 150,
152
- "Sidemirror-Damage": 180*2,
153
- "Signlight-Damage": 120*2,
154
- "Taillight-Damage": 220*2,
155
- "back-bumper": 500,
156
- "back-glass": 400,
157
- "bonnet-dent": 300,
158
- "boot-dent": 350,
159
- "broken_lamp": 100*2*2,
160
- "crack": 250*2*2,
161
- "damaged-door": 600,
162
- "damaged-front-bumper": 550,
163
- "damaged-head-light": 270*2,
164
- "damaged-hood": 500,
165
- "damaged-rear-bumper": 520,
166
- "damaged-rear-window": 380*2,
167
- "damaged-tail-light": 230*2,
168
- "damaged-trunk": 600,
169
- "damaged-window": 280*2*2,
170
- "damaged-windscreen": 450,
171
- "dent": 200*2,
172
- "dent-or-scratch": 180*2,
173
- "door": 700,
174
- "doorouter-dent": 250,
175
- "fender-dent": 220*2,
176
- "flat_tire": 100*2*2,
177
- "front-bumper": 500,
178
- "front-bumper-dent": 450,
179
- "front-glass": 400,
180
- "headlight": 250*2,
181
- "hood": 500,
182
- "mirror": 180*2*2,
183
- "pillar-dent": 220*2,
184
- "quaterpanel-dent": 270,
185
- "rear-bumper-dent": 480,
186
- "roof-dent": 400,
187
- "scratch": 150,
188
- "shattered_glass": 500,
189
- "taillight": 220*2,
190
- "trunk": 600,
191
- "wheel": 250*2,
192
- "window": 300,
193
  }
194
 
195
  total_cost = 0
@@ -267,7 +231,7 @@ def fetchImage():
267
  custom_configuration = InferenceConfiguration(confidence_threshold=0.7)
268
  with CLIENT.use_configuration(custom_configuration):
269
  result = CLIENT.infer(
270
- file_name, model_id="car-damage-detection-krsix/1")
271
  print(result)
272
  threshold = 0.3 # Adjust this as needed
273
  filtered_labels = [item
 
143
 
144
  # Define a repair cost dictionary (per part)
145
  repair_costs = {
146
+ "damage-front-windscreen": 950,
147
+ "damaged-door": 720,
148
+ "damaged-fender": 680,
149
+ "damaged-front-bumper": 890,
150
+ "damaged-head-light": 530,
151
+ "damaged-hood": 970,
152
+ "damaged-rear-bumper": 910,
153
+ "damaged-rear-window": 760,
154
+ "damaged-side-window": 780,
155
+ "damaged-tail-light": 550,
156
+ "quaterpanel-dent": 640
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
 
159
  total_cost = 0
 
231
  custom_configuration = InferenceConfiguration(confidence_threshold=0.7)
232
  with CLIENT.use_configuration(custom_configuration):
233
  result = CLIENT.infer(
234
+ file_name, model_id="car-recognition-v4/4")
235
  print(result)
236
  threshold = 0.3 # Adjust this as needed
237
  filtered_labels = [item