Skip to content

Leverage HuggingFace AI model for image background removal

Notifications You must be signed in to change notification settings

SrJSDev/hf-bg-remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hf-bg-remover

Leverage Hugging Face AI model briaai/RMBG-1.4 for image background removal in Node.js.

Saves the result as a compressed PNG, WEBP, and HEIC, which will keep the transparency of the image background. Also supports JPEG.

  • required Option: -i, --input {input}
    • Input URL, or filepath, or glob*
  • required Option: -o, --output {output}
    • Output filepath, or folder (if glob*)
    • Note: if a filepath, it should be named .png.
  • option: -p, --png
    • Save/compress to PNG
  • option: -w, --webp
    • Save/compress to WEBP
  • option: -h, --heic
    • Save/compress to HEIC
  • option: -j, --jpeg
    • Save/compress to JPEG
  • option: -s, --skip
    • Skip found background-removed images
    • Save/compress to JPEG
  • option: --fxlb
    • Apply FX: lens blur
  • option: --fxsb
    • Apply FX: surface blur

Credit 🙏

The inspiration and basis for this project was taken from this repo and transformers.js.

About

Leverage HuggingFace AI model for image background removal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published