mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-16 15:55:56 +08:00
Update USAGE.md (#553)
This commit is contained in:
parent
e44661aca4
commit
be319d3489
10
USAGE.md
10
USAGE.md
@ -27,6 +27,16 @@ session = new_session(model_name)
|
||||
output = remove(input, session=session)
|
||||
```
|
||||
|
||||
### For processing multiple image files
|
||||
By default, `remove` initialises a new session every call. This can be a large bottleneck if you're having to process multiple images. Initialise a session and pass it in to the `remove` function for fast multi-image support
|
||||
```python
|
||||
model_name = "unet"
|
||||
rembg_session = new_session(model_name)
|
||||
for img in images:
|
||||
output = remove(img, session=rembg_session)
|
||||
```
|
||||
|
||||
|
||||
### With alpha metting
|
||||
Alpha metting is a post processing step that can be used to improve the quality of the output.
|
||||
```python
|
||||
|
Loading…
x
Reference in New Issue
Block a user