Instructions to use Xenova/modnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/modnet with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-segmentation', 'Xenova/modnet');
Would be nice to have the output with the alpha already premultiplied
#3
by tonynoce - opened
Thanks for this repo and transformers JS !
It would be nice to add the ability to output the rgbA premultiplied of the image since I see that sharp is already installed as a dependency.
My js skills are low but tried to use it ( on Windows ) and couldnt make it, I had to use an external library for this ( Jimp ) in order to add the alpha channel to the original rgb and premultiply it