Dirner commited on
Commit
b672a25
·
verified ·
1 Parent(s): f9beba5

Upload 4 files

Browse files
Files changed (2) hide show
  1. ocr_response.py +2 -0
  2. wmi.py +7 -1
ocr_response.py CHANGED
@@ -46,6 +46,7 @@ def public_candidate(candidate):
46
  "source_chunk": candidate.get("source_chunk", ""),
47
  "context_score": candidate.get("context_score", 0),
48
  "vag_code": candidate.get("vag_code"),
 
49
  "reasons": candidate.get("reasons", []),
50
  }
51
 
@@ -171,6 +172,7 @@ def build_response(best, candidates, passes_used, started_at, image_debug):
171
  "score": best["score"],
172
  "vehicle_type": vehicle_type,
173
  "vag_code": best.get("vag_code"),
 
174
  **notice,
175
  "warning": get_warning(confidence if ok else "none"),
176
  "debug": {
 
46
  "source_chunk": candidate.get("source_chunk", ""),
47
  "context_score": candidate.get("context_score", 0),
48
  "vag_code": candidate.get("vag_code"),
49
+ "opel_code": candidate.get("opel_code"),
50
  "reasons": candidate.get("reasons", []),
51
  }
52
 
 
172
  "score": best["score"],
173
  "vehicle_type": vehicle_type,
174
  "vag_code": best.get("vag_code"),
175
+ "opel_code": best.get("opel_code"),
176
  **notice,
177
  "warning": get_warning(confidence if ok else "none"),
178
  "debug": {
wmi.py CHANGED
@@ -12,7 +12,7 @@ COMMON_PASSENGER_WMI = {
12
  "XW7": 55, # Toyota Russia
13
  "XW8": 45, # Volkswagen Russia
14
  "XWE": 45, # Hyundai/Kia local
15
- "XWF": 45,
16
  "XWW": 40,
17
  "XWZ": 25,
18
  "X7L": 35, # Renault Russia / local assembly patterns
@@ -62,7 +62,13 @@ COMMON_PASSENGER_WMI = {
62
  "ZFF": 30, # Ferrari
63
  "ZHW": 30, # Lamborghini
64
  "W0L": 40, # Opel
 
 
65
  "XUF": 30, # Opel / local assembly patterns
 
 
 
 
66
 
67
  # Japan / Asia passenger
68
  "JTD": 45, # Toyota
 
12
  "XW7": 55, # Toyota Russia
13
  "XW8": 45, # Volkswagen Russia
14
  "XWE": 45, # Hyundai/Kia local
15
+ "XWF": 45, # Opel Russia / Kaliningrad
16
  "XWW": 40,
17
  "XWZ": 25,
18
  "X7L": 35, # Renault Russia / local assembly patterns
 
62
  "ZFF": 30, # Ferrari
63
  "ZHW": 30, # Lamborghini
64
  "W0L": 40, # Opel
65
+ "WOL": 35, # Opel, common OCR/reference confusion with W0L
66
+ "VSX": 35, # Opel / Spain
67
  "XUF": 30, # Opel / local assembly patterns
68
+ "SKF": 25, # Opel / UK practical layer
69
+ "VN1": 25, # Opel / France practical layer
70
+ "4GD": 25, # Opel Sintra practical layer
71
+ "Y6D": 20, # Opel / Ukraine practical layer
72
 
73
  # Japan / Asia passenger
74
  "JTD": 45, # Toyota