# Direction failure assessment and correction

Updated October 18, 2026. **The Pika demo videos have been withdrawn.** The earlier
frame-count, timestamp and coarse quality checks did not establish plausible motion.

## What was verified

The user's observation was correct: cars and pedestrians could move backward or
alternate directions inside generated shots.

A production browser audit played every camera through all three clips and a full
loop. Allen, Baxter and Chrystie had 868, 867 and 867 clock samples respectively.
There were zero negative video-clock, decoded-frame-clock or within-clip source-clock
intervals. Only the normal end-of-sequence loop reset time. The reversal is in the
generated pixels, not the transport controls.

Anonymous short-lived image-corner checks found substantial backtracking inside Pika
spans, including an Allen example with about 13 pixels of reverse movement in a 640-pixel-wide preview, lasting
0.875 seconds. These are scene-pixel diagnostics, not person identification.

An 85-second native-feed experiment made 155 successful requests per camera.
Allen/Baxter/Chrystie returned 43/44/43 unique images, at approximately two-second
update intervals. Faster polling mostly returns duplicates. NYC's frontend also
uses a two-second image refresh with a timestamp query.

## Why the previous change was insufficient

Pika improved some silhouettes but invented trajectories between sparse observations.
A likely cause is reconciling different arrangements of similar small objects across
the endpoints. A natural departure and a different arrival can become one object
moving backward. A fixed-camera prompt does not resolve that ambiguity.

Static buildings dominate whole-frame similarity. The previous no_flags result
missed moving-object failures. It must not be used as a motion-quality certificate.

## Corrections now implemented

1. Remove every failed generative clip from the public catalog. Keep original and
   enhanced images intact. The third mode labels held originals clearly.
2. Disable generative video profiles in the scheduled worker. There is no automatic
   paid fallback when measured motion fails.
3. Poll originals once a second, with a timestamp query and image-byte deduplication.
   This reduces missed native updates; it does not turn the source into video.
4. Estimate one fixed forward/backward RAFT flow pair from original pixels. Render
   intermediate positions along those fixed fields with confidence-priority forward
   splatting, cycle/photometric checks and conservative occlusion handling.
5. Evaluate changed and moving regions separately from the static background.
   Reject poor correspondences, scene changes, explicit direction failures and
   oversized source gaps. Rejected spans hold observed images.
6. Preserve exact source anchors and receipt intervals. Cache numeric flow fields
   independently from display scale and FPS. Do not reuse old Pika/RIFE results.
7. Export motion availability to the viewer. An unavailable result is never presented
   as a successful AI video. Keep controls, source thumbnails and scrubbing usable.

This CPU implementation uses the forward-warping idea from Softmax Splatting; it is
not that paper's complete trained synthesis network. Linear pixel paths prevent
per-point improvisation, but wrong correspondences can still be wrong. The rejection
gate is therefore essential.

## Tests and comparisons

- Analytic translations: monotonic centroids in either direction, preserved area,
  opaque collision selection, stable background, exact endpoints and no duplicate
  object at the vacated origin.
- Pipeline: exact receipt anchors, terminal holds, cached flow reuse, explicit
  direction rejection, foreground confidence failure and no inference across gaps.
- Native source audit: approximately two-second cadence, deduplicated frames and
  all receipt records retained.
- Real RAFT checks: original camera frames at native resolution and deterministic
  2× estimation. All 27 native-resolution checks failed the configured reliability gate; the tested 2× cases also failed.
  Do not lower thresholds merely to make the demo animate.
- Seedance 1.5 Pro and Seedance 2.0 Fast: one difficult Allen span, explicit traffic
  directions and natural departures/arrivals. Both still produced reverse-motion
  candidates and changed the field of view. Neither replacement was published.

The RAFT model itself was checked on a known ten-pixel image translation and estimated
about 9.98 pixels. Its failure to explain the real moving regions is not evidence of
a reversed browser clock or an untested model invocation.

## What remains necessary

Natural continuous traffic video requires a denser observed sequence or a continuous
video source. A nightly job, more generated frames or a larger output image cannot
recover unobserved paths from these tiny stills. The current sample therefore remains
a source/enhancement comparison with interpolation withheld, rather than a claim of
recovered or reliable simulated video.

The recorded demo uses fal-hosted image assets. The standalone worker retains originals
and finished outputs on persistent disk. No persistent recorder is connected to Vercel
yet; adding a provider key to Vercel does not start capture.

## Primary references

- [RAFT official implementation](https://github.com/princeton-vl/RAFT)
- [Softmax Splatting paper and limitations](https://sniklaus.com/softsplat)
- [OCAI: occlusion and consistency-aware interpolation](https://openaccess.thecvf.com/content/CVPR2024/html/Jeong_OCAI_Improving_Optical_Flow_Estimation_by_Occlusion_and_Consistency_Aware_CVPR_2024_paper.html)
- [Seedance 1.5 first/last-frame model](https://fal.ai/models/fal-ai/bytedance/seedance/v1.5/pro/image-to-video)
- [Seedance 2.0 Fast model](https://fal.ai/models/bytedance/seedance-2.0/fast/image-to-video)

All processing here is scene-level image motion. No face recognition, person identity
matching or cross-camera route inference is implemented.

## Audit changes: source-motion-v2

Whole-scene confidence could hide a small moving object. A synthetic pedestrian-sized
component with zero estimated flow passed the old changed-area threshold and jumped
at the midpoint. The gate now checks local changed components, and rendering selects
its endpoint hypothesis consistently across the interval.

Every candidate still needs explicit visual review. Numerical scores cannot certify
realism. Timestamp and configured text pixels are held from the earlier observation
for every 0 < t < 1; the later bitmap appears only at the later exact observation.
MP4 provenance appears in an added footer and does not cover the source clock.

Candidate folders contain review.json with the artifact-bound review_id. A reviewer
can approve an exact candidate with motion-approvals/<review_id>.json:

```json
{
  "approved": true,
  "review_id": "<exact value from review.json>",
  "reviewer": "<reviewer>",
  "reviewed_at": "2026-10-18T06:00:00+00:00",
  "checks": {
    "no_ghosting": true,
    "no_scaling": true,
    "no_reversal": true,
    "realistic_motion": true,
    "timestamps_protected": true,
    "text_protected": true
  }
}
```

Use the actual review schema emitted by the candidate. Approvals bind source hashes,
engine and render settings, and candidate frame bytes. Missing, stale, incomplete or
revoked approvals keep source holds. No current real-world candidate is approved.

The proxy also requires source-motion-v2 and a positive quality_approved_pairs count.
It bounds manifest bytes, sequence lengths and expanded video timelines before sending
them to the browser.

## New-camera visual review

All 27 adjacent pairs from Times Square 45th/46th Streets and Herald Square 33rd Street were assessed. The audit rendered 684 diagnostic frames and inspected chronological full-scene and cropped temporal strips. All candidates were rejected for unreliable moving regions and visible fragmentation or disappearing subjects. None is approved or published. Deterministic checks passed for 3,879 protected-text/HUD regions and 54 exact endpoints; those checks do not certify natural motion. See [the complete review](new-camera-motion-review.json).
