Skip to content

Commit

Permalink
update stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
rnag committed Mar 9, 2023
1 parent f6939f0 commit aa3f00b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# github: [danielgatis]
# custom: ["https://www.buymeacoffee.com/danielgatis"]
github: [rnag]
custom: ["https://www.buymeacoffee.com/ritviknag"]
1 change: 1 addition & 0 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install .
pip install -r requirements-dev.txt
pip install pytest
- name: Test installation with pytest
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-specific-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Test with pytest
run: |
PYTHONPATH=$PYTHONPATH:. pytest .
2 changes: 1 addition & 1 deletion rembg/bg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
)
from PIL import Image
from PIL.Image import Image as PILImage

# from pymatting.alpha.estimate_alpha_cf import estimate_alpha_cf
# from pymatting.foreground.estimate_foreground_ml import estimate_foreground_ml
# from pymatting.util.util import stack_images
Expand Down Expand Up @@ -116,7 +117,6 @@ def remove(
only_mask: bool = False,
post_process_mask: bool = False,
) -> Union[bytes, PILImage, np.ndarray]:

if isinstance(data, PILImage):
return_type = ReturnType.PILLOW
img = data
Expand Down
1 change: 1 addition & 0 deletions rembg/session_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import onnxruntime as ort

from .session_base import BaseSession

# from .session_cloth import ClothSession
from .session_simple import SimpleSession

Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
imagehash==4.3.1
14 changes: 0 additions & 14 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
# aiohttp==3.8.1
# asyncer==0.0.2
# click==8.1.3
# fastapi==0.87.0
# filetype==1.2.0
# pooch==1.6.0
imagehash==4.3.1
numpy==1.23.5
onnxruntime==1.13.1
opencv-python-headless==4.6.0.66
pillow==9.3.0
# pymatting==1.1.8
# python-multipart==0.0.5
# scikit-image==0.19.3
# scipy==1.9.3
# tqdm==4.64.1
# uvicorn==0.20.0
# watchdog==2.1.9
23 changes: 2 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

sys.path.append(os.path.dirname(__file__))
from setuptools import find_packages, setup
from setuptools import setup

import versioneer

Expand All @@ -16,7 +16,7 @@
description="Remove image background",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/rnag/rembg",
url="https://github.com/rnag/rembg-aws-lambda",
author="Daniel Gatis",
author_email="[email protected]",
classifiers=[
Expand All @@ -39,30 +39,11 @@
include_package_data=True,
python_requires=">3.7, <3.11",
install_requires=[
# "aiohttp~=3.8.1",
# "asyncer~=0.0.2",
# "click~=8.1.3",
# "fastapi~=0.87.0",
# "filetype~=1.2.0",
# "pooch~=1.6.0",
# "imagehash~=4.3.1",
"numpy~=1.23.5",
"onnxruntime~=1.13.1",
"opencv-python-headless~=4.6.0.66",
"pillow~=9.3.0",
# "pymatting~=1.1.8",
# "python-multipart~=0.0.5",
# "scikit-image~=0.19.3",
# "scipy~=1.9.3",
# "tqdm~=4.64.1",
# "uvicorn~=0.20.0",
# "watchdog~=2.1.9",
],
# entry_points={
# "console_scripts": [
# "rembg=rembg.cli:main",
# ],
# },
extras_require={
"gpu": ["onnxruntime-gpu~=1.13.1"],
},
Expand Down

0 comments on commit aa3f00b

Please sign in to comment.