Skip to content

Commit

Permalink
add more models
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgatis committed Apr 22, 2022
1 parent 738cf15 commit 84a21b4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
2 changes: 1 addition & 1 deletion rembg/bg.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def remove(
alpha_matting_background_threshold,
alpha_matting_erode_size,
)
except:
except ValueError:
cutout = naive_cutout(img, mask)

else:
Expand Down
50 changes: 36 additions & 14 deletions rembg/session_cloth.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,50 @@

from .session_base import BaseSession

# fmt: off
pallete1 = [
0, 0, 0, # background
255, 255, 255, # upper body
0, 0, 0, # lower body
0, 0, 0, # full body
0,
0,
0,
255,
255,
255,
0,
0,
0,
0,
0,
0,
]

pallete2 = [
0, 0, 0, # background
0, 0, 0, # upper body
255, 255, 255, # lower body
0, 0, 0, # full body
0,
0,
0,
0,
0,
0,
255,
255,
255,
0,
0,
0,
]

pallete3 = [
0, 0, 0, # background
0, 0, 0, # upper body
0, 0, 0, # lower body
255, 255, 255, # full body
0,
0,
0,
0,
0,
0,
0,
0,
0,
255,
255,
255,
]
# fmt: on


class ClothSession(BaseSession):
Expand Down

0 comments on commit 84a21b4

Please sign in to comment.