将LabelMe转换为MsCOCO、PascalVOC、Yolo格式。以及将数据集拆分为训练、测试和验证样本;数据增强扩充转换后的数据集;输出和记录图像统计数据;将整个数据集转换为单个分辨率。
Istalligtheecessarypackages>>pipistall-rrequiremets.txt类的列表按照它们在统计中出现的顺序写在.txt文件中(默认在labels.txt)。文件名的名称在cofig.py中指定。
带参数的labelme_coverter.py文件用于转换:--iput-包含LabelMe格式数据集的目录--output-(可选)用于存储转换后的数据集的目录(默认值./curret_dataset:)--format-转换格式( yolo, voc, coco)--create-marked -(--poly-(可选)指定可视化是否应使用多边形(而不是矩形)示例:
Covertigdatasetfrom./meters01_labelmetoYoloformatwithcreatioofmarkupvisualizatio>>pytholabelme_coverter.py--iputmeters01_labelme--outputcurret_dataset--formatyolo--create-markedIputpath:labelmeOutputpath:curret_datasetReadiglabelmefiles:100%|██████████████████████████████████████████|24/24[00:00<00:00,98.69it/s]Createmarkedimages:100%|██████████████████████████████████████████|24/24[00:00<00:00,50.44it/s]CovertiglabelmetoYolo:100%|██████████████████████████████████████████|24/24[00:00<00:00,8058.87it/s]






评论