😷 mask_person_v20260731 口罩辨識(person crop 版)實驗報告 🔬 實驗對照

cvat #46 辦公室口罩AI | 訓練 imgsz 384(方形 crop)| 推論 PGIE person det imgsz 1280 → 全身 crop → MobileNetV3-L binary|產出 2026-07-31

結論:以 person 全身 crop 辨識口罩,val AP=0.984(排序能力佳), 但 明顯弱於 face crop 版(#46 mask_exp AP≈1.0)。
原因:口罩是臉部小特徵,全身 crop 稀釋了臉部訊號 → prob 壓縮偏低(no 全 ≤0.03、yes 分兩群), thr=0.5 時 30 個戴口罩者漏 11(recall 63%)。face crop 直接對準臉,幾乎完美分離。
👉 口罩辨識應走 face crop(mask_exp);此 person 版留作對照,驗證「小特徵屬性不宜用全身 crop」(同 fall 用方形 crop、口罩用 face crop 的道理)。

做法

訓練資料(cvat#46 person crop)

split沒戴 no戴 yes合計
train150150300
val303060
total180180360

unknown(3 個無 face 的 person)已排除。yes/no 完美平衡(pos_weight=1.000)。無獨立 test 集,val 數字偏樂觀,請以真人實測為準。

📈 訓練曲線

結果 & 誤報分析

指標person crop(本版)face crop(#46 mask_exp 對照)
val AP (mask)0.984≈1.00
thr=0.5 confusion (tp/fp/tn/fn)19 / 0 / 30 / 11近乎全對
thr=0.5 recall63%(漏 11/30)~100%
prob 分布壓縮偏低(no≤0.03, yes 雙峰)分離清楚

person crop 樣本

戴口罩 yes
沒戴 no

部署

ppe-demo-4t register key mask_person_exp(🔬 實驗對照,person det PGIE 1280→全身 crop→mask)。不切換 production,由同事決定。

⬇ best.pt (R2)