{"id":19217585,"url":"https://github.com/qq15725/modern-rembg","last_synced_at":"2025-06-17T04:33:56.484Z","repository":{"id":211073104,"uuid":"726015813","full_name":"qq15725/modern-rembg","owner":"qq15725","description":"🐘 Uses an AI model to remove image backgrounds. Only the ESM.","archived":false,"fork":false,"pushed_at":"2024-05-27T12:48:44.000Z","size":14524,"stargazers_count":39,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-13T00:09:13.624Z","etag":null,"topics":["background-removal","image-matting","image-processing","javascript","onnx","typescript"],"latest_commit_sha":null,"homepage":"https://toolpkg.com/remove-background","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qq15725.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-01T11:00:02.000Z","updated_at":"2025-04-29T15:24:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"d658730f-2a17-4134-8a1b-742d0c24bb3e","html_url":"https://github.com/qq15725/modern-rembg","commit_stats":null,"previous_names":["qq15725/modern-rembg"],"tags_count":6,"template":false,"template_full_name":"qq15725/starter-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fmodern-rembg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fmodern-rembg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fmodern-rembg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq15725%2Fmodern-rembg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qq15725","download_url":"https://codeload.github.com/qq15725/modern-rembg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843215,"owners_count":21972873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background-removal","image-matting","image-processing","javascript","onnx","typescript"],"created_at":"2024-11-09T14:22:54.619Z","updated_at":"2025-05-13T00:09:25.222Z","avatar_url":"https://github.com/qq15725.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003emodern-rembg\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://unpkg.com/modern-rembg\"\u003e\n    \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/modern-rembg\" alt=\"Minzip\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/modern-rembg\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/modern-rembg.svg\" alt=\"Version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/modern-rembg\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/modern-rembg\" alt=\"Downloads\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/qq15725/modern-rembg/issues\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/qq15725/modern-rembg\" alt=\"Issues\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/qq15725/modern-rembg/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/modern-rembg.svg\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 📦 Install\n\n```shell\nnpm i modern-rembg\n\n# peerDependencies\nnpm i onnxruntime-web@1.18.0\n```\n\n## 🦄 Usage\n\n```ts\nimport { removeBackground } from 'modern-rembg'\n\nremoveBackground('/example.jpg').then(blob =\u003e {\n  window.open(URL.createObjectURL(blob))\n})\n```\n\n## Use custom model\n\n```ts\nimport { removeBackground } from 'modern-rembg'\n\nremoveBackground('/example.jpg', {\n  debug: true,\n  model: '/you-custom-model.onnx', // default use u2netp.onnx\n  resolution: 320, // model resolution\n}).then(blob =\u003e {\n  window.open(URL.createObjectURL(blob))\n})\n```\n\n## Open source models\n\n| Output                                                            | Model                                                                                                                   | Resolution | Size(MB) | From                                                                          |\n|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|------------|----------|-------------------------------------------------------------------------------|\n| \u003cimg src=\"./examples/example.jpg\" width=\"60\" /\u003e                   |                                                                                                                         |            |          |                                                                               |\n| \u003cimg src=\"./examples/u2net.onnx.png\" width=\"60\" /\u003e                | [u2net.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx)                                  | 320        | 168      | [danielgatis/rembg](https://github.com/danielgatis/rembg)                     |\n| \u003cimg src=\"./examples/u2netp.onnx.png\" width=\"60\" /\u003e               | [u2netp.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2netp.onnx)                                | 320        | 4        | [danielgatis/rembg](https://github.com/danielgatis/rembg)                     |\n| \u003cimg src=\"./examples/u2net_human_seg.onnx.png\" width=\"60\" /\u003e      | [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)                     |\n| \u003cimg src=\"./examples/u2net_cloth_seg.onnx.png\" width=\"60\" /\u003e      | [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)                     |\n| \u003cimg src=\"./examples/silueta.onnx.png\" width=\"60\" /\u003e              | [silueta.onnx](https://github.com/danielgatis/rembg/releases/download/v0.0.0/silueta.onnx)                              | 320        | 42       | [danielgatis/rembg](https://github.com/danielgatis/rembg)                     |\n| \u003cimg src=\"./examples/isnet-general-use.onnx.png\" width=\"60\" /\u003e    | [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)                     |\n| \u003cimg src=\"./examples/isnet-anime.onnx.png\" width=\"60\" /\u003e          | [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)                     |\n| \u003cimg src=\"./examples/large.png\" width=\"60\" /\u003e                     | [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) |\n| \u003cimg src=\"./examples/medium.png\" width=\"60\" /\u003e                    | [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) |\n| \u003cimg src=\"./examples/small.png\" width=\"60\" /\u003e                     | [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) |\n| \u003cimg src=\"./examples/PPModnet_MobileNetV2.onnx.png\" width=\"60\" /\u003e | [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)         |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq15725%2Fmodern-rembg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqq15725%2Fmodern-rembg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq15725%2Fmodern-rembg/lists"}