<!-- markdownlint-disable MD028 MD031 MD033 MD036 MD041 -->
<div align="center">
<a href="https://v2.nonebot.dev/store">
<img src="https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo">
</a>
<p>
<img src="https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/template/plugin.svg" alt="NoneBotPluginText">
</p>
# Nonebot-Plugin-NaiLongRemove
_✨ 一个基于 AI 模型的简单插件~ ✨_
<img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
<a href="https://pdm.fming.dev">
<img src="https://img.shields.io/badge/pdm-managed-blueviolet" alt="pdm-managed">
</a>
<br />
<a href="https://pydantic.dev">
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/template/pyd-v1-or-v2.json" alt="Pydantic Version 1 Or 2" >
</a>
<a href="./LICENSE">
<img src="https://img.shields.io/github/license/Refound-445/nonebot-plugin-nailongremove.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-nailongremove">
<img src="https://img.shields.io/pypi/v/nonebot-plugin-nailongremove.svg" alt="pypi">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-nailongremove">
<img src="https://img.shields.io/pypi/dm/nonebot-plugin-nailongremove" alt="pypi download">
</a>
<br />
<a href="https://registry.nonebot.dev/plugin/nonebot-plugin-nailongremove:nonebot_plugin_nailongremove">
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin%2Fnonebot-plugin-nailongremove" alt="NoneBot Registry">
</a>
<a href="https://registry.nonebot.dev/plugin/nonebot-plugin-nailongremove:nonebot_plugin_nailongremove">
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin-adapters%2Fnonebot-plugin-nailongremove" alt="Supported Adapters">
</a>
</div>
## 📖 介绍
### 声明
本插件仅供娱乐和学习交流。
### 简介
NaiLongRemove 是一款由简单的 AI 模型建立的奶龙识别插件,可以识别群中的奶龙表情包并撤回该表情。
### 技术
目前插件支持三种模型,可通过配置文件更换,详见文档下方配置一节。
用户可以根据需要自行选择心仪的模型,两个模型性能都已经经过优化,但仍可能会有不同程度的误差,也欢迎各位继续反馈给我们~
## 💿 安装
**如果你从来没接触过 NoneBot,请查看 [这个文档](https://github.com/Refound-445/nonebot-plugin-nailongremove/blob/main/docs/tutorial.md)**
为避免依赖问题,我们把使用 GPU 推理的插件安装方式与普通安装分开了,供有需要的用户选择安装
### 使用 CPU 推理
以下提到的方法 任选**其一** 即可
<details open>
<summary>[推荐] 使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
```bash
nb plugin install nonebot-plugin-nailongremove
```
</details>
<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
<details>
<summary>pip</summary>
```bash
pip install nonebot-plugin-nailongremove
```
</details>
<details>
<summary>pdm</summary>
```bash
pdm add nonebot-plugin-nailongremove
```
</details>
<details>
<summary>poetry</summary>
```bash
poetry add nonebot-plugin-nailongremove
```
</details>
<details>
<summary>conda</summary>
```bash
conda install nonebot-plugin-nailongremove
```
</details>
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分的 `plugins` 项里追加写入
```toml
[tool.nonebot]
plugins = [
# ...
"nonebot_plugin_nailongremove"
]
```
</details>
### 使用 GPU 推理
<details>
<summary>点击展开</summary>
> [!NOTE]
> 以下操作比较专业及繁琐,非专业用户可以不考虑使用
> 实际上对于本插件使用的模型使用 CUDA 加速效果不大,不要什么都不懂就犟着要来搞这些
先进入 Bot 虚拟环境(如果有)
> [!NOTE]
> 如果你以前安装了使用 CPU 推理的包,请先卸载
>
> ```bash
> pip uninstall nonebot-plugin-nailongremove torch torchvision onnxruntime
> ```
安装底包
```bash
pip install nonebot-plugin-nailongremove-base
```
根据你安装的 CUDA 与 CuDNN 版本(如果有装,没有就去装),按照官网说明安装对应版本的以下依赖:
- `torch`([官网说明](https://pytorch.org/get-started/locally/#start-locally))
- `onnxruntime-gpu`([官网说明](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements))
安装完后配置插件使用 CUDA 进行推理
```properties
NAILONG_ONNX_PROVIDERS=["CUDAExecutionProvider"]
```
最后配置让 nonebot2 加载插件
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分的 `plugins` 项里追加写入
```toml
[tool.nonebot]
plugins = [
# ...
"nonebot_plugin_nailongremove"
]
```
之后更新插件的话,进入虚拟环境只更新底包即可,不要安装及更新不带 base 的包
```bash
pip install nonebot-plugin-nailongremove-base -U
```
</details>
## ⚙️ 配置
在 nonebot2 项目的 `.env` 文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|:--------------------------------:|:--:|:---------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| **全局配置** | | | |
| `PROXY` | 否 | `None` | 下载模型等文件时使用的代理地址 |
| **响应配置** | | | |
| `NAILONG_BYPASS_SUPERUSER` | 否 | `False` | 是否不检查超级用户发送的图片 |
| `NAILONG_BYPASS_ADMIN` | 否 | `False` | 是否不检查群组管理员发送的图片 |
| `NAILONG_NEED_ADMIN` | 否 | `False` | 当自身不为群组管理员时是否不检查群内所有图片 |
| `NAILONG_LIST_SCENES` | 否 | `[]` | 聊天场景 ID 黑白名单列表<br />在单级聊天下为该聊天 ID,如 QQ 群号;<br />在多级聊天下为以 `_` 分割的各级聊天 ID,如频道下的子频道或频道下私聊 |
| `NAILONG_BLACKLIST` | 否 | `True` | 是否使用黑名单模式 |
| `NAILONG_USER_BLACKLIST` | 否 | `[]` | 用户 ID 黑名单列表 |
| `NAILONG_PRIORITY` | 否 | `100` | Matcher 优先级 |
| **行为配置** | | | |
| `NAILONG_RECALL` | 否 | `True` | 是否撤回消息 |
| `NAILONG_MUTE_SECONDS` | 否 | `0` | 设置禁言时间,默认为 0 即不禁言<br/>单位:秒 |
| `NAILONG_TIP` | 否 | `{"nailong": ["本群禁止发奶龙!"]}` | 发送的提示,使用 [Alconna 的消息模板](https://nonebot.dev/docs/best-practice/alconna/uniseg#%E4%BD%BF%E7%94%A8%E6%B6%88%E6%81%AF%E6%A8%A1%E6%9D%BF),可用变量见下,可以根据标签自定义对应值,随机发送列表其中一条消息,<br/>如遇其中没有的标签会回退到 `nailong`<br/>如果对应值为空列表`[]`,则会检测而不会发送消息 |
| `NAILONG_FAILED_TIP` | 否 | `{"nailong": ["{:Reply($message_id)}呜,不要发奶龙了嘛 🥺 👉👈"]}` | 撤回失败或禁用撤回时发送的提示,同上 |
| `NAILONG_CHECK_ALL_FRAMES` | 否 | `False` | 使用模型 1 时是否检查图片中的所有帧,需要同时设置`NAILONG_CHECK_MODE`为0,启用该项后消息模板中的 `$checked_result` 变量当原图为动图时会变为动图 |
| `NAILONG_CHECK_MODE` | 否 | `0` | 选择对GIF动图的检测方式<br/>0.检测所有帧<br/>1.只检测第一帧<br/>2.随机抽帧检测 |
| **相似度检测配置** | | | |
| `NAILONG_SIMILARITY_ON` | 否 | `False` | 是否启用处理图片前对本地存储进行相似度检测 |
| `NAILONG_SIMILARITY_MAX_STORAGE` | 否 | `10` | 本地存储报错图片上限,到达上限会压缩并上传数据库,但并不影响之前的存储 |
| `NAILONG_HF_TOKEN` | 否 | `None` | Hugging Face Access Token,自动上传数据到hf,并成为数据集贡献者 |
| **模型通用配置** | | | |
| `NAILONG_MODEL_DIR` | 否 | `./data/nailongremove` | 模型的下载位置 |
| `NAILONG_MODEL` | 否 | `1` | 选择需要加载的模型,可用模型见下 |
| `NAILONG_AUTO_UPDATE_MODEL` | 否 | `True` | 是否自动更新模型 |
| `NAILONG_CONCURRENCY` | 否 | `1` | 当图片为动图时,针对该图片并发识别图片帧的最大并发数 |
| `NAILONG_ONNX_PROVIDERS` | 否 | `["CPUExecutionProvider"]` | 加载 onnx 模型使用的 provider 列表,请参考上方安装文档 |
| **模型 1 特定配置** | | | |
| `NAILONG_MODEL1_TYPE` | 否 | `tiny` | 模型 1 使用的模型类型,可用 `tiny` / `m` |
| `NAILONG_MODEL1_YOLOX_SIZE` | 否 | `None` | 针对模型 1,自定义模型输入可能会有尺寸更改 |
| **模型 2 特定配置** | | | |
| `NAILONG_MODEL2_ONLINE` | 否 | `False` | 针对模型 2,是否启用在线推理,此模式目前不适用`NAILONG_CHECK_MODE`为0 |
| **模型 1&2 特定配置** | | | |
| `NAILONG_MODEL1_SCORE` | 否 | `{"nailong": 0.5}` | 模型 1&2 置信度阈值,范围 `0` ~ `1`,可以根据标签自定义对应值,设置对应标签的阈值以检测该标签,设为 `null` 或者不填可以忽略该标签 |
| **杂项配置** | | | |
| `NAILONG_GITHUB_TOKEN` | 否 | `None` | GitHub Access Token,遇到模型下载或更新问题时可尝试填写 |
### 可用模型
- `0`:基于 Renet50 图像分类模型训练推理,感谢 [@spawner1145](https://github.com/spawner1145) 提供的模型,原链接:[spawner1145/NailongRecognize](https://github.com/spawner1145/NailongRecognize.git)
- `1`:基于 YOLOX 目标检测模型训练推理,感谢 [@NKXingXh](https://github.com/nkxingxh) 提供的模型,原链接:[nkxingxh/NailongDetection](https://github.com/nkxingxh/NailongDetection)
- `2`:基于 YOLOv11 目标检测模型训练推理,感谢 [@Hakureirm](https://github.com/Hakureirm) 提供的模型,原链接:[Hakureirm/NailongKiller](https://huggingface.co/Hakureirm/NailongKiller)
- `3`:基于 YOLOv11 目标检测模型训练推理,感谢 [@Threkork](https://github.com/Threkork) 提供的模型,原链接:[Threkork/kovi-plugin-check-alllong](https://github.com/Threkork/kovi-plugin-check-alllong),建议`NAILONG_MODEL1_SCORE`配置项中设置`{"nailong": 0.78}`,`NAILONG_MODEL1_YOLOX_SIZE`设置为`[640,640]`
### 消息模板可用变量
| 变量名 | 类型 | 说明 |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `$event` | [`Event`](https://nonebot.dev/docs/api/adapters/#Event) | 当前事件 |
| `$target` | [`Target`](https://nonebot.dev/docs/best-practice/alconna/uniseg#%E6%B6%88%E6%81%AF%E5%8F%91%E9%80%81%E5%AF%B9%E8%B1%A1) | 事件目标 |
| `$message_id` | `str` | 消息 ID |
| `$msg` | [`UniMessage`](https://nonebot.dev/docs/best-practice/alconna/uniseg#%E9%80%9A%E7%94%A8%E6%B6%88%E6%81%AF%E5%BA%8F%E5%88%97) | 当前消息 |
| `$ss` | [`Session`](https://github.com/RF-Tar-Railt/nonebot-plugin-uninfo?tab=readme-ov-file#session) | 当前会话 |
| `$checked_result` | [`Image`](https://nonebot.dev/docs/best-practice/alconna/uniseg#%E9%80%9A%E7%94%A8%E6%B6%88%E6%81%AF%E6%AE%B5) | 框选出对应目标后的图片,仅在模型配置为 `1` 时存在 |
## 🎉 使用
只要有人发奶龙表情包被识别出来,就会被撤回并提醒。
本地存储报错图片(限`SUPERUSERS`):发送"这是[种类]"+图片,例如:"这是nailong+图片",便会自动存储到本地,开启相似度检测后,在下一次检测图片会优先识别本地已存储的图片。
## 📞 联系
- [机器人插件学习交流群](https://qm.qq.com/q/o6x7IEZyO4):200980266(安装部署,机器人 BUG 模型精度等问题反馈来这里哟)
- [插件性能测试群](https://qm.qq.com/q/7MMizTMMV2):829463462(此群有已部署bot,可以测试当前已有模型的性能)
- [人工智能学习交流群](https://qm.qq.com/q/xdRGrt3y3C):949992679(学习交流 AI 相关技术可以来这里捏)
欢迎大家进群一起学习交流~
## 📝 更新日志
### 2.3.4
- `NAILONG_MODEL`加入model3,基于YOLOv11训练的模型,建议`NAILONG_MODEL1_SCORE`配置项中设置`{"nailong": 0.78}`,`NAILONG_MODEL1_YOLOX_SIZE`设置为`[640,640]`
- 更新配置项默认值`NAILONG_BYPASS_SUPERUSER`->`False`,`NAILONG_BYPASS_ADMIN`->`False`
### 2.3.3
- 优化临时处理方案,减小性能压力同时提升速度(向量库faiss也支持GPU处理,但非专业人士不推荐使用GPU,因为这个安装过程比较复杂)
- 增加`NAILONG_HF_TOKEN`实现自动将报错图片上传Hugging Face数据集
- 更改配置项`NAILONG_TIP`和`NAILONG_FAILED_TIP`格式,允许随机发送返回消息,并且对应值为空列表`[]`时,仅检测图片(或者禁言撤回)而不会返回消息
### 2.3.2
- 更新对GIF动图的三种帧处理模式,通过`NAILONG_CHECK_MODE`自行选择
- 更新对于报错图片临时处理方案,通过设置`NAILONG_SIMILARITY_ON`开启浏览本地存储相似度匹配,通过`SUPERUSERS`发送"这是[种类]"+图片,可将报错图片保存到本地记录
- `NAILONG_MODEL`加入model2,基于YOLOv11训练的模型,目前仅支持奶龙识别
### 2.3.1
- 修改插件依赖以避免一些问题,影响了安装过程,请查看安装文档了解
- 对应配置项修改:删除配置项 `NAILONG_ONNX_TRY_TO_USE_GPU`,添加配置项 `NAILONG_ONNX_PROVIDERS`
### 2.3.0
- 支持了检查 GIF 中的所有帧并将结果重新封成 GIF,默认禁用,同时弃用 `$checked_image` 变量,新增 `$checked_result` 变量
- 现在模型 1 的输入大小可以根据模型类型自动配置了,但是如果配置项指定了那么会优先使用
- 支持处理含有其他标签的图片了,部分配置项支持根据标签自定义对应值
- 增加用户黑名单
- 默认模型调整至 1
### 2.2.1
- 优化模型自动更新(可能是反向优化)
### 2.2.0
- 重命名配置项 `NAILONG_YOLOX_SIZE` -> `NAILONG_MODEL1_YOLOX_SIZE`
- 模型 1 现可以自动获取最新版本,也可以通过配置选择要使用的模型类型
- 模型 1 现可通过配置项控制识别置信度阈值
- 加载 onnx 模型时会默认尝试使用 GPU,如果失败则会显示一串警告,如果不想看见警告参考上面关闭对应配置
### 2.1.4
- 修复 `NAILONG_NEED_ADMIN` 配置不生效的 Bug
### 2.1.3
- 修复忽略群管与超级用户无效的 Bug
### 2.1.2
- 重构部分代码,修复潜在 Bug
### 2.1.1
- 新增变量 `$checked_image`
### 2.1.0
- 从原仓库下载模型
### 2.0.0
- 重构插件,适配多平台
- 更新了两个新模型,优化了模型精度,用户可自行选择其中之一进行推理
- 增加了禁言、群黑白名单、可选关闭管理员检测等功能
- 增加了自动更新模型可选
Raw data
{
"_id": null,
"home_page": null,
"name": "nonebot-plugin-nailongremove",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "nonebot, plugin, image",
"author": null,
"author_email": "445 <2877834692@qq.com>, student_2333 <lgc2333@126.com>",
"download_url": "https://files.pythonhosted.org/packages/e5/84/ab710acb585a4fb3e1a279a20fd9eb7e6d4d9b15ec0dd61723873266a68b/nonebot_plugin_nailongremove-2.3.4.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable MD028 MD031 MD033 MD036 MD041 -->\n\n<div align=\"center\">\n\n<a href=\"https://v2.nonebot.dev/store\">\n <img src=\"https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\">\n</a>\n\n<p>\n <img src=\"https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/template/plugin.svg\" alt=\"NoneBotPluginText\">\n</p>\n\n# Nonebot-Plugin-NaiLongRemove\n\n_\u2728 \u4e00\u4e2a\u57fa\u4e8e AI \u6a21\u578b\u7684\u7b80\u5355\u63d2\u4ef6~ \u2728_\n\n<img src=\"https://img.shields.io/badge/python-3.9+-blue.svg\" alt=\"python\">\n<a href=\"https://pdm.fming.dev\">\n <img src=\"https://img.shields.io/badge/pdm-managed-blueviolet\" alt=\"pdm-managed\">\n</a>\n\n<br />\n\n<a href=\"https://pydantic.dev\">\n <img src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/template/pyd-v1-or-v2.json\" alt=\"Pydantic Version 1 Or 2\" >\n</a>\n<a href=\"./LICENSE\">\n <img src=\"https://img.shields.io/github/license/Refound-445/nonebot-plugin-nailongremove.svg\" alt=\"license\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-nailongremove\">\n <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-nailongremove.svg\" alt=\"pypi\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-nailongremove\">\n <img src=\"https://img.shields.io/pypi/dm/nonebot-plugin-nailongremove\" alt=\"pypi download\">\n</a>\n\n<br />\n\n<a href=\"https://registry.nonebot.dev/plugin/nonebot-plugin-nailongremove:nonebot_plugin_nailongremove\">\n <img src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin%2Fnonebot-plugin-nailongremove\" alt=\"NoneBot Registry\">\n</a>\n<a href=\"https://registry.nonebot.dev/plugin/nonebot-plugin-nailongremove:nonebot_plugin_nailongremove\">\n <img src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fnbbdg.lgc2333.top%2Fplugin-adapters%2Fnonebot-plugin-nailongremove\" alt=\"Supported Adapters\">\n</a>\n\n</div>\n\n## \ud83d\udcd6 \u4ecb\u7ecd\n\n### \u58f0\u660e\n\n\u672c\u63d2\u4ef6\u4ec5\u4f9b\u5a31\u4e50\u548c\u5b66\u4e60\u4ea4\u6d41\u3002\n\n### \u7b80\u4ecb\n\nNaiLongRemove \u662f\u4e00\u6b3e\u7531\u7b80\u5355\u7684 AI \u6a21\u578b\u5efa\u7acb\u7684\u5976\u9f99\u8bc6\u522b\u63d2\u4ef6\uff0c\u53ef\u4ee5\u8bc6\u522b\u7fa4\u4e2d\u7684\u5976\u9f99\u8868\u60c5\u5305\u5e76\u64a4\u56de\u8be5\u8868\u60c5\u3002\n\n### \u6280\u672f\n\n\u76ee\u524d\u63d2\u4ef6\u652f\u6301\u4e09\u79cd\u6a21\u578b\uff0c\u53ef\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u66f4\u6362\uff0c\u8be6\u89c1\u6587\u6863\u4e0b\u65b9\u914d\u7f6e\u4e00\u8282\u3002 \n\u7528\u6237\u53ef\u4ee5\u6839\u636e\u9700\u8981\u81ea\u884c\u9009\u62e9\u5fc3\u4eea\u7684\u6a21\u578b\uff0c\u4e24\u4e2a\u6a21\u578b\u6027\u80fd\u90fd\u5df2\u7ecf\u7ecf\u8fc7\u4f18\u5316\uff0c\u4f46\u4ecd\u53ef\u80fd\u4f1a\u6709\u4e0d\u540c\u7a0b\u5ea6\u7684\u8bef\u5dee\uff0c\u4e5f\u6b22\u8fce\u5404\u4f4d\u7ee7\u7eed\u53cd\u9988\u7ed9\u6211\u4eec~\n\n## \ud83d\udcbf \u5b89\u88c5\n\n**\u5982\u679c\u4f60\u4ece\u6765\u6ca1\u63a5\u89e6\u8fc7 NoneBot\uff0c\u8bf7\u67e5\u770b [\u8fd9\u4e2a\u6587\u6863](https://github.com/Refound-445/nonebot-plugin-nailongremove/blob/main/docs/tutorial.md)**\n\n\u4e3a\u907f\u514d\u4f9d\u8d56\u95ee\u9898\uff0c\u6211\u4eec\u628a\u4f7f\u7528 GPU \u63a8\u7406\u7684\u63d2\u4ef6\u5b89\u88c5\u65b9\u5f0f\u4e0e\u666e\u901a\u5b89\u88c5\u5206\u5f00\u4e86\uff0c\u4f9b\u6709\u9700\u8981\u7684\u7528\u6237\u9009\u62e9\u5b89\u88c5\n\n### \u4f7f\u7528 CPU \u63a8\u7406\n\n\u4ee5\u4e0b\u63d0\u5230\u7684\u65b9\u6cd5 \u4efb\u9009**\u5176\u4e00** \u5373\u53ef\n\n<details open>\n<summary>[\u63a8\u8350] \u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u6253\u5f00\u547d\u4ee4\u884c, \u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4\u5373\u53ef\u5b89\u88c5\n\n```bash\nnb plugin install nonebot-plugin-nailongremove\n```\n\n</details>\n\n<details>\n<summary>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u63d2\u4ef6\u76ee\u5f55\u4e0b, \u6253\u5f00\u547d\u4ee4\u884c, \u6839\u636e\u4f60\u4f7f\u7528\u7684\u5305\u7ba1\u7406\u5668, \u8f93\u5165\u76f8\u5e94\u7684\u5b89\u88c5\u547d\u4ee4\n\n<details>\n<summary>pip</summary>\n\n```bash\npip install nonebot-plugin-nailongremove\n```\n\n</details>\n<details>\n<summary>pdm</summary>\n\n```bash\npdm add nonebot-plugin-nailongremove\n```\n\n</details>\n<details>\n<summary>poetry</summary>\n\n```bash\npoetry add nonebot-plugin-nailongremove\n```\n\n</details>\n<details>\n<summary>conda</summary>\n\n```bash\nconda install nonebot-plugin-nailongremove\n```\n\n</details>\n\n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u7684 `plugins` \u9879\u91cc\u8ffd\u52a0\u5199\u5165\n\n```toml\n[tool.nonebot]\nplugins = [\n # ...\n \"nonebot_plugin_nailongremove\"\n]\n```\n\n</details>\n\n### \u4f7f\u7528 GPU \u63a8\u7406\n\n<details>\n<summary>\u70b9\u51fb\u5c55\u5f00</summary>\n\n> [!NOTE]\n> \u4ee5\u4e0b\u64cd\u4f5c\u6bd4\u8f83\u4e13\u4e1a\u53ca\u7e41\u7410\uff0c\u975e\u4e13\u4e1a\u7528\u6237\u53ef\u4ee5\u4e0d\u8003\u8651\u4f7f\u7528 \n> \u5b9e\u9645\u4e0a\u5bf9\u4e8e\u672c\u63d2\u4ef6\u4f7f\u7528\u7684\u6a21\u578b\u4f7f\u7528 CUDA \u52a0\u901f\u6548\u679c\u4e0d\u5927\uff0c\u4e0d\u8981\u4ec0\u4e48\u90fd\u4e0d\u61c2\u5c31\u729f\u7740\u8981\u6765\u641e\u8fd9\u4e9b\n\n\u5148\u8fdb\u5165 Bot \u865a\u62df\u73af\u5883\uff08\u5982\u679c\u6709\uff09\n\n> [!NOTE]\n> \u5982\u679c\u4f60\u4ee5\u524d\u5b89\u88c5\u4e86\u4f7f\u7528 CPU \u63a8\u7406\u7684\u5305\uff0c\u8bf7\u5148\u5378\u8f7d\n>\n> ```bash\n> pip uninstall nonebot-plugin-nailongremove torch torchvision onnxruntime\n> ```\n\n\u5b89\u88c5\u5e95\u5305\n\n```bash\npip install nonebot-plugin-nailongremove-base\n```\n\n\u6839\u636e\u4f60\u5b89\u88c5\u7684 CUDA \u4e0e CuDNN \u7248\u672c\uff08\u5982\u679c\u6709\u88c5\uff0c\u6ca1\u6709\u5c31\u53bb\u88c5\uff09\uff0c\u6309\u7167\u5b98\u7f51\u8bf4\u660e\u5b89\u88c5\u5bf9\u5e94\u7248\u672c\u7684\u4ee5\u4e0b\u4f9d\u8d56\uff1a\n\n- `torch`\uff08[\u5b98\u7f51\u8bf4\u660e](https://pytorch.org/get-started/locally/#start-locally)\uff09\n- `onnxruntime-gpu`\uff08[\u5b98\u7f51\u8bf4\u660e](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements)\uff09\n\n\u5b89\u88c5\u5b8c\u540e\u914d\u7f6e\u63d2\u4ef6\u4f7f\u7528 CUDA \u8fdb\u884c\u63a8\u7406\n\n```properties\nNAILONG_ONNX_PROVIDERS=[\"CUDAExecutionProvider\"]\n```\n\n\u6700\u540e\u914d\u7f6e\u8ba9 nonebot2 \u52a0\u8f7d\u63d2\u4ef6 \n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u7684 `plugins` \u9879\u91cc\u8ffd\u52a0\u5199\u5165\n\n```toml\n[tool.nonebot]\nplugins = [\n # ...\n \"nonebot_plugin_nailongremove\"\n]\n```\n\n\u4e4b\u540e\u66f4\u65b0\u63d2\u4ef6\u7684\u8bdd\uff0c\u8fdb\u5165\u865a\u62df\u73af\u5883\u53ea\u66f4\u65b0\u5e95\u5305\u5373\u53ef\uff0c\u4e0d\u8981\u5b89\u88c5\u53ca\u66f4\u65b0\u4e0d\u5e26 base \u7684\u5305\n\n```bash\npip install nonebot-plugin-nailongremove-base -U\n```\n\n</details>\n\n## \u2699\ufe0f \u914d\u7f6e\n\n\u5728 nonebot2 \u9879\u76ee\u7684 `.env` \u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e0b\u8868\u4e2d\u7684\u5fc5\u586b\u914d\u7f6e\n\n| \u914d\u7f6e\u9879 | \u5fc5\u586b | \u9ed8\u8ba4\u503c | \u8bf4\u660e |\n|:--------------------------------:|:--:|:---------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| **\u5168\u5c40\u914d\u7f6e** | | | |\n| `PROXY` | \u5426 | `None` | \u4e0b\u8f7d\u6a21\u578b\u7b49\u6587\u4ef6\u65f6\u4f7f\u7528\u7684\u4ee3\u7406\u5730\u5740 |\n| **\u54cd\u5e94\u914d\u7f6e** | | | |\n| `NAILONG_BYPASS_SUPERUSER` | \u5426 | `False` | \u662f\u5426\u4e0d\u68c0\u67e5\u8d85\u7ea7\u7528\u6237\u53d1\u9001\u7684\u56fe\u7247 |\n| `NAILONG_BYPASS_ADMIN` | \u5426 | `False` | \u662f\u5426\u4e0d\u68c0\u67e5\u7fa4\u7ec4\u7ba1\u7406\u5458\u53d1\u9001\u7684\u56fe\u7247 |\n| `NAILONG_NEED_ADMIN` | \u5426 | `False` | \u5f53\u81ea\u8eab\u4e0d\u4e3a\u7fa4\u7ec4\u7ba1\u7406\u5458\u65f6\u662f\u5426\u4e0d\u68c0\u67e5\u7fa4\u5185\u6240\u6709\u56fe\u7247 |\n| `NAILONG_LIST_SCENES` | \u5426 | `[]` | \u804a\u5929\u573a\u666f ID \u9ed1\u767d\u540d\u5355\u5217\u8868<br />\u5728\u5355\u7ea7\u804a\u5929\u4e0b\u4e3a\u8be5\u804a\u5929 ID\uff0c\u5982 QQ \u7fa4\u53f7\uff1b<br />\u5728\u591a\u7ea7\u804a\u5929\u4e0b\u4e3a\u4ee5 `_` \u5206\u5272\u7684\u5404\u7ea7\u804a\u5929 ID\uff0c\u5982\u9891\u9053\u4e0b\u7684\u5b50\u9891\u9053\u6216\u9891\u9053\u4e0b\u79c1\u804a |\n| `NAILONG_BLACKLIST` | \u5426 | `True` | \u662f\u5426\u4f7f\u7528\u9ed1\u540d\u5355\u6a21\u5f0f |\n| `NAILONG_USER_BLACKLIST` | \u5426 | `[]` | \u7528\u6237 ID \u9ed1\u540d\u5355\u5217\u8868 |\n| `NAILONG_PRIORITY` | \u5426 | `100` | Matcher \u4f18\u5148\u7ea7 |\n| **\u884c\u4e3a\u914d\u7f6e** | | | |\n| `NAILONG_RECALL` | \u5426 | `True` | \u662f\u5426\u64a4\u56de\u6d88\u606f |\n| `NAILONG_MUTE_SECONDS` | \u5426 | `0` | \u8bbe\u7f6e\u7981\u8a00\u65f6\u95f4\uff0c\u9ed8\u8ba4\u4e3a 0 \u5373\u4e0d\u7981\u8a00<br/>\u5355\u4f4d\uff1a\u79d2 |\n| `NAILONG_TIP` | \u5426 | `{\"nailong\": [\"\u672c\u7fa4\u7981\u6b62\u53d1\u5976\u9f99\uff01\"]}` | \u53d1\u9001\u7684\u63d0\u793a\uff0c\u4f7f\u7528 [Alconna \u7684\u6d88\u606f\u6a21\u677f](https://nonebot.dev/docs/best-practice/alconna/uniseg#%E4%BD%BF%E7%94%A8%E6%B6%88%E6%81%AF%E6%A8%A1%E6%9D%BF)\uff0c\u53ef\u7528\u53d8\u91cf\u89c1\u4e0b\uff0c\u53ef\u4ee5\u6839\u636e\u6807\u7b7e\u81ea\u5b9a\u4e49\u5bf9\u5e94\u503c\uff0c\u968f\u673a\u53d1\u9001\u5217\u8868\u5176\u4e2d\u4e00\u6761\u6d88\u606f\uff0c<br/>\u5982\u9047\u5176\u4e2d\u6ca1\u6709\u7684\u6807\u7b7e\u4f1a\u56de\u9000\u5230 `nailong`<br/>\u5982\u679c\u5bf9\u5e94\u503c\u4e3a\u7a7a\u5217\u8868`[]`\uff0c\u5219\u4f1a\u68c0\u6d4b\u800c\u4e0d\u4f1a\u53d1\u9001\u6d88\u606f |\n| `NAILONG_FAILED_TIP` | \u5426 | `{\"nailong\": [\"{:Reply($message_id)}\u545c\uff0c\u4e0d\u8981\u53d1\u5976\u9f99\u4e86\u561b \ud83e\udd7a \ud83d\udc49\ud83d\udc48\"]}` | \u64a4\u56de\u5931\u8d25\u6216\u7981\u7528\u64a4\u56de\u65f6\u53d1\u9001\u7684\u63d0\u793a\uff0c\u540c\u4e0a |\n| `NAILONG_CHECK_ALL_FRAMES` | \u5426 | `False` | \u4f7f\u7528\u6a21\u578b 1 \u65f6\u662f\u5426\u68c0\u67e5\u56fe\u7247\u4e2d\u7684\u6240\u6709\u5e27\uff0c\u9700\u8981\u540c\u65f6\u8bbe\u7f6e`NAILONG_CHECK_MODE`\u4e3a0\uff0c\u542f\u7528\u8be5\u9879\u540e\u6d88\u606f\u6a21\u677f\u4e2d\u7684 `$checked_result` \u53d8\u91cf\u5f53\u539f\u56fe\u4e3a\u52a8\u56fe\u65f6\u4f1a\u53d8\u4e3a\u52a8\u56fe |\n| `NAILONG_CHECK_MODE` | \u5426 | `0` | \u9009\u62e9\u5bf9GIF\u52a8\u56fe\u7684\u68c0\u6d4b\u65b9\u5f0f<br/>0.\u68c0\u6d4b\u6240\u6709\u5e27<br/>1.\u53ea\u68c0\u6d4b\u7b2c\u4e00\u5e27<br/>2.\u968f\u673a\u62bd\u5e27\u68c0\u6d4b |\n| **\u76f8\u4f3c\u5ea6\u68c0\u6d4b\u914d\u7f6e** | | | |\n| `NAILONG_SIMILARITY_ON` | \u5426 | `False` | \u662f\u5426\u542f\u7528\u5904\u7406\u56fe\u7247\u524d\u5bf9\u672c\u5730\u5b58\u50a8\u8fdb\u884c\u76f8\u4f3c\u5ea6\u68c0\u6d4b |\n| `NAILONG_SIMILARITY_MAX_STORAGE` | \u5426 | `10` | \u672c\u5730\u5b58\u50a8\u62a5\u9519\u56fe\u7247\u4e0a\u9650\uff0c\u5230\u8fbe\u4e0a\u9650\u4f1a\u538b\u7f29\u5e76\u4e0a\u4f20\u6570\u636e\u5e93\uff0c\u4f46\u5e76\u4e0d\u5f71\u54cd\u4e4b\u524d\u7684\u5b58\u50a8 |\n| `NAILONG_HF_TOKEN` | \u5426 | `None` | Hugging Face Access Token\uff0c\u81ea\u52a8\u4e0a\u4f20\u6570\u636e\u5230hf\uff0c\u5e76\u6210\u4e3a\u6570\u636e\u96c6\u8d21\u732e\u8005 |\n| **\u6a21\u578b\u901a\u7528\u914d\u7f6e** | | | |\n| `NAILONG_MODEL_DIR` | \u5426 | `./data/nailongremove` | \u6a21\u578b\u7684\u4e0b\u8f7d\u4f4d\u7f6e |\n| `NAILONG_MODEL` | \u5426 | `1` | \u9009\u62e9\u9700\u8981\u52a0\u8f7d\u7684\u6a21\u578b\uff0c\u53ef\u7528\u6a21\u578b\u89c1\u4e0b |\n| `NAILONG_AUTO_UPDATE_MODEL` | \u5426 | `True` | \u662f\u5426\u81ea\u52a8\u66f4\u65b0\u6a21\u578b |\n| `NAILONG_CONCURRENCY` | \u5426 | `1` | \u5f53\u56fe\u7247\u4e3a\u52a8\u56fe\u65f6\uff0c\u9488\u5bf9\u8be5\u56fe\u7247\u5e76\u53d1\u8bc6\u522b\u56fe\u7247\u5e27\u7684\u6700\u5927\u5e76\u53d1\u6570 |\n| `NAILONG_ONNX_PROVIDERS` | \u5426 | `[\"CPUExecutionProvider\"]` | \u52a0\u8f7d onnx \u6a21\u578b\u4f7f\u7528\u7684 provider \u5217\u8868\uff0c\u8bf7\u53c2\u8003\u4e0a\u65b9\u5b89\u88c5\u6587\u6863 |\n| **\u6a21\u578b 1 \u7279\u5b9a\u914d\u7f6e** | | | |\n| `NAILONG_MODEL1_TYPE` | \u5426 | `tiny` | \u6a21\u578b 1 \u4f7f\u7528\u7684\u6a21\u578b\u7c7b\u578b\uff0c\u53ef\u7528 `tiny` / `m` |\n| `NAILONG_MODEL1_YOLOX_SIZE` | \u5426 | `None` | \u9488\u5bf9\u6a21\u578b 1\uff0c\u81ea\u5b9a\u4e49\u6a21\u578b\u8f93\u5165\u53ef\u80fd\u4f1a\u6709\u5c3a\u5bf8\u66f4\u6539 |\n| **\u6a21\u578b 2 \u7279\u5b9a\u914d\u7f6e** | | | |\n| `NAILONG_MODEL2_ONLINE` | \u5426 | `False` | \u9488\u5bf9\u6a21\u578b 2\uff0c\u662f\u5426\u542f\u7528\u5728\u7ebf\u63a8\u7406\uff0c\u6b64\u6a21\u5f0f\u76ee\u524d\u4e0d\u9002\u7528`NAILONG_CHECK_MODE`\u4e3a0 |\n| **\u6a21\u578b 1&2 \u7279\u5b9a\u914d\u7f6e** | | | |\n| `NAILONG_MODEL1_SCORE` | \u5426 | `{\"nailong\": 0.5}` | \u6a21\u578b 1&2 \u7f6e\u4fe1\u5ea6\u9608\u503c\uff0c\u8303\u56f4 `0` ~ `1`\uff0c\u53ef\u4ee5\u6839\u636e\u6807\u7b7e\u81ea\u5b9a\u4e49\u5bf9\u5e94\u503c\uff0c\u8bbe\u7f6e\u5bf9\u5e94\u6807\u7b7e\u7684\u9608\u503c\u4ee5\u68c0\u6d4b\u8be5\u6807\u7b7e\uff0c\u8bbe\u4e3a `null` \u6216\u8005\u4e0d\u586b\u53ef\u4ee5\u5ffd\u7565\u8be5\u6807\u7b7e |\n| **\u6742\u9879\u914d\u7f6e** | | | |\n| `NAILONG_GITHUB_TOKEN` | \u5426 | `None` | GitHub Access Token\uff0c\u9047\u5230\u6a21\u578b\u4e0b\u8f7d\u6216\u66f4\u65b0\u95ee\u9898\u65f6\u53ef\u5c1d\u8bd5\u586b\u5199 |\n\n### \u53ef\u7528\u6a21\u578b\n\n- `0`\uff1a\u57fa\u4e8e Renet50 \u56fe\u50cf\u5206\u7c7b\u6a21\u578b\u8bad\u7ec3\u63a8\u7406\uff0c\u611f\u8c22 [@spawner1145](https://github.com/spawner1145) \u63d0\u4f9b\u7684\u6a21\u578b\uff0c\u539f\u94fe\u63a5\uff1a[spawner1145/NailongRecognize](https://github.com/spawner1145/NailongRecognize.git)\n- `1`\uff1a\u57fa\u4e8e YOLOX \u76ee\u6807\u68c0\u6d4b\u6a21\u578b\u8bad\u7ec3\u63a8\u7406\uff0c\u611f\u8c22 [@NKXingXh](https://github.com/nkxingxh) \u63d0\u4f9b\u7684\u6a21\u578b\uff0c\u539f\u94fe\u63a5\uff1a[nkxingxh/NailongDetection](https://github.com/nkxingxh/NailongDetection)\n- `2`\uff1a\u57fa\u4e8e YOLOv11 \u76ee\u6807\u68c0\u6d4b\u6a21\u578b\u8bad\u7ec3\u63a8\u7406\uff0c\u611f\u8c22 [@Hakureirm](https://github.com/Hakureirm) \u63d0\u4f9b\u7684\u6a21\u578b\uff0c\u539f\u94fe\u63a5\uff1a[Hakureirm/NailongKiller](https://huggingface.co/Hakureirm/NailongKiller)\n- `3`\uff1a\u57fa\u4e8e YOLOv11 \u76ee\u6807\u68c0\u6d4b\u6a21\u578b\u8bad\u7ec3\u63a8\u7406\uff0c\u611f\u8c22 [@Threkork](https://github.com/Threkork) \u63d0\u4f9b\u7684\u6a21\u578b\uff0c\u539f\u94fe\u63a5\uff1a[Threkork/kovi-plugin-check-alllong](https://github.com/Threkork/kovi-plugin-check-alllong)\uff0c\u5efa\u8bae`NAILONG_MODEL1_SCORE`\u914d\u7f6e\u9879\u4e2d\u8bbe\u7f6e`{\"nailong\": 0.78}`\uff0c`NAILONG_MODEL1_YOLOX_SIZE`\u8bbe\u7f6e\u4e3a`[640,640]`\n\n### \u6d88\u606f\u6a21\u677f\u53ef\u7528\u53d8\u91cf\n\n| \u53d8\u91cf\u540d | \u7c7b\u578b | \u8bf4\u660e |\n| ----------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |\n| `$event` | [`Event`](https://nonebot.dev/docs/api/adapters/#Event) | \u5f53\u524d\u4e8b\u4ef6 |\n| `$target` | [`Target`](https://nonebot.dev/docs/best-practice/alconna/uniseg#%E6%B6%88%E6%81%AF%E5%8F%91%E9%80%81%E5%AF%B9%E8%B1%A1) | \u4e8b\u4ef6\u76ee\u6807 |\n| `$message_id` | `str` | \u6d88\u606f ID |\n| `$msg` | [`UniMessage`](https://nonebot.dev/docs/best-practice/alconna/uniseg#%E9%80%9A%E7%94%A8%E6%B6%88%E6%81%AF%E5%BA%8F%E5%88%97) | \u5f53\u524d\u6d88\u606f |\n| `$ss` | [`Session`](https://github.com/RF-Tar-Railt/nonebot-plugin-uninfo?tab=readme-ov-file#session) | \u5f53\u524d\u4f1a\u8bdd |\n| `$checked_result` | [`Image`](https://nonebot.dev/docs/best-practice/alconna/uniseg#%E9%80%9A%E7%94%A8%E6%B6%88%E6%81%AF%E6%AE%B5) | \u6846\u9009\u51fa\u5bf9\u5e94\u76ee\u6807\u540e\u7684\u56fe\u7247\uff0c\u4ec5\u5728\u6a21\u578b\u914d\u7f6e\u4e3a `1` \u65f6\u5b58\u5728 |\n\n## \ud83c\udf89 \u4f7f\u7528\n\n\u53ea\u8981\u6709\u4eba\u53d1\u5976\u9f99\u8868\u60c5\u5305\u88ab\u8bc6\u522b\u51fa\u6765\uff0c\u5c31\u4f1a\u88ab\u64a4\u56de\u5e76\u63d0\u9192\u3002\n\n\u672c\u5730\u5b58\u50a8\u62a5\u9519\u56fe\u7247\uff08\u9650`SUPERUSERS`\uff09\uff1a\u53d1\u9001\"\u8fd9\u662f[\u79cd\u7c7b]\"+\u56fe\u7247\uff0c\u4f8b\u5982\uff1a\"\u8fd9\u662fnailong+\u56fe\u7247\"\uff0c\u4fbf\u4f1a\u81ea\u52a8\u5b58\u50a8\u5230\u672c\u5730\uff0c\u5f00\u542f\u76f8\u4f3c\u5ea6\u68c0\u6d4b\u540e\uff0c\u5728\u4e0b\u4e00\u6b21\u68c0\u6d4b\u56fe\u7247\u4f1a\u4f18\u5148\u8bc6\u522b\u672c\u5730\u5df2\u5b58\u50a8\u7684\u56fe\u7247\u3002\n\n## \ud83d\udcde \u8054\u7cfb\n\n- [\u673a\u5668\u4eba\u63d2\u4ef6\u5b66\u4e60\u4ea4\u6d41\u7fa4](https://qm.qq.com/q/o6x7IEZyO4)\uff1a200980266\uff08\u5b89\u88c5\u90e8\u7f72\uff0c\u673a\u5668\u4eba BUG \u6a21\u578b\u7cbe\u5ea6\u7b49\u95ee\u9898\u53cd\u9988\u6765\u8fd9\u91cc\u54df\uff09\n- [\u63d2\u4ef6\u6027\u80fd\u6d4b\u8bd5\u7fa4](https://qm.qq.com/q/7MMizTMMV2)\uff1a829463462\uff08\u6b64\u7fa4\u6709\u5df2\u90e8\u7f72bot\uff0c\u53ef\u4ee5\u6d4b\u8bd5\u5f53\u524d\u5df2\u6709\u6a21\u578b\u7684\u6027\u80fd\uff09\n- [\u4eba\u5de5\u667a\u80fd\u5b66\u4e60\u4ea4\u6d41\u7fa4](https://qm.qq.com/q/xdRGrt3y3C)\uff1a949992679\uff08\u5b66\u4e60\u4ea4\u6d41 AI \u76f8\u5173\u6280\u672f\u53ef\u4ee5\u6765\u8fd9\u91cc\u634f\uff09\n\n\u6b22\u8fce\u5927\u5bb6\u8fdb\u7fa4\u4e00\u8d77\u5b66\u4e60\u4ea4\u6d41~\n\n## \ud83d\udcdd \u66f4\u65b0\u65e5\u5fd7\n\n### 2.3.4\n\n- `NAILONG_MODEL`\u52a0\u5165model3\uff0c\u57fa\u4e8eYOLOv11\u8bad\u7ec3\u7684\u6a21\u578b\uff0c\u5efa\u8bae`NAILONG_MODEL1_SCORE`\u914d\u7f6e\u9879\u4e2d\u8bbe\u7f6e`{\"nailong\": 0.78}`\uff0c`NAILONG_MODEL1_YOLOX_SIZE`\u8bbe\u7f6e\u4e3a`[640,640]`\n- \u66f4\u65b0\u914d\u7f6e\u9879\u9ed8\u8ba4\u503c`NAILONG_BYPASS_SUPERUSER`->`False`\uff0c`NAILONG_BYPASS_ADMIN`->`False`\n\n\n### 2.3.3\n\n- \u4f18\u5316\u4e34\u65f6\u5904\u7406\u65b9\u6848\uff0c\u51cf\u5c0f\u6027\u80fd\u538b\u529b\u540c\u65f6\u63d0\u5347\u901f\u5ea6\uff08\u5411\u91cf\u5e93faiss\u4e5f\u652f\u6301GPU\u5904\u7406\uff0c\u4f46\u975e\u4e13\u4e1a\u4eba\u58eb\u4e0d\u63a8\u8350\u4f7f\u7528GPU\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u5b89\u88c5\u8fc7\u7a0b\u6bd4\u8f83\u590d\u6742\uff09\n- \u589e\u52a0`NAILONG_HF_TOKEN`\u5b9e\u73b0\u81ea\u52a8\u5c06\u62a5\u9519\u56fe\u7247\u4e0a\u4f20Hugging Face\u6570\u636e\u96c6\n- \u66f4\u6539\u914d\u7f6e\u9879`NAILONG_TIP`\u548c`NAILONG_FAILED_TIP`\u683c\u5f0f\uff0c\u5141\u8bb8\u968f\u673a\u53d1\u9001\u8fd4\u56de\u6d88\u606f\uff0c\u5e76\u4e14\u5bf9\u5e94\u503c\u4e3a\u7a7a\u5217\u8868`[]`\u65f6\uff0c\u4ec5\u68c0\u6d4b\u56fe\u7247\uff08\u6216\u8005\u7981\u8a00\u64a4\u56de\uff09\u800c\u4e0d\u4f1a\u8fd4\u56de\u6d88\u606f\n\n### 2.3.2\n\n- \u66f4\u65b0\u5bf9GIF\u52a8\u56fe\u7684\u4e09\u79cd\u5e27\u5904\u7406\u6a21\u5f0f\uff0c\u901a\u8fc7`NAILONG_CHECK_MODE`\u81ea\u884c\u9009\u62e9\n- \u66f4\u65b0\u5bf9\u4e8e\u62a5\u9519\u56fe\u7247\u4e34\u65f6\u5904\u7406\u65b9\u6848\uff0c\u901a\u8fc7\u8bbe\u7f6e`NAILONG_SIMILARITY_ON`\u5f00\u542f\u6d4f\u89c8\u672c\u5730\u5b58\u50a8\u76f8\u4f3c\u5ea6\u5339\u914d\uff0c\u901a\u8fc7`SUPERUSERS`\u53d1\u9001\"\u8fd9\u662f[\u79cd\u7c7b]\"+\u56fe\u7247\uff0c\u53ef\u5c06\u62a5\u9519\u56fe\u7247\u4fdd\u5b58\u5230\u672c\u5730\u8bb0\u5f55\n- `NAILONG_MODEL`\u52a0\u5165model2\uff0c\u57fa\u4e8eYOLOv11\u8bad\u7ec3\u7684\u6a21\u578b\uff0c\u76ee\u524d\u4ec5\u652f\u6301\u5976\u9f99\u8bc6\u522b\n\n### 2.3.1\n\n- \u4fee\u6539\u63d2\u4ef6\u4f9d\u8d56\u4ee5\u907f\u514d\u4e00\u4e9b\u95ee\u9898\uff0c\u5f71\u54cd\u4e86\u5b89\u88c5\u8fc7\u7a0b\uff0c\u8bf7\u67e5\u770b\u5b89\u88c5\u6587\u6863\u4e86\u89e3\n - \u5bf9\u5e94\u914d\u7f6e\u9879\u4fee\u6539\uff1a\u5220\u9664\u914d\u7f6e\u9879 `NAILONG_ONNX_TRY_TO_USE_GPU`\uff0c\u6dfb\u52a0\u914d\u7f6e\u9879 `NAILONG_ONNX_PROVIDERS`\n\n### 2.3.0\n\n- \u652f\u6301\u4e86\u68c0\u67e5 GIF \u4e2d\u7684\u6240\u6709\u5e27\u5e76\u5c06\u7ed3\u679c\u91cd\u65b0\u5c01\u6210 GIF\uff0c\u9ed8\u8ba4\u7981\u7528\uff0c\u540c\u65f6\u5f03\u7528 `$checked_image` \u53d8\u91cf\uff0c\u65b0\u589e `$checked_result` \u53d8\u91cf\n- \u73b0\u5728\u6a21\u578b 1 \u7684\u8f93\u5165\u5927\u5c0f\u53ef\u4ee5\u6839\u636e\u6a21\u578b\u7c7b\u578b\u81ea\u52a8\u914d\u7f6e\u4e86\uff0c\u4f46\u662f\u5982\u679c\u914d\u7f6e\u9879\u6307\u5b9a\u4e86\u90a3\u4e48\u4f1a\u4f18\u5148\u4f7f\u7528\n- \u652f\u6301\u5904\u7406\u542b\u6709\u5176\u4ed6\u6807\u7b7e\u7684\u56fe\u7247\u4e86\uff0c\u90e8\u5206\u914d\u7f6e\u9879\u652f\u6301\u6839\u636e\u6807\u7b7e\u81ea\u5b9a\u4e49\u5bf9\u5e94\u503c\n- \u589e\u52a0\u7528\u6237\u9ed1\u540d\u5355\n- \u9ed8\u8ba4\u6a21\u578b\u8c03\u6574\u81f3 1\n\n### 2.2.1\n\n- \u4f18\u5316\u6a21\u578b\u81ea\u52a8\u66f4\u65b0\uff08\u53ef\u80fd\u662f\u53cd\u5411\u4f18\u5316\uff09\n\n### 2.2.0\n\n- \u91cd\u547d\u540d\u914d\u7f6e\u9879 `NAILONG_YOLOX_SIZE` -> `NAILONG_MODEL1_YOLOX_SIZE`\n- \u6a21\u578b 1 \u73b0\u53ef\u4ee5\u81ea\u52a8\u83b7\u53d6\u6700\u65b0\u7248\u672c\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u9009\u62e9\u8981\u4f7f\u7528\u7684\u6a21\u578b\u7c7b\u578b\n- \u6a21\u578b 1 \u73b0\u53ef\u901a\u8fc7\u914d\u7f6e\u9879\u63a7\u5236\u8bc6\u522b\u7f6e\u4fe1\u5ea6\u9608\u503c\n- \u52a0\u8f7d onnx \u6a21\u578b\u65f6\u4f1a\u9ed8\u8ba4\u5c1d\u8bd5\u4f7f\u7528 GPU\uff0c\u5982\u679c\u5931\u8d25\u5219\u4f1a\u663e\u793a\u4e00\u4e32\u8b66\u544a\uff0c\u5982\u679c\u4e0d\u60f3\u770b\u89c1\u8b66\u544a\u53c2\u8003\u4e0a\u9762\u5173\u95ed\u5bf9\u5e94\u914d\u7f6e\n\n### 2.1.4\n\n- \u4fee\u590d `NAILONG_NEED_ADMIN` \u914d\u7f6e\u4e0d\u751f\u6548\u7684 Bug\n\n### 2.1.3\n\n- \u4fee\u590d\u5ffd\u7565\u7fa4\u7ba1\u4e0e\u8d85\u7ea7\u7528\u6237\u65e0\u6548\u7684 Bug\n\n### 2.1.2\n\n- \u91cd\u6784\u90e8\u5206\u4ee3\u7801\uff0c\u4fee\u590d\u6f5c\u5728 Bug\n\n### 2.1.1\n\n- \u65b0\u589e\u53d8\u91cf `$checked_image`\n\n### 2.1.0\n\n- \u4ece\u539f\u4ed3\u5e93\u4e0b\u8f7d\u6a21\u578b\n\n### 2.0.0\n\n- \u91cd\u6784\u63d2\u4ef6\uff0c\u9002\u914d\u591a\u5e73\u53f0\n- \u66f4\u65b0\u4e86\u4e24\u4e2a\u65b0\u6a21\u578b\uff0c\u4f18\u5316\u4e86\u6a21\u578b\u7cbe\u5ea6\uff0c\u7528\u6237\u53ef\u81ea\u884c\u9009\u62e9\u5176\u4e2d\u4e4b\u4e00\u8fdb\u884c\u63a8\u7406\n- \u589e\u52a0\u4e86\u7981\u8a00\u3001\u7fa4\u9ed1\u767d\u540d\u5355\u3001\u53ef\u9009\u5173\u95ed\u7ba1\u7406\u5458\u68c0\u6d4b\u7b49\u529f\u80fd\n- \u589e\u52a0\u4e86\u81ea\u52a8\u66f4\u65b0\u6a21\u578b\u53ef\u9009\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u8bc6\u522b\u76ee\u6807\u5e76\u64a4\u56de\u56fe\u7247\u63d2\u4ef6",
"version": "2.3.4",
"project_urls": {
"homepage": "https://github.com/Refound-445/nonebot-plugin-nailongremove",
"repository": "https://github.com/Refound-445/nonebot-plugin-nailongremove"
},
"split_keywords": [
"nonebot",
" plugin",
" image"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "48c47076edb1db42a452cf05f1f3834bc2b35442d55961ece185e05a528a39f2",
"md5": "adfc61d6a97e1e86188f6647b14eb6cd",
"sha256": "30ae6ee547abb6ee164de68922c30d3465678f03163fdd8ce4ea29071f065242"
},
"downloads": -1,
"filename": "nonebot_plugin_nailongremove-2.3.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "adfc61d6a97e1e86188f6647b14eb6cd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 7805,
"upload_time": "2024-12-09T08:01:40",
"upload_time_iso_8601": "2024-12-09T08:01:40.364831Z",
"url": "https://files.pythonhosted.org/packages/48/c4/7076edb1db42a452cf05f1f3834bc2b35442d55961ece185e05a528a39f2/nonebot_plugin_nailongremove-2.3.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e584ab710acb585a4fb3e1a279a20fd9eb7e6d4d9b15ec0dd61723873266a68b",
"md5": "1848adfd22d00f93c101e61f02aa8ecd",
"sha256": "906b00a454ee1076a18cadc39e0030deef5bbf27acab8a2febe9f34463e579a2"
},
"downloads": -1,
"filename": "nonebot_plugin_nailongremove-2.3.4.tar.gz",
"has_sig": false,
"md5_digest": "1848adfd22d00f93c101e61f02aa8ecd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 7579,
"upload_time": "2024-12-09T08:01:41",
"upload_time_iso_8601": "2024-12-09T08:01:41.906982Z",
"url": "https://files.pythonhosted.org/packages/e5/84/ab710acb585a4fb3e1a279a20fd9eb7e6d4d9b15ec0dd61723873266a68b/nonebot_plugin_nailongremove-2.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 08:01:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Refound-445",
"github_project": "nonebot-plugin-nailongremove",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot-plugin-nailongremove"
}