This file contains 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
import pandas as pd | |
from rp import * | |
sys.path.append("/usr/local/google/home/burgert/CleanCode/Management") | |
import syncutil | |
dataset_root = "~/CleanCode/Datasets/Envato" | |
dataset_root = rp.get_absolute_path(dataset_root) | |
videos_folder_name = "Videos" |
This file contains 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
import numpy as np | |
import random | |
import cv2 | |
import rp # Pip Install RP | |
class ShapePlugin: | |
"""Base class for shape plugins.""" | |
def __init__(self, name): |
This file contains 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
class MyModel(nn.Module): | |
def __init__(self): | |
super().__init__() | |
############################################################################# | |
# TODO: Initialize the network weights # | |
############################################################################# | |
self.conv1 = nn.Conv2d(in_channels=3, out_channels=64, kernel_size=5, stride=1, padding=2) | |
self.bn1 = nn.BatchNorm2d(64) | |
self.relu = nn.LeakyReLU(0.1) |
This file contains 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
# 2025-02-06 21:17:00.685180 | |
# 2025-02-06 16:18:53.465744 | |
from PIL import Image | |
from rp import * | |
import cv2 | |
import numpy as np | |
import torch | |
import torchvision.transforms as T | |
This file contains 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
# 2025-02-06 21:17:00.685180 | |
# 2025-02-06 16:18:53.465744 | |
from PIL import Image | |
from rp import * | |
import cv2 | |
import numpy as np | |
import torch | |
import torchvision.transforms as T | |
This file contains 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 import * | |
import numpy as np | |
import torch | |
import torchvision.transforms as T | |
from PIL import Image | |
import cv2 | |
def approximate_matrix_by_rank(matrix, rank=1): | |
""" | |
Approximates a given matrix by another matrix with a specified rank, |
This file contains 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
import numpy as np | |
import torch | |
import torchvision.transforms as T | |
from PIL import Image | |
import cv2 | |
def approximate_matrix_by_rank(matrix, rank=1): | |
""" | |
Approximates a given matrix by another matrix with a specified rank, | |
minimizing the Frobenius norm of the difference between the two matrices. |
This file contains 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 import * | |
os.chdir("/efs/users/ryan.burgert/public/GoWithTheFlow/InferenceForPaper/batch_experiments/DAVIS_YuanchengPromptsMotionTransfer/infer_outputs/outputs/DAVIS_MOTION_TRANSFER_BATTERY_JAN29") | |
# FOR VIPSEG | |
davis_folder = "/efs/users/ryan.burgert/public/datasets/VIPSeg/videos/720p_49frames" | |
name_to_prompt = load_json("/efs/users/ryan.burgert/public/GoWithTheFlow/InferenceForPaper/batch_experiments/DAVIS_YuanchengPromptsMotionTransfer/target_prompt_VIPSeg_similar.json") | |
out_dir = "VIPSeg_out_jsons" | |
def get_name(x): |
This file contains 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
import rp.git.CommonSource.raft as raft | |
video_urls = path_join( | |
# "/nfs/ws3/hdd2/ws1nfs/ryan/CleanCode/Projects/Eyeline2024/gowiththeflowpaper.github.io.git/METRICS/flow_metrics", | |
"https://go-with-the-flow-cvpr25.s3.us-east-1.amazonaws.com/Synthetics/", | |
[ | |
"hhq_synthetics_010.mp4", #The racecar | |
"hhq_synthetics_002.mp4", #The dog | |
"hhq_synthetics_039.mp4", #The tornado | |
#NOW, DO ALL OF THEM... |
This file contains 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
import rp.git.CommonSource.raft as raft | |
video_urls = path_join( | |
# "/nfs/ws3/hdd2/ws1nfs/ryan/CleanCode/Projects/Eyeline2024/gowiththeflowpaper.github.io.git/METRICS/flow_metrics", | |
"https://go-with-the-flow-cvpr25.s3.us-east-1.amazonaws.com/Synthetics/", | |
[ | |
"hhq_synthetics_010.mp4", #The racecar | |
"hhq_synthetics_002.mp4", #The dog | |
"hhq_synthetics_039.mp4", #The tornado | |
#NOW, DO ALL OF THEM... |
NewerOlder