将多个.psd按图层导出的素材分类入文件夹,或者按正则匹配的共有标题对文件进行分类入文件夹
English
Resize DeepLabCut labeled datasets.
If the convertcsv2h5 feature is not enabled, the new dataset will be saved in the labeled-data-resized directory.
If the convertcsv2h5 feature is enabled, the original dataset will be renamed to labeled-data-ori, and the new dataset will be renamed to labeled-data.
python label_resizer.py [parameters]
--label_path: Path to labeled data, default is "./labeled-data"--ratio: Scaling ratio, default is 1--width: Specify width (pixels), default is -1 (not set)--height: Specify height (pixels), default is -1 (not set)--dest_dir: Output directory, default is "./labeled-data-resized"--convertcsv2h5: Whether to convert CSV to H5, options are "yes" or "no", default is "no"--config_path: DeepLabCut configuration file path, default is "./config.yaml"
- When
ratiois specified andwidthandheightare default: Scale images and annotation points proportionally - When
widthis specified andheightis default: Scale by width, height adjusts proportionally - When
heightis specified andwidthis default: Scale by height, width adjusts proportionally - When both
widthandheightare specified: Scale to the specified dimensions
If you need to enable the convertcsv2h5 feature, you must have deeplabcut installed in your environment.
Always backup your labeled data!
对DeepLabCut标注数据集进行尺寸缩放调整
如果没有启用convertcsv2h5功能,新的数据集会保存在labeled-data-resized目录下
如果启用convertcsv2h5功能,原来的数据集会重命名为labeled-data-ori,然后新的数据集会重命名为labeled-data
python label_resizer.py [参数]
--label_path:标注数据路径,默认为"./labeled-data"--ratio:缩放比例,默认为1--width:指定宽度(像素),默认为-1(不设置)--height:指定高度(像素),默认为-1(不设置)--dest_dir:输出目录,默认为"./labeled-data-resized"--convertcsv2h5:是否将CSV转换为H5,可选"yes"或"no",默认为"no"--config_path:DeepLabCut配置文件路径,默认为"./config.yaml"
- 指定
ratio而width和height为默认值时:按比例缩放图像和标注点 - 指定
width而height为默认值时:按宽度缩放,高度自动按比例调整 - 指定
height而width为默认值时:按高度缩放,宽度自动按比例调整 - 同时指定
width和height时:按指定尺寸缩放
如果需要启动convertcsv2h5功能,需要环境下安装有deeplabcut
总是备份标注好的数据!