卡片缺陷检测

AnlaAnla 89631f2117 增加外框外的缺陷过滤 1 hafta önce
Model 89631f2117 增加外框外的缺陷过滤 1 hafta önce
Test e971bbc13e 分数配置修改, 同时修改配套代码 2 hafta önce
app 89631f2117 增加外框外的缺陷过滤 1 hafta önce
README.MD e971bbc13e 分数配置修改, 同时修改配套代码 2 hafta önce
run_defect_score_server.py 9ad5fbfe46 修改启动文件名称 1 ay önce

README.MD

启动

python run_defect_score_server.py

中文对照

{
  "face": "面",
  "wear": "磨损",
  "scratch": "划痕",
  "stain": "污渍",
  "scuff": "磨痕",
  "impact": "撞击痕迹",
  "damaged": "损坏",
  "wear_and_impact": "磨损和撞击痕迹",
  "pit": "凹坑",
  "corner": "角",
  "wear_and_stain": "磨损和污渍",
  "inner_box": "内框",
  "outer_box": "外框"
}

缺陷类型

面缺陷: "1": "wear", "2": "scratch", "3": "stain",
        "4": "scuff", "5": "impact", "6": "damaged",
        "7": "wear_and_impact", "8": "pit"
    
边角缺陷: "1": "wear", "2": "wear_and_impact", "3": "damaged",
         "4": "impact", "5": "wear_and_stain"

缺陷划分

边角
wear_area: 'wear', 'wear_and_impact', 'wear_and_stain'
loss_area: 'impact', 'damaged'

面
wear_area: 'wear', 'wear_and_impact', 'damaged'
scratch_length: 'scratch', 'scuff'
pit_area: 'pit', 'impact'
stain_area: 'stain'

分数配置信息备注

base_score: 基础分数

corner: 角
    rule: 分数规则
        wear_area:"磨损的扣分规则"
        loss_area: "缺失的扣分规则"
    front_weights: "正面的权重分配"
        wear_area:"-权重"
        loss_area:"-权重"
    back_weights: "背面的权重分配"
        ...
        ...
    final_weights: "最终权重分配"
        front: "正面权重"
        back: "背面权重"

edge: 边
    ...与 corner 类似
    
face: 面
    rule: 分数规则
        wear_area: 磨损
        pit_area: 凹坑
        stain_area: 污渍
        scratch_length: 划痕长度(!注意只有它看长度, 其他的看面积)
    coefficients: 权重分配
        ...这里是几种缺陷对应的权重
    final_weights: "最终权重分配"
        ...

centering: 居中
    front: 正面
        rules: 规则
    coefficients: 权重分配
        horizontal: 水平
        vertical: 上下
    back: 背面
        ...
    final_weights: "最终权重分配"
        ...

card: 卡片
    PSA: 卡的类型, 默认用它
        ...不同类型的权重最后分配

分数规则要求

规则为: min<=缺陷面积<max , 扣 deduction 的分数

要求

  1. 第一个 min 必须为 0
  2. 除第一个min, 所有min必须等于上一个的max
  3. 最后一个的max必须为 "inf", 即无穷大

    "wear_area": [
        {
          "min": 0, 
          "max": 0.05,
          "deduction": -0.1
        },
        {
          "min": 0.05,
          "max": 0.1,
          "deduction": -0.5
        },
        {
          "min": 0.1,
          "max": 0.25,
          "deduction": -1.5
        },
        {
          "min": 0.25,
          "max": 0.5,
          "deduction": -3
        },
        {
          "min": 0.5,
          "max": "inf",
          "deduction": -5
        }