Created
November 12, 2025 05:15
-
-
Save SqrtRyan/2317e630adfa42e5503a4b061e7569e3 to your computer and use it in GitHub Desktop.
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
| from rp.git.Figures.film_strip.film_strip import film_strip | |
| video = "/Users/ryan/CleanCode/Projects/Google2025_Paper/OverleafGit/figures_src/windmill_chase.mp4" | |
| video = load_video(video, use_cache=True) | |
| video = as_float_images(video) | |
| # video=mean(video[:-3],video[1:-2],video[2:-1],video[3:]) | |
| before, after = split_tensor_into_regions(video, 1, 1, 2) | |
| frames = [0, 5, 10] | |
| before = before[frames] | |
| after = as_numpy_array( | |
| load_images( | |
| [ | |
| "/Users/ryan/CleanCode/Projects/Google2025_Paper/OverleafGit/figures_src/frame_" | |
| + x | |
| for x in ["1.png", "2.png", "3.png"] | |
| ], | |
| use_cache=True, | |
| ) | |
| )[:, :-114] | |
| before,after=resize_videos_to_min_size(before,after) | |
| vert = False | |
| before = film_strip(before, vertical=vert) | |
| after = film_strip(after, vertical=vert) | |
| before=crop_image_zeros(before) | |
| after=crop_image_zeros(after) | |
| for output in [before,after]: | |
| display_alpha_image(output) | |
| copy_image_to_clipboard(output) | |
| input('>>>') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment