IsThatOnFire/old-adetailer
收藏Hugging Face2023-09-01 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/IsThatOnFire/old-adetailer
下载链接
链接失效反馈官方服务:
资源简介:
# !After Detailer
!After Detailer is a extension for stable diffusion webui, similar to Detection Detailer, except it uses ultralytics instead of the mmdet.
## Install
(from Mikubill/sd-webui-controlnet)
1. Open "Extensions" tab.
2. Open "Install from URL" tab in the tab.
3. Enter `https://github.com/Bing-su/adetailer.git` to "URL for extension's git repository".
4. Press "Install" button.
5. Wait 5 seconds, and you will see the message "Installed into stable-diffusion-webui\extensions\adetailer. Use Installed tab to restart".
6. Go to "Installed" tab, click "Check for updates", and then click "Apply and restart UI". (The next time you can also use this method to update extensions.)
7. Completely restart A1111 webui including your terminal. (If you do not know what is a "terminal", you can reboot your computer: turn your computer off and turn it on again.)
You can now install it directly from the Extensions tab.

You **DON'T** need to download any model from huggingface.
## Options
| Model, Prompts | | |
| --------------------------------- | ------------------------------------- | ------------------------------------------------- |
| ADetailer model | Determine what to detect. | `None` = disable |
| ADetailer prompt, negative prompt | Prompts and negative prompts to apply | If left blank, it will use the same as the input. |
| Detection | | |
| ------------------------------------ | -------------------------------------------------------------------------------------------- | --- |
| Detection model confidence threshold | Only objects with a detection model confidence above this threshold are used for inpainting. | |
| Mask min/max ratio | Only use masks whose area is between those ratios for the area of the entire image. | |
If you want to exclude objects in the background, try setting the min ratio to around `0.01`.
| Mask Preprocessing | | |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| Mask x, y offset | Moves the mask horizontally and vertically by | |
| Mask erosion (-) / dilation (+) | Enlarge or reduce the detected mask. | [opencv example](https://docs.opencv.org/4.7.0/db/df6/tutorial_erosion_dilatation.html) |
| Mask merge mode | `None`: Inpaint each mask<br/>`Merge`: Merge all masks and inpaint<br/>`Merge and Invert`: Merge all masks and Invert, then inpaint | |
Applied in this order: x, y offset → erosion/dilation → merge/invert.
#### Inpainting
Each option corresponds to a corresponding option on the inpaint tab. Therefore, please refer to the inpaint tab for usage details on how to use each option.
## ControlNet Inpainting
You can use the ControlNet extension if you have ControlNet installed and ControlNet models.
Support `inpaint, scribble, lineart, openpose, tile` controlnet models. Once you choose a model, the preprocessor is set automatically. It works separately from the model set by the Controlnet extension.
## Advanced Options
API request example: [wiki/API](https://github.com/Bing-su/adetailer/wiki/API)
`ui-config.json` entries: [wiki/ui-config.json](https://github.com/Bing-su/adetailer/wiki/ui-config.json)
`[SEP], [SKIP]` tokens: [wiki/Advanced](https://github.com/Bing-su/adetailer/wiki/Advanced)
## Media
- 🎥 [どこよりも詳しいAfter Detailer (adetailer)の使い方① 【Stable Diffusion】](https://youtu.be/sF3POwPUWCE)
- 🎥 [どこよりも詳しいAfter Detailer (adetailer)の使い方② 【Stable Diffusion】](https://youtu.be/urNISRdbIEg)
## Model
| Model | Target | mAP 50 | mAP 50-95 |
| --------------------- | --------------------- | ----------------------------- | ----------------------------- |
| face_yolov8n.pt | 2D / realistic face | 0.660 | 0.366 |
| face_yolov8s.pt | 2D / realistic face | 0.713 | 0.404 |
| hand_yolov8n.pt | 2D / realistic hand | 0.767 | 0.505 |
| person_yolov8n-seg.pt | 2D / realistic person | 0.782 (bbox)<br/>0.761 (mask) | 0.555 (bbox)<br/>0.460 (mask) |
| person_yolov8s-seg.pt | 2D / realistic person | 0.824 (bbox)<br/>0.809 (mask) | 0.605 (bbox)<br/>0.508 (mask) |
| mediapipe_face_full | realistic face | - | - |
| mediapipe_face_short | realistic face | - | - |
| mediapipe_face_mesh | realistic face | - | - |
The yolo models can be found on huggingface [Bingsu/adetailer](https://huggingface.co/Bingsu/adetailer).
### Additional Model
Put your [ultralytics](https://github.com/ultralytics/ultralytics) yolo model in `webui/models/adetailer`. The model name should end with `.pt` or `.pth`.
It must be a bbox detection or segment model and use all label.
## Example


[](https://ko-fi.com/F1F1L7V2N)
# 详情修复器(After Detailer)
详情修复器(After Detailer)是一款面向 Stable Diffusion WebUI 的扩展插件,与 Detection Detailer 功能相近,区别在于其采用 Ultralytics 库替代了 MMDetection (mmdet)。
## 安装
(来源:Mikubill/sd-webui-controlnet)
1. 打开「扩展程序」标签页。
2. 在该标签页中打开「从URL安装」子标签页。
3. 将`https://github.com/Bing-su/adetailer.git`输入至「扩展程序Git仓库URL」字段。
4. 点击「安装」按钮。
5. 等待5秒后,你将看到提示信息:「已安装至 stable-diffusion-webuiextensionsadetailer。可通过「已安装」标签页重启UI」。
6. 切换至「已安装」标签页,点击「检查更新」,随后点击「应用并重启UI」(后续也可通过该方式更新扩展程序)。
7. 完全重启A1111 WebUI,包括命令行终端(若不清楚何为「终端」,可直接重启计算机:关机后重新开机)。
你现在也可直接通过「扩展程序」标签页完成安装。

你**无需**从 Hugging Face 下载任何模型。
## 配置项
### 模型与提示词
| 配置项 | 说明 | 默认值 |
| --------------------------------- | ------------------------------------- | ------------------------------------------------- |
| ADetailer 模型 | 确定待检测的目标类别 | `None` = 禁用该功能 |
| ADetailer 提示词、负向提示词 | 待应用的正向提示词与负向提示词 | 若留空,则使用与输入一致的提示词 |
### 检测参数
| 配置项 | 说明 |
| ------------------------------------ | -------------------------------------------------------------------------------------------- |
| 检测模型置信度阈值 | 仅将检测置信度高于该阈值的目标用于图像修复 |
| 掩码最小/最大面积比 | 仅使用整张图像面积占比处于该区间内的掩码 |
若需排除背景目标,可尝试将最小面积比设置为`0.01`左右。
### 掩码预处理
| 配置项 | 说明 | 参考链接 |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| 掩码X、Y偏移量 | 沿水平与垂直方向偏移掩码的位置 | |
| 掩码腐蚀(负值)/膨胀(正值) | 放大或缩小检测得到的掩码区域 | [OpenCV 腐蚀与膨胀教程](https://docs.opencv.org/4.7.0/db/df6/tutorial_erosion_dilatation.html) |
| 掩码合并模式 | `None`:对每个掩码单独执行图像修复<br/>`Merge`:合并所有掩码后统一执行图像修复<br/>`Merge and Invert`:合并所有掩码并反转掩码区域后,再执行图像修复 | |
处理顺序为:X/Y偏移 → 腐蚀/膨胀 → 合并/反转。
#### 图像修复
各参数均与图像修复标签页中的对应参数完全一致,如需了解各参数的详细用法,请参考图像修复标签页的官方说明。
## ControlNet 图像修复
若你已安装 ControlNet 扩展及 ControlNet 模型,即可使用该功能。支持`inpaint、scribble、lineart、openpose、tile`等 ControlNet 模型,选择对应模型后,预处理器将自动配置。该功能与 ControlNet 扩展中单独设置的模型相互独立。
## 高级配置
API 请求示例:[wiki/API](https://github.com/Bing-su/adetailer/wiki/API)
`ui-config.json` 配置项说明:[wiki/ui-config.json](https://github.com/Bing-su/adetailer/wiki/ui-config.json)
`[SEP]、[SKIP]` 标记(Token)用法:[wiki/Advanced](https://github.com/Bing-su/adetailer/wiki/Advanced)
## 教学视频
- 🎥 [比任何教程都详尽的After Detailer (adetailer)使用指南① 【Stable Diffusion】](https://youtu.be/sF3POwPUWCE)
- 🎥 [比任何教程都详尽的After Detailer (adetailer)使用指南② 【Stable Diffusion】](https://youtu.be/urNISRdbIEg)
## 内置模型
| 模型文件 | 检测目标 | mAP 50 | mAP 50-95 |
| --------------------- | --------------------- | ----------------------------- | ----------------------------- |
| face_yolov8n.pt | 2D / 写实人脸 | 0.660 | 0.366 |
| face_yolov8s.pt | 2D / 写实人脸 | 0.713 | 0.404 |
| hand_yolov8n.pt | 2D / 写实手部 | 0.767 | 0.505 |
| person_yolov8n-seg.pt | 2D / 写实人物 | 0.782(边界框)<br/>0.761(掩码) | 0.555(边界框)<br/>0.460(掩码) |
| person_yolov8s-seg.pt | 2D / 写实人物 | 0.824(边界框)<br/>0.809(掩码) | 0.605(边界框)<br/>0.508(掩码) |
| mediapipe_face_full | 写实人脸 | - | - |
| mediapipe_face_short | 写实人脸 | - | - |
| mediapipe_face_mesh | 写实人脸 | - | - |
上述YOLO模型可在 Hugging Face 的[Bingsu/adetailer](https://huggingface.co/Bingsu/adetailer)仓库中获取。
### 自定义模型
将你的 Ultralytics YOLO 模型文件放置于`webui/models/adetailer`目录下,模型文件名需以`.pt`或`.pth`结尾。该模型必须为边界框检测或实例分割模型,且需支持全标签类别。
## 效果示例


[](https://ko-fi.com/F1F1L7V2N)
提供机构:
IsThatOnFire
原始信息汇总
!After Detailer 数据集概述
模型
| 模型名称 | 目标对象 | mAP 50 | mAP 50-95 |
|---|---|---|---|
| face_yolov8n.pt | 2D / 真实人脸 | 0.660 | 0.366 |
| face_yolov8s.pt | 2D / 真实人脸 | 0.713 | 0.404 |
| hand_yolov8n.pt | 2D / 真实手部 | 0.767 | 0.505 |
| person_yolov8n-seg.pt | 2D / 真实人物 | 0.782 (bbox)<br/>0.761 (mask) | 0.555 (bbox)<br/>0.460 (mask) |
| person_yolov8s-seg.pt | 2D / 真实人物 | 0.824 (bbox)<br/>0.809 (mask) | 0.605 (bbox)<br/>0.508 (mask) |
| mediapipe_face_full | 真实人脸 | - | - |
| mediapipe_face_short | 真实人脸 | - | - |
| mediapipe_face_mesh | 真实人脸 | - | - |
附加模型
用户可以将 ultralytics 的 YOLO 模型放置在 webui/models/adetailer 目录下。模型文件名应以 .pt 或 .pth 结尾。模型必须是边界框检测或分割模型,并使用所有标签。
搜集汇总
数据集介绍

以上内容由遇见数据集搜集并总结生成



