@echo off REM ============================================================ REM FAR-ZONE DETECTION PROBE (28/08/2026) -- step P of design REM doc 7_FarZone_Detection_BallID.md section 3.1, BRIEF 28/08. REM REM Why this run happens: REM Three errors Danh reported on the packaged demo a1cd87e8 REM share one root -- the detector loses balls at the FAR end REM of the table. The camera decoded from that demo's own REM homography (h = 2.363 m, f = 2155 px) puts a ball at 22 px REM on the far rail of a 1920x1080 frame, which imgsz=640 REM shrinks to about 7 px. This run MEASURES how much REM resolution buys back, on the very frames that failed. It REM CHOOSES NOTHING: the decision rule is section 3.1 of the REM design doc and Cowork applies it after reading the numbers. REM REM Same two inputs as run A2b (14/08), run C (24/08), the CPU REM rebaseline (25/08) and the three multi-ball rounds (27-28/08): REM VOD rack_5245_5805.mp4 (Florida Open, 52:45-58:05) REM corners [[527.5,869.7],[1380.1,864.0], REM [1232.3,278.5],[673.0,272.8]] REM CPU environment: poolcoach-cv-env carries torch 2.12.1+cpu, REM so there is no CUDA to fall back to; POOLCOACH_CV_DEVICE=cpu REM states it anyway. The cost column is only comparable inside REM one run on one machine -- it is a RATIO to the 640 baseline REM that section 3.1 reads, not an absolute. REM REM Acceptance gate (BRIEF 28/08, step P) -- the driver reports REM it, it does not "pass" or "fail" a configuration: REM - negative control: full640 must REPRODUCE the miss of REM ball 5 on shot_02 frame 0 (best conf < OP_CONF 0.2993), REM and the reproduction check must rebuild the demo's own REM balls_init entry for entry -- if the probe is not looking REM at the image the demo looked at, no number below counts; REM - 4 configurations x the target frames, plus the rack case REM (shot_09 + shot_10, iou {0.5/0.7/0.9} x imgsz {640/1280}); REM - confidence logged BEFORE and AFTER the IN_TOL_M bounds REM gate in separate columns, so "the gate ate the ball in REM the pocket mouth" is ruled out by measurement; REM - CPU ms/frame per configuration. REM REM D:\Khoa luan is a READ-ONLY archive. The driver fingerprints REM every file under it (size + mtime) before and after the run REM and refuses to end green if one byte moved. REM REM No app and no Redis has to be running: the probe loads YOLO REM itself and imports scripts\cv_worker.py only for cut_clip, REM clip_frame_wh and comp_homography_cls -- the SHIPPED clip cut REM and the SHIPPED height-compensated homography, not a copy. REM ============================================================ setlocal set PYTHONUTF8=1 set PYTHONDONTWRITEBYTECODE=1 set POOLCOACH_CV_DEVICE=cpu set POOLCOACH_APP_ROOT=D:\poolcoach\poolcoach-app set POOLCOACH_PROBE_OUT=D:\poolcoach\out_probe_farzone_20260828 set POOLCOACH_PROBE_BUNDLE=D:\poolcoach\poolcoach-app\app\demo_analyzer\a1cd87e813de422a868ae8eedf9c4969 set POOLCOACH_PROBE_VOD=D:\Khoa luan\poolcoach-rl\datasets\bb9_pilot\rack_a1\rack_5245_5805.mp4 set POOLCOACH_ARCHIVE_ROOT=D:\Khoa luan set PY=D:\poolcoach\poolcoach-cv-env\Scripts\python.exe if not exist "%POOLCOACH_PROBE_OUT%" mkdir "%POOLCOACH_PROBE_OUT%" "%PY%" "D:\poolcoach\launchers\probe_farzone_det.py" echo [probe-farzone] exit code %ERRORLEVEL% endlocal