YOLO label & image utils
Project description
yoloutils - YOLO Utilities
YOLO 标签工具集 - 用于处理 YOLO 目标检测数据集的标签和图片。
作者: Neo netkiller@msn.com 官网: https://www.netkiller.cn
从 PyPI 安装
使用 pip 安装
pip install netkiller-yoloutils
帮助信息
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils
usage: yoloutils.py [-h] {label,merge,copy,remove,change,crop,labelimg,auto,resize,classify,test,diff} ...
Yolo 标签与图像处理工具
options:
-h, --help show this help message and exit
子命令:
工具含标签类处理和图像类处理工具
{label,merge,copy,remove,change,crop,labelimg,auto,resize,classify,test,diff}
风险提示:当使用 --clean 参数时会删除目标目录和输出目录
label 标签统计、索引统计、标签搜索
merge 合并两个TXT文件中的标签到新TXT文件
copy 从指定标签复制图片文件
remove 从YOLO TXT文件中删除指定标签
change 修改标签索引
crop 图片裁剪
labelimg labelimg 格式转换为 yolo 训练数据集
auto 用现有模型自动给训练图像打标签
resize 修改图片尺寸
classify 图像分类数据处理
test 模型测试工具
diff 模型比较工具
Author: netkiller - https://www.netkiller.cn
标签管理
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils label -h
usage: yoloutils label [-h] [--source /tmp/dir1] [--classes] [--total] [--index] [--search 1 2 3 [1 2 3 ...]]
options:
-h, --help show this help message and exit
--source /tmp/dir1 目录
--classes 查看 classes.txt 文件
--total 统计标签图数量
--index 统计标签索引数量
--search 1 2 3 [1 2 3 ...]
搜索标签
合并标签
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils merge -h
usage: yoloutils merge [-h] [--left /tmp/dir1] [--right /tmp/dir2] [--output /tmp/output] [--clean]
options:
-h, --help show this help message and exit
--left /tmp/dir1 左侧目录
--right /tmp/dir2 右侧目录
--output /tmp/output 最终输出目录
--clean 清理之前的数据
复制标签
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils copy -h
usage: yoloutils copy [-h] [--source SOURCE] [--target TARGET] [--label LABEL] [-u] [-c]
options:
-h, --help show this help message and exit
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--label LABEL 逗号分割多个标签
-u, --uuid UUID 文件名
-c, --clean 清理目标文件夹
删除标签
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils remove -h
usage: yoloutils remove [-h] [--source SOURCE] [--target TARGET] [--clean] [--classes 1 2 3 [1 2 3 ...]]
[--label label1 label2 [label1 label2 ...]]
options:
-h, --help show this help message and exit
--classes 1 2 3 [1 2 3 ...]
标签序号
--label label1 label2 [label1 label2 ...]
标签名称
通用参数:
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--clean 清理之前的数据
修改标签
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils change -h
usage: yoloutils change [-h] [--source /tmp/dir1] [--search 1 2 3 [1 2 3 ...]] [--replace 4 5 6 [4 5 6 ...]]
options:
-h, --help show this help message and exit
--source /tmp/dir1 目录
--search 1 2 3 [1 2 3 ...]
标签序号
--replace 4 5 6 [4 5 6 ...]
标签名称
裁剪图片
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils crop -h
usage: yoloutils crop [-h] [--source SOURCE] [--target TARGET] [--clean] [--model best.pt] [--output /tmp/output]
options:
-h, --help show this help message and exit
--model best.pt 模型
--output /tmp/output Yolo 输出目录
通用参数:
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--clean 清理之前的数据
labelimg 转 yolo 训练数据集
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils labelimg -h
usage: yoloutils labelimg [-h] [--source SOURCE] [--target TARGET] [--clean] [--classes CLASSES] [--val 10] [--uuid] [--check]
options:
-h, --help show this help message and exit
--classes CLASSES classes.txt 文件
--val 10 检验数量
--uuid 输出文件名使用UUID
--check 图片检查 corrupt JPEG restored and saved
通用参数:
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--clean 清理之前的数据
自动打标签
(.venv) neo@netkiller yoloutils % yoloutils auto
usage: yoloutils auto [-h] [--source SOURCE] [--target TARGET] [--clean] [--model best.pt] [--conf 0.5] [--csv report.csv] [--output /path/to/output]
options:
-h, --help show this help message and exit
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--clean 清理之前的数据
--model best.pt 载入模型
--conf 0.5 置信度阈值
--csv report.csv 报告输出,哪些文件已经标准,哪些没有标注
--output /path/to/output 输出标注效果
用载入的模型自动给目录中的文件打标
修改图片尺寸
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils resize -h
usage: yoloutils resize [-h] [--source SOURCE] [--target TARGET] [--clean] [--imgsz 640] [--output ]
options:
-h, --help show this help message and exit
--imgsz 640 长边尺寸
--output 输出识别图像
通用参数:
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--clean 清理之前的数据
图像分类数据处理
(.venv) neo@Neo-Mac-mini-M4 yoloutils % yoloutils classify -h
usage: yoloutils classify [-h] [--source SOURCE] [--target TARGET] [--clean] [--output ] [--checklist ] [--test 100] [--crop] [--model ]
[--uuid] [--verbose]
options:
-h, --help show this help message and exit
--output 输出识别图像
--checklist 输出识别图像
--test 100 测试数量
--crop 裁剪
--model 裁剪模型
--uuid 重命名图片为UUID
--verbose 过程输出
通用参数:
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--clean 清理之前的数据
模型测试
usage: yoloutils test [-h] [--source SOURCE] [--target TARGET] [--clean] [--model MODEL] [--csv result.csv] [--output OUTPUT]
options:
-h, --help show this help message and exit
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--clean 清理之前的数据
--model MODEL 模型路径
--csv result.csv 保存结果
--output OUTPUT 测试结果输出路径
模型对比
(.venv) neo@netkiller yoloutils % yoloutils diff
usage: yoloutils diff [-h] [--source SOURCE] [--target TARGET] [--clean] [-m best1.pt best2.pt best3.pt [best1.pt best2.pt best3.pt ...]] [-l ] [-o OUTPUT] [-c result.csv]
options:
-h, --help show this help message and exit
--source SOURCE 图片来源地址
--target TARGET 图片目标地址
--clean 清理之前的数据
-m, --model best1.pt best2.pt best3.pt [best1.pt best2.pt best3.pt ...]
模型
-l, --label 标签过滤只统计指定标签
-o, --output OUTPUT 对比结果输出路径
-c, --csv result.csv 保存对比结果
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netkiller_yoloutils-0.0.10.tar.gz.
File metadata
- Download URL: netkiller_yoloutils-0.0.10.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40bdf3ddae2249ba601a890f035cf8b97ffae1e0a6dcb6c758bdf6a814900b9b
|
|
| MD5 |
78239eb47fa1682ea2b654bc91bb191a
|
|
| BLAKE2b-256 |
023a7192e3e98d1a387ef8dc422b47fdb705feb06282dd663d1ffce76ecb18c8
|
File details
Details for the file netkiller_yoloutils-0.0.10-py3-none-any.whl.
File metadata
- Download URL: netkiller_yoloutils-0.0.10-py3-none-any.whl
- Upload date:
- Size: 37.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2938d27d97e715aedd7b6728c183760ebf5f562c61bea5b08b72dd8075e38291
|
|
| MD5 |
5c9a0bb6f5f1a43811668d69058b25bd
|
|
| BLAKE2b-256 |
9495535ad84e4ae1f4b56db3c9efbfd59da8fb8d9847a1c2a81dbfcc97a66d8a
|