Skip to content

Instantly share code, notes, and snippets.

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]
from rp.git.Figures.film_strip.film_strip import film_strip
video='/Users/ryan/CleanCode/Projects/Google2025_Paper/OverleafGit/figures_src/CatFish.mp4'
video=load_video(video, use_cache=True)
for vert in [True,False]:
before=video[:,80:,:720]
after=video[:,80:,-720:]
#display_video(after)
frames=[0,25,46]
from rp.git.Figures.film_strip.film_strip import film_strip
video='/Users/ryan/CleanCode/Projects/Google2025_Paper/OverleafGit/figures_src/CatFish.mp4'
video=load_video(video, use_cache=True)
before=video[:,80:,:720]
after=video[:,80:,-720:]
display_video(after)
frames=[0,25,44]
vert=True
from rp.git.Figures.film_strip.film_strip import film_strip
video='/Users/ryan/CleanCode/Projects/Google2025_Paper/OverleafGit/figures_src/download - 2025-07-02T172224.702.mp4'
video=load_video(video,use_cache=True)
before=video[:,65:-40,:720]
after=video[:,65:-40,-720:]
frames=[0,30,44]
vert=True
before=film_strip(before[frames],vertical=vert)
https://gist.github.com/SqrtRyan/1d0a88afcb761021c21e0c7093ff7638
from rp.git.Figures.film_strip.film_strip import film_strip
video='/Users/ryan/CleanCode/Projects/Google2025_Paper/OverleafGit/figures_src/download - 2025-07-02T172224.702.mp4'
video=load_video(video,use_cache=True)
before=video[:,65:-40,:720]
after=video[:,65:-40,-720:]
frames=3
vert=False
before=film_strip(before,frames,vertical=vert)
NUM_COLS=5
ans = load_image_from_clipboard()
ans = split_tensor_into_regions(ans, 1, NUM_COLS)
ans = [crop_image_zeros(x,mask=x<250) for x in ans]
spacing_ratio=1/50
spacing=round(spacing_ratio*get_image_width(ans[0]))
ans = horizontally_concatenated_images(join_with_separator(ans,spacing))
ans=as_byte_image(ans)
mask=255-255*(as_grayscale_image(ans)==255)
from rp.git.Figures import film_strip
video_root = "/Users/ryan/CleanCode/Projects/Google2025_Paper/UserStudy/video_pairs_20"
videos = path_join(
video_root,
[
#"Kittycat Fish.mp4ATI_0071--[Seed 2] Kittycat Fish.mp4",
#"[Failure] Stop Sign Lady_copy6.mp4ATI_0097--[Seed 4370] [Failure] Stop Sign Lady_copy6.mp4",
#"Bichon + Corgi _ Bichon Stay Behind_copy3.mp4ATI_0025--[Seed 7945] Bichon + Corgi _ Bichon Stay Behind_copy3.mp4",
#"Bichon + Corgi _ Corgi Stay Behind.mp4ATI_0053--[Seed 9995] Bichon + Corgi _ Corgi Stay Behind.mp4",
from rp.git.Figures import film_strip
video_root = "/Users/ryan/CleanCode/Projects/Google2025_Paper/UserStudy/video_pairs_20"
videos = path_join(
video_root,
[
#"Kittycat Fish.mp4ATI_0071--[Seed 2] Kittycat Fish.mp4",
#"[Failure] Stop Sign Lady_copy6.mp4ATI_0097--[Seed 4370] [Failure] Stop Sign Lady_copy6.mp4",
#"Bichon + Corgi _ Bichon Stay Behind_copy3.mp4ATI_0025--[Seed 7945] Bichon + Corgi _ Bichon Stay Behind_copy3.mp4",
#"Bichon + Corgi _ Corgi Stay Behind.mp4ATI_0053--[Seed 9995] Bichon + Corgi _ Corgi Stay Behind.mp4",
from rp.git.Figures import film_strip
video_root = "/Users/ryan/CleanCode/Projects/Google2025_Paper/UserStudy/video_pairs_20"
videos = path_join(
video_root,
[
#"Kittycat Fish.mp4ATI_0071--[Seed 2] Kittycat Fish.mp4",
#"[Failure] Stop Sign Lady_copy6.mp4ATI_0097--[Seed 4370] [Failure] Stop Sign Lady_copy6.mp4",
#"Bichon + Corgi _ Bichon Stay Behind_copy3.mp4ATI_0025--[Seed 7945] Bichon + Corgi _ Bichon Stay Behind_copy3.mp4",
#"Bichon + Corgi _ Corgi Stay Behind.mp4ATI_0053--[Seed 9995] Bichon + Corgi _ Corgi Stay Behind.mp4",