mirror of
https://github.com/jech/galene.git
synced 2024-12-22 15:25:48 +01:00
Close the image segmenter result.
This doesn't currently do anything useful, since we're running tflite on the CPU, but might avoid bugs if we get GPU support.
This commit is contained in:
parent
a38676c9f6
commit
bf46a9d6c1
1 changed files with 1 additions and 0 deletions
|
@ -47,6 +47,7 @@ onmessage = e => {
|
||||||
let id = new ImageData(width, height);
|
let id = new ImageData(width, height);
|
||||||
for(let i = 0; i < mask.length; i++)
|
for(let i = 0; i < mask.length; i++)
|
||||||
id.data[4 * i + 3] = mask[i];
|
id.data[4 * i + 3] = mask[i];
|
||||||
|
result.close();
|
||||||
createImageBitmap(id).then(ib => {
|
createImageBitmap(id).then(ib => {
|
||||||
postMessage({
|
postMessage({
|
||||||
bitmap: bitmap,
|
bitmap: bitmap,
|
||||||
|
|
Loading…
Reference in a new issue