Skip to content

Library for remove image background for node and python

Notifications You must be signed in to change notification settings

rhaymisonbetini/remove-bg-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REMOVE BACKGROUND FOR NODE.JS

Library for remove image background for node and python

npm npm

INSTALL

To use this library you will need to have Python installed in your environment. Ensuring you have Python run the command:

pip install rembg

Now install our library

npm install remove-bg-node

HOW TO USE

Import the library on your system with

const RemoveBackground = require('remove-bg-node');

or

import RemoveBackground from 'remove-bg-node';

Now you must create an instance of your class.

let rm = new RemoveBackground();

We will call the main method and we will pass the directory of our image and the directory to which we must save our image without the background

full example

'use strict'
const RemoveBackground = require('remove-bg-node');
let rm = new RemoveBackground();
let current = __dirname + '/teste/cristian.jpg';
let save = __dirname + '/deploy';
await rm.asyncRemoveBackground(current, save)

ps:A file with the same name will be generated.

Result

Before:

After

About

Library for remove image background for node and python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published