wsh032 / image-deduplicate-cluster-webui Goto Github PK
View Code? Open in Web Editor NEWA WebUI script that deduplicates images or clusters them by tags or WD14. 一个用于图像查重和基于tags或者WD14提取的特征进行聚类的WebUI脚本
License: Apache License 2.0
A WebUI script that deduplicates images or clusters them by tags or WD14. 一个用于图像查重和基于tags或者WD14提取的特征进行聚类的WebUI脚本
License: Apache License 2.0
我在C站和其他地方收集了很多图片,希望能使用这个工具对图片进行分类.
可能会在做为SD-WebUI
扩展使用时出现
ImportError: cannot import name 'cluster_ui' from 'ui'
因为python import的机制,即使修改了 sys.path
来指定模块导入路径优先级,对于已经导入过并存放于 sys.modules
的模块,也不会再次导入。
当与其他扩展一同使用时,只要另一个扩展也有一个名为 ui
的包或模块,就会出现上诉问题。要么是本扩展无法使用,要么是另一个扩展无法使用。
当独立运行时,这种情况不会出现。
在 V 2.0.1 版本中,文件夹 ./ui
将被更名为 ./img_dedup_clust
计划:
现在查重的结果只支持删除
,聚类则支持删除
,重命名
,移动
同时启用缓存功能时候对如有缓存的处理情况不一样
.npz
文件比如说指定 衣服
,表情
等几个类别,聚类时候会只考虑该类的tag 如 skirt
,smile
来进行聚类,而忽略其他tag,以实现更精细的聚类
采用模型:deberta-v3-base-tasksource-nli对现有标签进行类型判定
将支持自定义类别
同时会预设并缓存常用类别,以实现高速判别
作者好,
正常安装后,运行run_deduplicate_images.ps1时报错:
File "E:\AI SCRIPTS\image-deduplicate-cluster-webui\deduplicate_images.py", line 417, in
delet_button.click(fn=delet,
File "E:\AI SCRIPTS\image-deduplicate-cluster-webui\venv\lib\site-packages\gradio\events.py", line 132, in call
dep, dep_index = self.trigger.set_event_trigger(
File "E:\AI SCRIPTS\image-deduplicate-cluster-webui\venv\lib\site-packages\gradio\blocks.py", line 237, in set_event_trigger
special_args(fn) if fn else (None, None, None)
File "E:\AI SCRIPTS\image-deduplicate-cluster-webui\venv\lib\site-packages\gradio\helpers.py", line 631, in special_args
elif type_hint and issubclass(type_hint, EventData):
TypeError: issubclass() arg 1 must be a class
麻烦看看,感谢。
Traceback (most recent call last):
File "D:\image-deduplicate-cluster-webui-main\deduplicate_images.py", line 417, in
delet_button.click(fn=delet,
File "D:\image-deduplicate-cluster-webui-main\venv\lib\site-packages\gradio\events.py", line 132, in call
dep, dep_index = self.trigger.set_event_trigger(
File "D:\image-deduplicate-cluster-webui-main\venv\lib\site-packages\gradio\blocks.py", line 237, in set_event_trigger
special_args(fn) if fn else (None, None, None)
File "D:\image-deduplicate-cluster-webui-main\venv\lib\site-packages\gradio\helpers.py", line 631, in special_args
elif type_hint and issubclass(type_hint, EventData):
TypeError: issubclass() arg 1 must be a class
Kohya的原始脚本好像存在一个 frequency_tags
参数,我当时以为没用删掉了。
但对于SD-lora训练来说,tags按照可信度大小排序是很重要的一个功能,因为训练中,排在前面的token权重会更高。
计划:
按照WD14推理结果给出的可信度排序tags
计划:
我先将 smilewolf 的 WD14 模型转换成onnx格式,然后上传到我自己的huggingface
这样可以直接下载模型使用,不再要求使用 tensorflow 编译
缺点:
优点:
部署加快
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.