📦 模型下載https://pub-478929a98a5c440cb22c2241c0bde314.r2.dev/door_state_v20260515/best.pt

door_state_v20260515 — hatch_swa stack (2 binary heads + SWA-4)

cvat2 #11 image-level tag。Schema 從 4-class softmax 改成 2 binary heads (has_open / has_close)。
unknown 在 manifest build 階段過濾。ppe-demo HatchHandler hot-swap 即可上線。

State → (has_open, has_close):

三版對照

door_v20260511 (4-class softmax)door_v20260515 best.ptdoor_v20260515 SWA-4
schema4-class softmax (unknown/open/closed/mixed)2 binary heads2 binary heads
backboneMobileNetV3-L 224MobileNetV3-L 384MobileNetV3-L 384
test accuracy0.8366
test mAP (active heads)0.99390.9806
test macro F10.5815*0.96070.9645
ckpt schema4-class softmax (handler 不相容)HatchHandler 相容HatchHandler 相容
ckpt thresholdsnoneper-attr val-best F1per-attr val-best F1

* v20260511 macro_f1 0.5815 包含 unknown=0 support 拖累;active 3 class mean F1 0.775。

Per-attr metrics (test set)

attrbest.ptSWA-4
APF1PRthrvalid APF1PRthr
has_open0.99670.97420.97500.97340.73316420.99840.99240.99040.99440.313
has_close0.99110.94720.96120.93350.91416420.96280.93660.90900.96600.005

Training history

eptrain_lossval_mAPval_macroF1val_open_APval_close_AP
10.50410.95550.91500.9140.996
20.08130.99380.96490.9881.000
30.02330.98750.95700.9751.000
40.01640.98340.95470.9690.998
50.01170.99200.97880.9841.000
60.00550.96220.96060.9270.998
70.00810.98400.96470.9690.999
80.00710.96440.96140.9290.999
90.00280.99260.97700.9861.000
100.00560.98000.96480.9620.998
110.00390.97370.96810.9481.000
120.00180.99090.97420.9820.999
130.00130.99270.97790.9860.999
140.00210.99370.97590.9881.000
150.00110.97520.96900.9511.000
160.00110.98130.96870.9630.999
170.00090.98630.97000.9730.999
180.00070.98530.97020.9710.999
190.00180.98310.97120.9670.999
200.00060.97550.96840.9520.999

Sample inference (test, 4 per state,SWA-4 + val-thr)

truth=open pred=unknown/? open=100% close=0% thr_open=1.00 thr_close=0.18
truth=open pred=unknown/? open=100% close=0% thr_open=1.00 thr_close=0.18
truth=open pred=unknown/? open=100% close=0% thr_open=1.00 thr_close=0.18
truth=open pred=unknown/? open=100% close=0% thr_open=1.00 thr_close=0.18
truth=closed pred=closed open=0% close=100% thr_open=1.00 thr_close=0.18
truth=closed pred=closed open=0% close=100% thr_open=1.00 thr_close=0.18
truth=closed pred=closed open=0% close=100% thr_open=1.00 thr_close=0.18
truth=closed pred=closed open=0% close=100% thr_open=1.00 thr_close=0.18
truth=mixed pred=closed open=100% close=100% thr_open=1.00 thr_close=0.18
truth=mixed pred=closed open=100% close=100% thr_open=1.00 thr_close=0.18
truth=mixed pred=closed open=100% close=100% thr_open=1.00 thr_close=0.18
truth=mixed pred=closed open=71% close=100% thr_open=1.00 thr_close=0.18

FP audit — top-8 最自信錯判(sampled 300)

truth=mixed → pred=closed open=100% close=100%
truth=mixed → pred=closed open=100% close=100%
truth=mixed → pred=closed open=100% close=100%
truth=mixed → pred=closed open=100% close=100%
truth=mixed → pred=closed open=100% close=100%
truth=mixed → pred=closed open=100% close=100%
truth=mixed → pred=closed open=100% close=100%
truth=mixed → pred=closed open=100% close=100%

Config

{
  "version": "v20260515",
  "backbone_name": "mobilenetv3_large_100.ra_in1k",
  "arch": "MobileNetV3-L 2 binary heads (has_open/has_close), partial-label BCE, hatch_swa stack, SWA-4",
  "params_M": 4.204594,
  "feat_dim": 1280,
  "attrs": [
    "has_open",
    "has_close"
  ],
  "img_size": 384,
  "best_val_mAP": 0.993847131190981,
  "best_epoch": 2,
  "epochs_run": 20,
  "total_train_time_s": 495.99095845222473,
  "test_metrics_best": {
    "mAP": 0.993896870987621,
    "macro_f1": 0.9606927842247622,
    "per_attr": {
      "has_open": {
        "ap": 0.9967186921084682,
        "f1": 0.9742143432715552,
        "p": 0.975,
        "r": 0.9734299516908212,
        "thr": 0.73291015625,
        "n": 1242,
        "valid": 1642,
        "tp": 1209,
        "fp": 31,
        "fn": 33
      },
      "has_close": {
        "ap": 0.991075049866774,
        "f1": 0.9471712251779693,
        "p": 0.9612167300380228,
        "r": 0.9335302806499262,
        "thr": 0.9140625,
        "n": 1354,
        "valid": 1642,
        "tp": 1264,
        "fp": 51,
        "fn": 90
      }
    }
  },
  "test_metrics_swa": {
    "mAP": 0.9806083384001334,
    "macro_f1": 0.9644968473528424,
    "per_attr": {
      "has_open": {
        "ap": 0.9984425119276941,
        "f1": 0.9923664122137404,
        "p": 0.9903769045709703,
        "r": 0.9943639291465378,
        "thr": 0.31298828125,
        "n": 1242,
        "valid": 1642,
        "tp": 1235,
        "fp": 12,
        "fn": 7
      },
      "has_close": {
        "ap": 0.9627741648725727,
        "f1": 0.9366272824919442,
        "p": 0.9089645587213343,
        "r": 0.96602658788774,
        "thr": 0.005489349365234375,
        "n": 1354,
        "valid": 1642,
        "tp": 1308,
        "fp": 131,
        "fn": 46
      }
    }
  },
  "val_metrics_swa": {
    "mAP": 0.9829408931150647,
    "macro_f1": 0.9705861404390816,
    "per_attr": {
      "has_open": {
        "ap": 0.9665191589075289,
        "f1": 0.9520697167755992,
        "p": 0.9700332963374029,
        "r": 0.9347593582887701,
        "thr": 1.0,
        "n": 935,
        "valid": 1972,
        "tp": 874,
        "fp": 27,
        "fn": 61
      },
      "has_close": {
        "ap": 0.9993626273226005,
        "f1": 0.9891025641025641,
        "p": 0.9993523316062176,
        "r": 0.9790609137055838,
        "thr": 0.1759033203125,
        "n": 1576,
        "valid": 1972,
        "tp": 1543,
        "fp": 1,
        "fn": 33
      }
    }
  },
  "swa_n": 4,
  "swa_source_ckpts": [
    "ep17.pt",
    "ep18.pt",
    "ep19.pt",
    "ep20.pt"
  ],
  "hyperparams": {
    "batch": 64,
    "epochs": 20,
    "lr": 0.0003,
    "wd": 0.01,
    "patience": 20,
    "img_size": 384,
    "aug": "cam_erase",
    "sampler": "weighted",
    "loss": "bce",
    "focal_gamma": 2.0
  }
}