svjack commited on
Commit
ef60e7a
·
verified ·
1 Parent(s): 00243f1

Update run_video_ccip.py

Browse files
Files changed (1) hide show
  1. run_video_ccip.py +3 -2
run_video_ccip.py CHANGED
@@ -43,7 +43,8 @@ all_paths_txt = all_paths_mp4.map(lambda x: x.replace(".mp4", ".txt")).map(lambd
43
  os.makedirs("tgt_dir", exist_ok=True)
44
  for ele in all_paths_mp4.values.tolist() + all_paths_txt.values.tolist():
45
  copy2(ele, os.path.join("tgt_dir", ele.split("/")[-1]))
46
-
 
47
  '''
48
 
49
  import os
@@ -61,7 +62,7 @@ def load_images_from_directory(image_dir):
61
  键为图片的文件名(不含扩展名),值为图片的 PIL.Image 对象。
62
  """
63
  name_image_dict = {}
64
- image_paths = list(pathlib.Path(image_dir).rglob("*.png")) + list(pathlib.Path(image_dir).rglob("*.jpg")) + list(pathlib.Path(image_dir).rglob("*.jpeg"))
65
 
66
  for image_path in tqdm(image_paths, desc="Loading images"):
67
  image = Image.open(image_path)
 
43
  os.makedirs("tgt_dir", exist_ok=True)
44
  for ele in all_paths_mp4.values.tolist() + all_paths_txt.values.tolist():
45
  copy2(ele, os.path.join("tgt_dir", ele.split("/")[-1]))
46
+
47
+ python run_video_ccip.py Beyond_the_Boundary_Videos Beyond_the_Boundary_Videos_named --image_dir named_image_dir
48
  '''
49
 
50
  import os
 
62
  键为图片的文件名(不含扩展名),值为图片的 PIL.Image 对象。
63
  """
64
  name_image_dict = {}
65
+ image_paths = list(pathlib.Path(image_dir).rglob("*.png")) + list(pathlib.Path(image_dir).rglob("*.jpg")) + list(pathlib.Path(image_dir).rglob("*.jpeg")) + list(pathlib.Path(image_dir).rglob("*.webp"))
66
 
67
  for image_path in tqdm(image_paths, desc="Loading images"):
68
  image = Image.open(image_path)