图像重命名
import os
import shutil
from tqdm import tqdm
# 图像重命名
img_path = './crop_img_low_score_soda_negative/'
imgs = os.listdir(img_path)
for img in tqdm(imgs):
new_name = img.split('.')
new_name[0] = 'detect_'+ new_name[0]
new_name = str.join('.', new_name)
shutil.copy(img_path+ img, img_path+ new_name)
os.remove(img_path+ img) # 删除原图
pass