mirror of
https://git.mirrors.martin98.com/https://github.com/xuebinqin/U-2-Net
synced 2025-08-13 06:39:03 +08:00
added setup scirpt for downloading model weights
This commit is contained in:
parent
0c7b881f92
commit
9b018c6128
@ -2,3 +2,5 @@ numpy==1.16.0
|
|||||||
scikit-image==0.17.2
|
scikit-image==0.17.2
|
||||||
pillow==7.2.0
|
pillow==7.2.0
|
||||||
opencv-python==3.4.2.17
|
opencv-python==3.4.2.17
|
||||||
|
|
||||||
|
gdown==3.12.2
|
||||||
|
13
setup_model_weights.py
Normal file
13
setup_model_weights.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import os
|
||||||
|
import gdown
|
||||||
|
|
||||||
|
os.makedirs('./saved_models/u2net', exist_ok=True)
|
||||||
|
os.makedirs('./saved_models/u2net_portrait', exist_ok=True)
|
||||||
|
|
||||||
|
gdown.download('https://drive.google.com/uc?id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ',
|
||||||
|
'./saved_models/u2net/u2net.pth',
|
||||||
|
quiet=False)
|
||||||
|
|
||||||
|
gdown.download('https://drive.google.com/uc?id=1IG3HdpcRiDoWNookbncQjeaPN28t90yW',
|
||||||
|
'./saved_models/u2net_portrait/u2net_portrait.pth',
|
||||||
|
quiet=False)
|
Loading…
x
Reference in New Issue
Block a user