修复人脸框toSquare函数的问题

This commit is contained in:
2025-03-13 18:16:26 +08:00
parent eea943bba5
commit b48d2daffb
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@yizhi/ai", "name": "@yizhi/ai",
"version": "1.0.4", "version": "1.0.5",
"main": "dist/index.js", "main": "dist/index.js",
"types": "typing/index.d.ts", "types": "typing/index.d.ts",
"scripts": { "scripts": {

View File

@ -49,8 +49,8 @@ export class FaceBox {
return new FaceBox({ return new FaceBox({
...this.#option, ...this.#option,
x1: this.centerX - size, y1: this.centerY - size, x1: cx - size, y1: cy - size,
x2: this.centerX + size, y2: this.centerY + size, x2: cx + size, y2: cy + size,
}); });
} }
} }