Skip to content

do_inv=True (inverse prediction) never converges - inbetween frames stay stuck at reference pose #2

Description

@NDJ-create

Hi, thank you for this great work!

I'm trying to run the inverse prediction workflow (Step 2 in the README) on a custom hand pose (closed fist → open hand), and the resulting inbetween GIF never actually transitions — frame 0 and frame 9 (out of 17 total) look nearly identical to the reference pose, as if the interpolation stays stuck near the reference throughout.

Setup: single custom stroke drawing, ~365 total strokes after combining both directions (197 confident forward strokes + 168 completed strokes from the inversion SVG).

Steps I followed:

  1. Ran run_forward.sh successfully (main1-4 all completed with return code 0).
  2. Ran prepare_inverse_data.py, which generated test_examples/[0inv]/ with the alternated ref/tar raster images and X_tar0.svg.
  3. Completed the missing strokes in a different color following the Krita tutorial, saved as X.svg, placed in test_examples/[0inv]/svg/.
  4. Set do_inv = True and ran run_inverse.sh (optical flow, preprocess_inverse.py, main1-4) — all completed without errors.
  5. Ran combine_two_directions.py and the full run_inbetweening.sh sequence.

Along the way I found (and had to manually fix) a few issues that might be relevant:

  • preprocess_inverse.py expects the completed drawing at [0inv]/svg/X.svg (not X_tar0.svg as the auto-generated file is named) — this isn't explicit anywhere except by reading the code.
  • The first time I ran this, I had manually reconstructed test_examples/[0inv]/raster_black/ (copying the same ref/tar images used in the forward pass) instead of letting prepare_inverse_data.py generate it — which produces different (correctly alternated) ref/tar images. After fixing this, the result was still stuck.
  • I confirmed via utils2_local_transform.py that connect_state is required for do_inv=True, generated correctly by preprocess_inverse.py's find_connected_points().

Even with all of the above addressed, the final GIF frames don't show any real transition between reference and target pose. Is there a known additional step or config detail I might be missing for the inverse workflow to converge properly? Happy to share more diagnostic details (intermediate frames, vector params) if helpful.

Thanks again for open-sourcing this work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions