Skip to content

Commit 41398b3

Browse files
committed
update 数据集操作新增删除voc ImageSets文件夹
1 parent e0921bf commit 41398b3

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

dataset_tools/jade_voc_datasets.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,16 @@ def video_to_voc(self,save_path,detector=None,fps=5):
262262
index = index + 1
263263
processBar.update()
264264

265+
def remove_voc_imagesets(root_path):
266+
processBar = ProgressBar(len(os.listdir(root_path)))
267+
for year in os.listdir(root_path):
268+
if os.path.isdir(os.path.join(root_path,year)):
269+
year_path = os.path.join(root_path,year)
270+
for file in os.listdir(year_path):
271+
if file == "ImageSets":
272+
shutil.rmtree(os.path.join(year_path,file))
273+
processBar.update()
274+
265275
def paddle_pretrain_detection_dataset(root_path,detector,threshold=0.6):
266276
image_path = os.path.join(root_path,DIRECTORY_IMAGES)
267277
save_anno_path = CreateSavePath(os.path.join(root_path,DIRECTORY_ANNOTATIONS))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name="dataset_tools",
16-
version="1.0.4",
16+
version="1.0.5",
1717
keywords=("pip", "dataset_tools", ""),
1818
description="dataset_tools",
1919
long_description="",

0 commit comments

Comments
 (0)