diff --git a/packages/paddlejs-core/package.json b/packages/paddlejs-core/package.json index 4ce99380..bf9e2cc0 100644 --- a/packages/paddlejs-core/package.json +++ b/packages/paddlejs-core/package.json @@ -1,6 +1,6 @@ { "name": "@paddlejs/paddlejs-core", - "version": "2.1.28", + "version": "2.2.0", "description": "", "main": "lib/index", "scripts": { diff --git a/packages/paddlejs-core/src/postOps/multiclass_nms.ts b/packages/paddlejs-core/src/postOps/multiclass_nms.ts index 14ccc7fd..637a9e5b 100644 --- a/packages/paddlejs-core/src/postOps/multiclass_nms.ts +++ b/packages/paddlejs-core/src/postOps/multiclass_nms.ts @@ -84,7 +84,7 @@ export default function compute(inputs, attrs) { // threshold, sort, slice const scoresMapList = getMaxScore(scores[i], score_threshold, nms_top_k); if (!scoresMapList || !scoresMapList.length) { - return []; + continue; } const maxScoreMap = scoresMapList.shift(); const maxIndice = maxScoreMap.i; diff --git a/packages/paddlejs-models/humanseg/package-lock.json b/packages/paddlejs-models/humanseg/package-lock.json index d45baf5d..75bb7163 100644 --- a/packages/paddlejs-models/humanseg/package-lock.json +++ b/packages/paddlejs-models/humanseg/package-lock.json @@ -1,18 +1,18 @@ { "name": "@paddlejs-models/humanseg", - "version": "1.2.2", + "version": "1.2.3", "lockfileVersion": 1, "requires": true, "dependencies": { "@paddlejs/paddlejs-backend-webgl": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/@paddlejs/paddlejs-backend-webgl/-/paddlejs-backend-webgl-1.1.19.tgz", - "integrity": "sha512-m4akW0EZJOYFO181Q2C22Zs2olEn5H+J/gqzBDHPcuE87M3e9q2OtHpIduor31z0xnUii+6gn2zk3BvASU8CuA==" + "version": "1.2.9", + "resolved": "http://registry.npm.baidu-int.com/@paddlejs%2fpaddlejs-backend-webgl/-/paddlejs-backend-webgl-1.2.9.tgz", + "integrity": "sha512-cVDa0/Wbw2EyfsYqdYUPhFeqKsET79keEUWjyhYQmQkJfWg8j1qdR6yp7g6nx9qAGrqFvwuj1s0EqkYA1dok6A==" }, "@paddlejs/paddlejs-core": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/@paddlejs/paddlejs-core/-/paddlejs-core-2.1.17.tgz", - "integrity": "sha512-L4+y6X9VMoiWQm5JbvLT85SZcW7wD4Ieq7k1m1yXeJK+q56Ra6Gc5n0MDV+RyIWwqP35FxIk1oBvmcH/QpU/2g==" + "version": "2.1.28", + "resolved": "http://registry.npm.baidu-int.com/@paddlejs%2fpaddlejs-core/-/paddlejs-core-2.1.28.tgz", + "integrity": "sha512-dJ7dMwVqEe6S+BpX0LH+BoH7613IEgKVLK0Y2iQdtWJYljOUBRJJaAZeedylP69KNlCSg9fPdv8NaSSCzl/cew==" }, "@types/glob": { "version": "7.2.0", diff --git a/packages/paddlejs-models/humanseg/package.json b/packages/paddlejs-models/humanseg/package.json index 775887c3..b4df7f62 100644 --- a/packages/paddlejs-models/humanseg/package.json +++ b/packages/paddlejs-models/humanseg/package.json @@ -1,6 +1,6 @@ { "name": "@paddlejs-models/humanseg", - "version": "1.2.2", + "version": "1.2.3", "description": "", "main": "lib/index", "scripts": { @@ -10,8 +10,8 @@ "author": "", "license": "ISC", "dependencies": { - "@paddlejs/paddlejs-backend-webgl": "^1.1.19", - "@paddlejs/paddlejs-core": "^2.1.17" + "@paddlejs/paddlejs-backend-webgl": "^1.2.9", + "@paddlejs/paddlejs-core": "^2.1.28" }, "devDependencies": { "html-webpack-plugin": "^3.2.0", diff --git a/packages/paddlejs-models/humanseg/src/index_gpu.ts b/packages/paddlejs-models/humanseg/src/index_gpu.ts index a49fd56a..9e1ec054 100644 --- a/packages/paddlejs-models/humanseg/src/index_gpu.ts +++ b/packages/paddlejs-models/humanseg/src/index_gpu.ts @@ -16,8 +16,8 @@ interface LoadOptions { let runner = null as Runner; -let WIDTH = 398; -let HEIGHT = 224; +const WIDTH = 398; +const HEIGHT = 224; function registerCustomOp() { registerOp(segImg, 'segImg'); @@ -57,14 +57,7 @@ export async function load(options: LoadOptions = { canvasWidth: 500, canvasHeight: 280 }) { - const modelpath = 'https://paddlejs.bj.bcebos.com/models/fuse/humanseg/humanseg_398x224_fuse_activation/model.json'; - const lightModelPath = 'https://paddlejs.bj.bcebos.com/models/fuse/humanseg/humanseg_288x160_fuse_activation/model.json'; - const modelPath = options.enableLightModel ? lightModelPath : modelpath; - - if (options.enableLightModel) { - WIDTH = 288; - HEIGHT = 160; - } + const modelPath = 'https://paddlejs.cdn.bcebos.com/models/humansegv2/model.json'; runner = new Runner({ modelPath: modelPath,