From 20f08c6f76f5b4c9f83caf008999aa959572e5d9 Mon Sep 17 00:00:00 2001 From: "Dr. Daniel Hauschildt" Date: Thu, 6 Jun 2024 09:48:54 +0200 Subject: [PATCH] hotfix: Fixed bug in applySegmentationMask --- package-lock.json | 10 +++++----- packages/web-examples/vite-project/package-lock.json | 8 ++++---- packages/web/src/api/v1.ts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1300635..cc2b4aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "workspace", - "version": "1.5.1", + "version": "1.5.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "workspace", - "version": "1.5.1", + "version": "1.5.2", "workspaces": [ "packages/web", "packages/web-data", @@ -5241,7 +5241,7 @@ }, "packages/node": { "name": "@imgly/background-removal-node", - "version": "1.5.1", + "version": "1.5.2", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "@types/lodash": "~4.14.195", @@ -5793,7 +5793,7 @@ }, "packages/web": { "name": "@imgly/background-removal", - "version": "1.5.1", + "version": "1.5.2", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "@types/lodash-es": "^4.17.12", @@ -5820,7 +5820,7 @@ }, "packages/web-data": { "name": "@imgly/background-removal-data", - "version": "1.5.1", + "version": "1.5.2", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "onnxruntime-web": "~1.18.0" diff --git a/packages/web-examples/vite-project/package-lock.json b/packages/web-examples/vite-project/package-lock.json index 2350640..020cce8 100644 --- a/packages/web-examples/vite-project/package-lock.json +++ b/packages/web-examples/vite-project/package-lock.json @@ -1,12 +1,12 @@ { "name": "vite-project", - "version": "1.5.1", + "version": "1.5.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vite-project", - "version": "1.5.1", + "version": "1.5.2", "dependencies": { "@imgly/background-removal": "file:../../web", "@imgly/background-removal-data": "file:../../web-data", @@ -48,7 +48,7 @@ }, "../../web": { "name": "@imgly/background-removal", - "version": "1.5.1", + "version": "1.5.2", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "@types/lodash-es": "^4.17.12", @@ -75,7 +75,7 @@ }, "../../web-data": { "name": "@imgly/background-removal-data", - "version": "1.5.1", + "version": "1.5.2", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "onnxruntime-web": "~1.18.0" diff --git a/packages/web/src/api/v1.ts b/packages/web/src/api/v1.ts index d2aa3c4..6abc376 100644 --- a/packages/web/src/api/v1.ts +++ b/packages/web/src/api/v1.ts @@ -167,7 +167,7 @@ async function applySegmentationMask( for (let i = 0; i < stride; i += 1) { const idxImage = imageChannels * i; const idxMask = maskChannels * i; - imageTensor.data[idxImage + 3] = alphaMask.data[idxMask]; // alpha information it always in the first (sometimes also in the others) + imageTensor.data[idxImage + 3] = alphaMask.data[idxMask + 3]; } const outImage = await utils.imageEncode(