move_detect/docs/INDEX.md
유창욱 6b69f22275 feat(data-asset): labeled-dataset export + improvement-action effect tracking
The operator's daily clicks become durable assets:

Label export (GET /api/export/labels?days=N, JSONL download):
- Every 확인/오탐 click is a human verdict on a detection, and each verdict
  carries a blurred 3-frame evidence timeline. The export turns that into a
  dataset: one JSON line per event with type/severity/camera/zone/metrics/
  spatial, label (confirmed | false_positive | unreviewed), labeled_by, and
  snapshot uuids (images fetched via /snap, which re-checks session + site).
  ergo_report rows are excluded - statistics are not labelable detections.
- Admin-only ('manage_compliance'): bulk export of detection history is a
  compliance decision, not an operator convenience. Site scope applies.
- This is where the deferred P1-C evaluation set will come from for free.

Improvement actions (move_actions + GET/POST /api/actions):
- Record a site fix against a camera ("미끄럼 방지 매트 설치"); the report's
  new card compares detection density over EQUAL windows before/after the
  fix (capped 30d; under 3 days shows "측정 중" - two days of data is noise,
  not a verdict). Improvement shows accent, worsening shows red - the card
  reports honestly in both directions, which is exactly what makes the
  improvement numbers credible.
- Future timestamps and >1y-old entries are rejected (the comparison could
  not be fair). Recording needs edit_zones + CSRF.

Verified: PHPUnit 145 pass (5 new: export perm gate + line shape/labels/
snapshot join, action validation, equal-window effect math, pending state)
+ Chrome real-render (action card with better/worse/pending rows, export
link, no console errors).
2026-08-07 07:44:00 +09:00

3.6 KiB

INDEX — 작업 기록 (완료 결과만)

  • 2026-08-07 데이터 활용 5안 중 4안 구현: ②시간패턴 히트맵+전조 급증 경보 ③KPI 전기간 추이(d8b8e1f) ①라벨 JSONL 익스포트(/api/export/labels, 관리자) ④개선 조치 기록·전후 효과 비교(move_actions, 동일 창 비교, 3일 미만 "측정 중"). ⑤멀티사이트 벤치마크는 다현장 이후(사이트 스코프 구조가 이미 수용). PHPUnit 145 + Chrome 실렌더.

  • 2026-08-07 증거 타임라인 + 24시간 캐치업: 이벤트 스냅샷이 링버퍼 기반 과거→발생 3장(프레임별 자기 시점 얼굴 블러, P1-B 잔여 종결), 상세뷰 이전/직전/발생 캡션. 콘솔 첫 진입 '지난 24시간' 요약 배너(/api/report?days=1 재사용, 리포트 링크). pytest 235/ PHPUnit 138 + Chrome 실렌더.

  • 2026-08-07 안전 운영 리포트 /report (주간 안전회의용 인쇄 가능 한 장: 중대 이벤트· TTA(FP 제외)·니어미스 피라미드·오탐율·유형/카메라 순위·인체공학 노출·존 규칙 위반) + 이벤트 스트림 유형 필터. PHPUnit 138 + Chrome 실렌더(KPI/바리스트/타일/필터).

  • 2026-08-06 인체공학 자세부담 스코어링 (ergo_report/INFO, 카메라 단위 익명·스냅샷 미부착): REBA 밴드 노출시간(허리 20~60°/60°+·팔 90°+·웅크림<110°), 사고 상태 트랙 제외, 검출 공백 dt 상한. 상세뷰 지표 한글 렌더 — b358822. pytest 232/PHPUnit 135 + 실렌더.

  • 2026-08-06 납품 번들 재생성: dist/1_cafe24_upload + move-detect-cafe24.zip (마이그레이션 5종 동봉 — 빌드 스크립트에 staging 추가) · dist/2_pi_install --cross 재빌드 (aarch64/cp311 휠 11종 + HEF 다이제스트 검증 + SHA256SUMS). FLAG: MoveNet ONNX 업스트림 URL 404 → 이번 Pi 번들은 Hailo 단독(CPU 폴백 모델 미포함). edge/tools/fetch_movenet.py의 소스 URL 갱신 필요.

  • 2026-08-06 오탐 피드백 (결정 a: 통계만, 자동 튜닝 없음): 이벤트 오탐 태그 (POST /events/{id}/false-positive, ack 겸함, 최초 태거 보존) + GET /api/fp-stats + 콘솔 오탐율 패널(30일, 30%+ 강조). PHPUnit 135 + Chrome 실렌더(태그→행 전환→패널 즉시 갱신).

  • 2026-08-06 대시보드 장치→카메라 트리 레일 + (device,camera) 쌍 카메라 필터 — eaff176. PHPUnit 119 통과 + Chrome 실렌더 검증(트리 상태·필터·접기·콘솔 무오류).

  • 2026-08-06 감사 잔여 P2-6/7/8 종결 (ID 스왑 게이트 · sustained-prone FALLING · stale 트랙 no-data) — 32f2237. TDD(RED 확인), pytest 203 통과/2 skip. → delivery-audit 오프하드웨어 항목 43/43 완료. 잔여는 실장비(OFF-HW) 검증뿐.

  • 2026-08-06 연속성 문서 신설: CLAUDE.md · docs/PROJECT_MAP.md · 본 INDEX.

  • 2026-08-06 니어미스 히트맵: near_fall(FALLING→확정 전 회복, INFO) + 전 트랙 이벤트에 정규화 발좌표(spatial) 부착 → move_events.spatial_x/y 적재 → GET /api/heatmap/{camera} → 존 편집기 '위험 히트맵' 오버레이. 직전 커밋의 chk_events_type 제약 누락(신규 타입 INSERT 거부) 마이그레이션으로 수정. pytest 222/PHPUnit 130 + Chrome 실렌더.

  • 2026-08-06 존 점유 규칙 엔진 (2인1조 lone_worker/HIGH · 정원 overcapacity · 체류상한 overstay): edge occupancy.py + move_zones.rules_json + 존 편집기 규칙 입력 + 이벤트 유형 한글 라벨. pytest 216/PHPUnit 123 통과 + Chrome 실렌더(편집기 저장·목록·콘솔 라벨).