first commit

This commit is contained in:
hatcher committed 2026-07-17 18:55:31 +08:00
1 parent ae53e9eac5
commit 91cbd01126
514 files changed
+55625 -2203

No files matched your search

+7 -5
View File
@@ -1,14 +1,16 @@
import os
import cv2
root = "H:\\Fine-grained-identification\\2021.3.25\\image\\灰斑鸻"
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 filelist:
os.rename(os.path.join(root,file),os.path.join(root,file.replace(".png",".jpg")))
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
# num+=1
if __name__ == "__main__":
jpg(root)