Installation
- install python
- install pytorch
- install rembg tool
- install node js
- npm i rembg-nodejs
how to use ?
const {folder, file, link} = require('rembg-nodejs');
async function run () {
// if you want to convert image file
await file('./output','./input.jpeg', (res) => console.log(res));
// convert images in folder
await folder('./output_folder','./input_folder', (res) => console.log(res));
// convert from url
await link('http://example/image.jpg','./output.png', (res) => console.log(res));
}
run();