Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qq15725/modern-rembg
🐘 Uses an AI model to remove image backgrounds. Only the ESM.
https://github.com/qq15725/modern-rembg
background-removal image-matting image-processing javascript onnx typescript
Last synced: about 2 months ago
JSON representation
🐘 Uses an AI model to remove image backgrounds. Only the ESM.
- Host: GitHub
- URL: https://github.com/qq15725/modern-rembg
- Owner: qq15725
- License: mit
- Created: 2023-12-01T11:00:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-07T07:11:25.000Z (about 1 year ago)
- Last Synced: 2024-04-23T21:22:42.738Z (8 months ago)
- Topics: background-removal, image-matting, image-processing, javascript, onnx, typescript
- Language: TypeScript
- Homepage:
- Size: 13.8 MB
- Stars: 17
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
modern-rembg
## 📦 Install
```shell
npm i modern-rembg# peerDependencies
npm i [email protected]
```## 🦄 Usage
```ts
import { removeBackground } from 'modern-rembg'removeBackground('/example.jpg').then(blob => {
window.open(URL.createObjectURL(blob))
})
```## Use custom model
```ts
import { removeBackground } from 'modern-rembg'removeBackground('/example.jpg', {
debug: true,
model: '/you-custom-model.onnx', // default use u2netp.onnx
resolution: 320, // model resolution
}).then(blob => {
window.open(URL.createObjectURL(blob))
})
```## Open source models
| Output | Model | Resolution | Size(MB) | From |
|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|------------|----------|-------------------------------------------------------------------------------|
| | | | | |
| | [u2net.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx) | 320 | 168 | [danielgatis/rembg](https://github.com/danielgatis/rembg) |
| | [u2netp.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2netp.onnx) | 320 | 4 | [danielgatis/rembg](https://github.com/danielgatis/rembg) |
| | [u2net_human_seg.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net_human_seg.onnx) | 320 | 168 | [danielgatis/rembg](https://github.com/danielgatis/rembg) |
| | [u2net_cloth_seg.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net_cloth_seg.onnx) | 768 | 168 | [danielgatis/rembg](https://github.com/danielgatis/rembg) |
| | [silueta.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/silueta.onnx) | 320 | 42 | [danielgatis/rembg](https://github.com/danielgatis/rembg) |
| | [isnet-general-use.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/isnet-general-use.onnx) | 320 | 170 | [danielgatis/rembg](https://github.com/danielgatis/rembg) |
| | [isnet-anime.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/isnet-anime.onnx) | 1024 | 168 | [danielgatis/rembg](https://github.com/danielgatis/rembg) |
| | [large](https://github.com/imgly/background-removal-js/raw/main/bundle/models/large?download=) | 1024 | 176 | [imgly/background-removal-js](https://github.com/imgly/background-removal-js) |
| | [medium](https://github.com/imgly/background-removal-js/raw/main/bundle/models/medium?download=) | 1024 | 88 | [imgly/background-removal-js](https://github.com/imgly/background-removal-js) |
| | [small](https://github.com/imgly/background-removal-js/raw/main/bundle/models/small?download=) | 1024 | 44 | [imgly/background-removal-js](https://github.com/imgly/background-removal-js) |
| | [PPModnet_MobileNetV2.onnx](https://github.com/qq15725/modern-rembg/releases/download/v0.0.0/PPModnet_MobileNetV2.onnx) | 320 | 26 | [PaddlePaddle/FastDeploy](https://github.com/PaddlePaddle/FastDeploy) |