Add start/end frame range support to -n argument#68
Draft
Conversation
- cli.py: Change -n to accept 1 or 2 values (nargs='+') - -n N: process first N frames (backward compatible) - -n START END: process frames START to END inclusive - core.py: Add start_image_idx parameter to Core.__init__ - video.py: Add start_image_idx to make_pose2d/3d_video functions - tests: Add tests for new functionality and CLI parsing Co-authored-by: jasper-tms <23616964+jasper-tms@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add command line argument for video start and end frames
Add start/end frame range support to Mar 5, 2026
-n argument
Member
|
Hey @Dominic-DallOsto the df3d tests are failing because like 1% of the pixels in the newly generated videos have values that are slightly different from the videos in the repo. I think this doesn't reflect problems with the code but just slight differences in video encoding that aren't problematic. Do you have any ideas for how we could generalize the testing framework to be robust to this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
-nflag only supported processing from frame 0 up to N frames. Users had no way to extract a mid-sequence snippet without processing from the beginning.Changes
cli.py:-nnow accepts 1 or 2 integers vianargs="+":-n N— process first N frames (backward-compatible)-n START END— process frames START to END inclusiveSTART >= 0andEND >= START; converts to(start_image_idx, count)before passing downstreamcore.py:Core.__init__gains astart_image_idx: int = 0parameter;num_imagesandmax_img_idare adjusted accordingly;corrected_points2d_matrixiterates the correct frame rangevideo.py:make_pose2d_videoandmake_pose3d_videogainstart_image_idx=0; generators iteraterange(start_image_idx, start_image_idx + num_images)tests/test_df3d.py: Tests forCorewithstart_image_idx, and for all three CLI-nformsExample
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.