feat: 二次元识别功能 + 模型目录整理(nwfs/wd-tagger 子目录),修复 wd-tagger 输入维度(NHWC)

This commit is contained in:
2025-06-25 21:10:21 +08:00
parent 4efa48f550
commit 3af2bf70b4
18 changed files with 1386 additions and 21 deletions
+7
View File
@@ -68,6 +68,13 @@ func ImageDirSensitive(ext string, width, height int, darkScore, lightScore floa
return imageDir("图片_敏感", ext, width, height, darkScore, lightScore)
}
// ImageDirHentai 返回一张被判为二次元敏感的图片该进的文件夹路径,比如:
// - 「图片_二次元_GIF」:GIF 单独放(不做明暗分类)
// - 「图片_二次元_横屏_1080P/bright_20」:普通分类前加「_二次元」前缀,明暗仍是子目录
func ImageDirHentai(ext string, width, height int, darkScore, lightScore float64) string {
return imageDir("图片_二次元", ext, width, height, darkScore, lightScore)
}
// imageDir 拼出"类型 + 方向 + 清晰度 + 明暗子目录"这段路径。
func imageDir(kind, ext string, width, height int, darkScore, lightScore float64) string {
if strings.EqualFold(ext, ".gif") {