Skip to content

Commit

Permalink
hotfix: Fixed bug in applySegmentationMask
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHauschildt committed Jun 6, 2024
1 parent d6070d6 commit 20f08c6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/web-examples/vite-project/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/web/src/api/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 20f08c6

Please sign in to comment.