feat(detect): add gated self-trained segmentation candidate v1.097 Incremental rollout of the in-house document segmentation model trained this session (TinyUNet, ~2MB ONNX). It runs alongside DocAligner as one more candidate, never replacing it, so it can only help. - DocSegDetector: ONNX inference (128px) -> sigmoid mask -> gated quad. The gate rejects over-segmented/noisy masks (positive ratio outside 5-80%, largest-contour solidity < 0.80, or area < 4%), returning null so a bad mask never becomes a candidate. Reused morphology kernels (no per-call Mat leak); session/env are @Volatile. - CornerCandidates: when DocSeg is ready and passes the gate, its quad is edge-snapped and added as "AI 영역 검출"; rankByEdgeSupport then picks the best candidate by real paper-boundary support, so a weak DocSeg quad loses to a clean DocAligner one — a structural safety net. - ClearCamApp inits DocSegDetector in the background with the other models. Known limitation (honest): on synthetic val IoU is 0.957, and it cleanly segments daytime documents on dashboards/desks, but the hardest cases that motivated this (night + in-hand + truck background, patterned cloth, on-screen) still over-segment, so the gate usually rejects them there and the app falls back to current behavior — no regression, marginal gain until more hard-case data is trained. Training pipeline + resume guide are preserved (~/clearcam-ai-spike/docseg/RESUME.md) for the next round. Constraint: DocSeg is additive and gated; existing candidates are never removed; edge-support ranking is the final arbiter. Confidence: high (safety) / medium (hard-case quality) Scope-risk: module Reversibility: trivial (remove the candidate block + asset) Directive: collect night/in-hand/patterned/on-screen photos, resume training, re-evaluate, then this candidate starts winning the hard cases. Tested: assembleDebug + testDebugUnitTest exit=0 (22 tests); ONNX parity vs torch verified; reviewer pass after fixing kernel-Mat leak and @Volatile. Not-tested: on-device end-to-end detection with the new candidate. Related: docseg-training memory, RESUME.md 🐙 Autopus