Skip to content

Commit

Permalink
add option to download default models
Browse files Browse the repository at this point in the history
  • Loading branch information
ljchang committed Jan 2, 2024
1 parent bc60915 commit 7f0f12d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from setuptools import setup, find_packages
from feat.pretrained import get_pretrained_models

with open("requirements.txt") as f:
requirements = f.read().splitlines()
Expand All @@ -9,6 +10,18 @@

extra_setuptools_args = dict(tests_require=["pytest"])


def download_default_models():
face, landmark, au, emotion, facepose, identity = get_pretrained_models(
face_model="retinaface",
landmark_model="mobilefacenet",
au_model="xgb",
emotion_model="resmasknet",
facepose_model="img2pose",
identity_model="facenet",
)


setup(
name="py-feat",
version=version["__version__"],
Expand All @@ -31,6 +44,11 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
extras_require={
"default_models": [
download_default_models,
],
},
test_suite="feat/tests",
**extra_setuptools_args
)

0 comments on commit 7f0f12d

Please sign in to comment.