mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 02:58:50 +00:00
[segment-anything] add multi point logic for demo site (#1002)
* [segment-anything] add multi point logic for demo site * [segment-anything] remove libs and update functions
This commit is contained in:
@ -141,7 +141,7 @@ self.addEventListener("message", async (event) => {
|
||||
}
|
||||
|
||||
self.postMessage({ status: "segmenting", message: "Segmenting" });
|
||||
const { mask, image } = sam.mask_for_point(points.x, points.y);
|
||||
const { mask, image } = sam.mask_for_point({ points });
|
||||
const maskDataURL = await createImageCanvas(mask, image);
|
||||
// Send the segment back to the main thread as JSON
|
||||
self.postMessage({
|
||||
|
Reference in New Issue
Block a user