This commit is contained in:
huangtao
2022-06-23 10:04:16 +08:00
commit 83741d1d93
84 changed files with 11217 additions and 0 deletions

19
delte_xml_imgs.py Normal file
View File

@ -0,0 +1,19 @@
import os
import shutil
xml_path = "paper_data/Annotations"
imgs_path = "paper_data/images"
newimg_path = "paper_data/new_images"
for xml in os.listdir(xml_path):
img_name = xml.split(".")[0]+".jpg"
# print(img_name)
if img_name in os.listdir(imgs_path):
img_path = f"{imgs_path}/{img_name}"
shutil.move(img_path, newimg_path)
else:
print(xml)
print("move done")