mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-16 13:15:52 +08:00
Update base.py
This commit is contained in:
parent
fdedf86e56
commit
112e76d3cd
@ -41,7 +41,7 @@ class BaseSession:
|
||||
im = img.convert("RGB").resize(size, Image.Resampling.LANCZOS)
|
||||
|
||||
im_ary = np.array(im)
|
||||
im_ary = im_ary / np.max(im_ary)
|
||||
im_ary = im_ary / max(np.max(im_ary), 1e-6)
|
||||
|
||||
tmpImg = np.zeros((im_ary.shape[0], im_ary.shape[1], 3))
|
||||
tmpImg[:, :, 0] = (im_ary[:, :, 0] - mean[0]) / std[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user