This commit is contained in:
Shen-Chenhui 2024-06-11 07:46:16 +00:00
parent 0532a4c962
commit a06c6e78a8
2 changed files with 6 additions and 6 deletions

View file

@ -20,9 +20,9 @@ echo "Logging to $LOG_BASE"
GPUS=(3 4 5 6 7) GPUS=(3 4 5 6 7)
RESOLUTION=(144p 240p 360p 480p 720p) RESOLUTION=(144p 240p 360p 480p 720p)
CUDA_VISIBLE_DEVICES=0 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 0 --end-index 3 >${LOG_BASE}/img_0.log 2>&1 & CUDA_VISIBLE_DEVICES=0 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 0 --end-index 5 >${LOG_BASE}/img_0.log 2>&1 &
CUDA_VISIBLE_DEVICES=1 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 3 --end-index 5 >${LOG_BASE}/img_1.log 2>&1 & CUDA_VISIBLE_DEVICES=1 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 5 --end-index 6 >${LOG_BASE}/img_1.log 2>&1 &
CUDA_VISIBLE_DEVICES=2 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 5 >${LOG_BASE}/img_2.log 2>&1 & CUDA_VISIBLE_DEVICES=2 $CMD --data-path $IMG_PATH --ckpt-path $CKPT_PATH --start-index 6 >${LOG_BASE}/img_2.log 2>&1 &
for i in "${!GPUS[@]}"; do for i in "${!GPUS[@]}"; do

View file

@ -3,7 +3,6 @@ import cv2 # isort:skip
import argparse import argparse
import os import os
import subprocess import subprocess
import time
from functools import partial from functools import partial
import pandas as pd import pandas as pd
@ -43,6 +42,8 @@ def process_single_row(row, args):
if "relpath" in row: if "relpath" in row:
save_dir = os.path.dirname(os.path.join(args.save_dir, row["relpath"])) save_dir = os.path.dirname(os.path.join(args.save_dir, row["relpath"]))
os.makedirs(save_dir, exist_ok=True) os.makedirs(save_dir, exist_ok=True)
else:
save_dir = args.save_dir
shorter_size = args.shorter_size shorter_size = args.shorter_size
if (shorter_size is not None) and ("height" in row) and ("width" in row): if (shorter_size is not None) and ("height" in row) and ("width" in row):
@ -171,11 +172,10 @@ def main():
args = parse_args() args = parse_args()
meta_path = args.meta_path meta_path = args.meta_path
if not os.path.exists(meta_path): if not os.path.exists(meta_path):
print(f"Meta file \'{meta_path}\' not found. Exit.") print(f"Meta file '{meta_path}' not found. Exit.")
exit() exit()
# create logger # create logger
logger = None
os.makedirs(args.save_dir, exist_ok=True) os.makedirs(args.save_dir, exist_ok=True)
# initialize pandarallel # initialize pandarallel