# ISAT插件 - 自动标注
这是一个[ISAT](https://github.com/yatengLG/ISAT_with_segment_anything)的插件开发示例。
仅使用240行代码,开发一个带界面的ISAT插件,为ISAT提供基于yolo模型的自动标注功能。
该插件使用yolo计算目标框,然后通过sam框提示进行目标分割。

## 功能
* 可导入其他模型(项目提供了yolo11n.onnx模型以及yolo11n-seg.onnx模型供测试)
* 兼容IAST,支持所有ISAT提供的sam模型
## 安装与使用
### 安装
```shell
pip install isat-plugin-auto-annotate
```
### 使用
- 运行isat
- 插件界面,激活AutoAnnotatePlugin,在插件界面选择提供的yolo11n.onnx模型与coco.csv类别文件
- 选择sam模型(经不严谨测试,原始sam模型对框提示效果最好)
- 每次切换图片后,自动开始标注当前图片
## 说明
### 模型文件
项目使用带**nms**的onnx模型。
对于目标检测模型,支持所有经nms后输出shape为[n, 6]格式数据的模型,具体表示n个[xmin, ymin, xmax, ymax, score, category_index]
对于图像分割模型,支持所有经nms后输出shape为[n, N]格式数据的模型,具体表示n个[xmin, ymin, xmax, ymax, score, category_index, ...]
以ultralytics导出yolov11模型为例:
```shell
yolo export model=path/to/yolo11n.pt format=onnx nms=True iou=0.45
yolo export model=path/to/yolo11n-seg.pt format=onnx nms=True iou=0.45
```
### 类别文件
类别文件使用cvs格式存储,每行一个类别,分别与category_index对应。
以coco数据集为例:
```text
person
bicycle
car
motorcycle
airplane
bus
train
truck
...
```
模型输出的category_index 0 对应person, 1对应bicycle, ...
Raw data
{
"_id": null,
"home_page": "https://github.com/yatengLG/ISAT_plugin_auto_annotate",
"name": "isat-plugin-auto-annotate",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "isat-sam, isat plugin, auto annotate",
"author": "yatengLG",
"author_email": "yatenglg@foxmail.com",
"download_url": "https://files.pythonhosted.org/packages/51/83/e24063ac453f27cc44064cee0d05a52ee17b155a90043902900289369be4/isat_plugin_auto_annotate-1.1.0.tar.gz",
"platform": null,
"description": "# ISAT\u63d2\u4ef6 - \u81ea\u52a8\u6807\u6ce8\n\n\u8fd9\u662f\u4e00\u4e2a[ISAT](https://github.com/yatengLG/ISAT_with_segment_anything)\u7684\u63d2\u4ef6\u5f00\u53d1\u793a\u4f8b\u3002\n\n\u4ec5\u4f7f\u7528240\u884c\u4ee3\u7801\uff0c\u5f00\u53d1\u4e00\u4e2a\u5e26\u754c\u9762\u7684ISAT\u63d2\u4ef6\uff0c\u4e3aISAT\u63d0\u4f9b\u57fa\u4e8eyolo\u6a21\u578b\u7684\u81ea\u52a8\u6807\u6ce8\u529f\u80fd\u3002\n\n\u8be5\u63d2\u4ef6\u4f7f\u7528yolo\u8ba1\u7b97\u76ee\u6807\u6846\uff0c\u7136\u540e\u901a\u8fc7sam\u6846\u63d0\u793a\u8fdb\u884c\u76ee\u6807\u5206\u5272\u3002\n\n\n\n## \u529f\u80fd\n\n* \u53ef\u5bfc\u5165\u5176\u4ed6\u6a21\u578b\uff08\u9879\u76ee\u63d0\u4f9b\u4e86yolo11n.onnx\u6a21\u578b\u4ee5\u53cayolo11n-seg.onnx\u6a21\u578b\u4f9b\u6d4b\u8bd5\uff09\n* \u517c\u5bb9IAST\uff0c\u652f\u6301\u6240\u6709ISAT\u63d0\u4f9b\u7684sam\u6a21\u578b\n\n## \u5b89\u88c5\u4e0e\u4f7f\u7528\n\n### \u5b89\u88c5\n\n```shell\npip install isat-plugin-auto-annotate\n```\n\n### \u4f7f\u7528\n\n- \u8fd0\u884cisat\n- \u63d2\u4ef6\u754c\u9762\uff0c\u6fc0\u6d3bAutoAnnotatePlugin\uff0c\u5728\u63d2\u4ef6\u754c\u9762\u9009\u62e9\u63d0\u4f9b\u7684yolo11n.onnx\u6a21\u578b\u4e0ecoco.csv\u7c7b\u522b\u6587\u4ef6\n- \u9009\u62e9sam\u6a21\u578b(\u7ecf\u4e0d\u4e25\u8c28\u6d4b\u8bd5\uff0c\u539f\u59cbsam\u6a21\u578b\u5bf9\u6846\u63d0\u793a\u6548\u679c\u6700\u597d)\n- \u6bcf\u6b21\u5207\u6362\u56fe\u7247\u540e\uff0c\u81ea\u52a8\u5f00\u59cb\u6807\u6ce8\u5f53\u524d\u56fe\u7247\n\n## \u8bf4\u660e\n\n### \u6a21\u578b\u6587\u4ef6\n\u9879\u76ee\u4f7f\u7528\u5e26**nms**\u7684onnx\u6a21\u578b\u3002\n\n\u5bf9\u4e8e\u76ee\u6807\u68c0\u6d4b\u6a21\u578b\uff0c\u652f\u6301\u6240\u6709\u7ecfnms\u540e\u8f93\u51fashape\u4e3a[n, 6]\u683c\u5f0f\u6570\u636e\u7684\u6a21\u578b\uff0c\u5177\u4f53\u8868\u793an\u4e2a[xmin, ymin, xmax, ymax, score, category_index]\n\u5bf9\u4e8e\u56fe\u50cf\u5206\u5272\u6a21\u578b\uff0c\u652f\u6301\u6240\u6709\u7ecfnms\u540e\u8f93\u51fashape\u4e3a[n, N]\u683c\u5f0f\u6570\u636e\u7684\u6a21\u578b\uff0c\u5177\u4f53\u8868\u793an\u4e2a[xmin, ymin, xmax, ymax, score, category_index, ...]\n\n\u4ee5ultralytics\u5bfc\u51fayolov11\u6a21\u578b\u4e3a\u4f8b\uff1a\n```shell\nyolo export model=path/to/yolo11n.pt format=onnx nms=True iou=0.45\nyolo export model=path/to/yolo11n-seg.pt format=onnx nms=True iou=0.45\n```\n\n### \u7c7b\u522b\u6587\u4ef6\n\n\u7c7b\u522b\u6587\u4ef6\u4f7f\u7528cvs\u683c\u5f0f\u5b58\u50a8\uff0c\u6bcf\u884c\u4e00\u4e2a\u7c7b\u522b\uff0c\u5206\u522b\u4e0ecategory_index\u5bf9\u5e94\u3002\n\n\u4ee5coco\u6570\u636e\u96c6\u4e3a\u4f8b\uff1a\n\n```text\nperson\nbicycle\ncar\nmotorcycle\nairplane\nbus\ntrain\ntruck\n...\n```\n\n\u6a21\u578b\u8f93\u51fa\u7684category_index 0 \u5bf9\u5e94person, 1\u5bf9\u5e94bicycle, ...\n",
"bugtrack_url": null,
"license": "Apache2.0",
"summary": "ISAT Plugin for auto annotate by yolo detect model.",
"version": "1.1.0",
"project_urls": {
"Homepage": "https://github.com/yatengLG/ISAT_plugin_auto_annotate"
},
"split_keywords": [
"isat-sam",
" isat plugin",
" auto annotate"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5183e24063ac453f27cc44064cee0d05a52ee17b155a90043902900289369be4",
"md5": "37d85194b9c1c6a50a41f98c42f97235",
"sha256": "43537e79c62cac7349b883c2699aa38a1023491e2ca8432e671db70c50f3ae5d"
},
"downloads": -1,
"filename": "isat_plugin_auto_annotate-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "37d85194b9c1c6a50a41f98c42f97235",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 19514597,
"upload_time": "2025-07-25T06:05:14",
"upload_time_iso_8601": "2025-07-25T06:05:14.201469Z",
"url": "https://files.pythonhosted.org/packages/51/83/e24063ac453f27cc44064cee0d05a52ee17b155a90043902900289369be4/isat_plugin_auto_annotate-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 06:05:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yatengLG",
"github_project": "ISAT_plugin_auto_annotate",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "isat-sam",
"specs": [
[
">=",
"1.4.0"
]
]
},
{
"name": "onnxruntime",
"specs": []
}
],
"lcname": "isat-plugin-auto-annotate"
}