|
@@ -105,6 +105,7 @@ class CardScorer:
|
|
|
# 对于划痕取长度, 其他取面积
|
|
# 对于划痕取长度, 其他取面积
|
|
|
if defect_type == "scratch_length":
|
|
if defect_type == "scratch_length":
|
|
|
area_mm = max(defect['width'], defect['height'])
|
|
area_mm = max(defect['width'], defect['height'])
|
|
|
|
|
+ defect['scratch_length'] = area_mm
|
|
|
else:
|
|
else:
|
|
|
area_mm = defect['actual_area']
|
|
area_mm = defect['actual_area']
|
|
|
# 累加所有同类型缺陷的扣分
|
|
# 累加所有同类型缺陷的扣分
|