16 lines
580 B
Python
Executable File
16 lines
580 B
Python
Executable File
import os
|
|
import cv2
|
|
from tqdm import tqdm
|
|
root = "/data4/Hatcher/smallobject/voc_class/CDB_airplane/bayes_data/val/ground_truth/"
|
|
def jpg(root):
|
|
filelist = os.listdir(root)
|
|
num = 6000
|
|
for file in tqdm(filelist):
|
|
os.rename(os.path.join(root,file),os.path.join(root,file.replace("-","_")))
|
|
# img = cv2.imread(os.path.join("E:\\semi_dianli_image",file))
|
|
# img = cv2.resize(img,(1024,768))
|
|
#
|
|
# cv2.imwrite(os.path.join("E:\\semi_dianli_images","Hat{}.jpg".format(num)),img)
|
|
# num+=1
|
|
if __name__ == "__main__":
|
|
jpg(root) |