Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

Dependency fix (#691)

Pavel Mises3a7ba4b9a827
diff --git a/README.md b/README.md
index 7ae9c3a..a841702 100644
--- a/README.md
+++ b/README.md
@@ -74,13 +74,22 @@ python: >3.7, <3.13
## Installation
-CPU support:
+If you have `onnxruntime` already installed, just install `rembg`:
```bash
pip install rembg # for library
pip install "rembg[cli]" # for library + cli
```
+Otherwise, install `rembg` with explicit CPU/GPU support.
+
+CPU support:
+
+```bash
+pip install rembg[cpu] # for library
+pip install "rembg[cpu,cli]" # for library + cli
+```
+
GPU support:
First of all, you need to check if your system supports the `onnxruntime-gpu`.
@@ -94,7 +103,7 @@ Go to <https://onnxruntime.ai> and check the installation matrix.
If yes, just run:
```bash
-pip install "rembg[GPU]" # for library
+pip install "rembg[gpu]" # for library
pip install "rembg[gpu,cli]" # for library + cli
```
diff --git a/setup.py b/setup.py
index a400a65..44cbabb 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,6 @@ long_description = (here / "README.md").read_text(encoding="utf-8")
install_requires = [
"jsonschema",
"numpy",
- "onnxruntime",
"opencv-python-headless",
"pillow",
"pooch",
@@ -37,6 +36,7 @@ extras_require = {
"twine",
"wheel",
],
+ "cpu": ["onnxruntime"],
"gpu": ["onnxruntime-gpu"],
"cli": [
"aiohttp",