chore: 移除未使用的 ui-icon-detect 模型(80MB)
- webpage-element.onnx 为实测首选模型,运行时永远先命中; ui-icon-detect/model.onnx 仅作为老安装包兜底回退,无实际使用场景 - 删除模型目录(含无引用的 preprocessor_config.json),运行时去掉兜底候选 - 上一个提交给打包加的 ui-icon-detect 拷贝行随之移除 - 注:git 历史中该 blob 仍存在(不做历史改写),仅工作区与新 clone 不再需要下载该模型
This commit is contained in:
parent
5a3d4cbdbd
commit
79bba4296f
@ -29,7 +29,6 @@ export default {
|
||||
{ from: path.join(root, "resources", "capability-duplicates.json"), to: "capability-duplicates.json" },
|
||||
{ from: path.join(root, "resources", "desktop-picker.ps1"), to: "desktop-picker.ps1" },
|
||||
{ from: path.join(root, "resources", "models", "ui-element-detect"), to: "models/ui-element-detect" },
|
||||
{ from: path.join(root, "resources", "models", "ui-icon-detect"), to: "models/ui-icon-detect" },
|
||||
{ from: path.join(root, "resources", "fixture"), to: "fixture" }
|
||||
],
|
||||
asar: true,
|
||||
|
||||
Binary file not shown.
@ -1,12 +0,0 @@
|
||||
{
|
||||
"do_normalize": false,
|
||||
"do_rescale": true,
|
||||
"do_resize": true,
|
||||
"feature_extractor_type": "ImageFeatureExtractor",
|
||||
"resample": 2,
|
||||
"rescale_factor": 0.00392156862745098,
|
||||
"size_divisor": 16,
|
||||
"size": {
|
||||
"longest_edge": 640
|
||||
}
|
||||
}
|
||||
@ -41,11 +41,10 @@ export function localUiModelPath(): string {
|
||||
app.getAppPath() ? path.join(app.getAppPath(), "resources") : "",
|
||||
path.join(app.getAppPath(), "temp", "models")
|
||||
].filter(Boolean);
|
||||
// webpage-element 是实测后的首选模型;保留旧模型作为老安装包的兼容回退。
|
||||
// webpage-element 是实测后的首选模型(旧 ui-icon-detect/model.onnx 兜底已移除,不再维护)
|
||||
const fileCandidates = rootCandidates.flatMap(root => [
|
||||
path.join(root, "models", "ui-element-detect", "webpage-element.onnx"),
|
||||
path.join(root, "webpage-element.onnx"),
|
||||
path.join(root, "models", "ui-icon-detect", "model.onnx")
|
||||
path.join(root, "webpage-element.onnx")
|
||||
]);
|
||||
const found = fileCandidates.find(candidate => {
|
||||
try { return fs.existsSync(candidate) && fs.statSync(candidate).isFile(); }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user