mirror of
https://github.com/gaomingqi/Track-Anything.git
synced 2025-12-16 16:37:58 +01:00
solve conflict li
This commit is contained in:
@@ -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():
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user