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
+1 -1
View File
@@ -92,7 +92,7 @@ func Start(pythonPath string, threshold float64) (*Detector, error) {
}
// 模型目录:程序运行目录下的 lib(和 application.properties / media-info.db 同一根目录)。
// 服务脚本优先加载 lib/320n.onnx;本地没有会自己下载到那里,下载失败再回退用 pip 自带模型。
// 服务脚本优先加载 lib/nwfs/320n.onnx;本地没有会自己下载到那里,下载失败再回退用 pip 自带模型。
modelDir := ""
if wd, err := os.Getwd(); err == nil {
modelDir = filepath.Join(wd, "lib")