added setup scirpt for downloading model weights

This commit is contained in:
adakoda 2020-12-24 10:56:03 +09:00
parent 0c7b881f92
commit 9b018c6128
2 changed files with 15 additions and 0 deletions

View File

@ -2,3 +2,5 @@ numpy==1.16.0
scikit-image==0.17.2
pillow==7.2.0
opencv-python==3.4.2.17
gdown==3.12.2

13
setup_model_weights.py Normal file
View 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)