solve conflict li

This commit is contained in:
memoryunreal
2023-04-13 20:40:43 +00:00
parent c6d52b2ec1
commit 7f2d2d1d7d
2 changed files with 2 additions and 3 deletions

View File

@@ -31,12 +31,14 @@ def download_checkpoint(url, folder, filename):
filepath = os.path.join(folder, filename) filepath = os.path.join(folder, filename)
if not os.path.exists(filepath): if not os.path.exists(filepath):
print("download sam checkpoints ......")
response = requests.get(url, stream=True) response = requests.get(url, stream=True)
with open(filepath, "wb") as f: with open(filepath, "wb") as f:
for chunk in response.iter_content(chunk_size=8192): for chunk in response.iter_content(chunk_size=8192):
if chunk: if chunk:
f.write(chunk) f.write(chunk)
print("download successfully!")
return filepath return filepath
class SamControler(): class SamControler():

View File

@@ -58,10 +58,7 @@ if __name__ == '__main__':
first_frame_path = '/ssd1/gaomingqi/datasets/davis/Annotations/480p/dance-twirl/00000.png' first_frame_path = '/ssd1/gaomingqi/datasets/davis/Annotations/480p/dance-twirl/00000.png'
# load frames # load frames
<<<<<<< HEAD
=======
frames = ["test_confict"] frames = ["test_confict"]
>>>>>>> a5606340a199569856ffa1585aeeff5a40cc34ba
for video_path in video_path_list: for video_path in video_path_list:
frames.append(np.array(Image.open(video_path).convert('RGB'))) frames.append(np.array(Image.open(video_path).convert('RGB')))
frames = np.stack(frames, 0) # N, H, W, C frames = np.stack(frames, 0) # N, H, W, C