Merge branch 'serengil:master' into unit_tests_workflow

This commit is contained in:
Onur Atakan ULUSOY 2022-05-24 17:24:35 +03:00 committed by GitHub
commit a08ac8ab5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
__pycache__/* __pycache__/*
basemodels/__pycache__/* basemodels/__pycache__/*
configurations/__pycache__/* configurations/__pycache__/*
tests/__pycache__/*
build/ build/
dist/ dist/
Pipfile Pipfile

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM python:3.8
LABEL org.opencontainers.image.source https://github.com/serengil/deepface
COPY . .
RUN apt-get update
RUN apt-get install ffmpeg libsm6 libxext6 -y
RUN pip install .
CMD ["deepface", "--help"]

View File

@ -11,7 +11,6 @@ import numpy as np
import pandas as pd import pandas as pd
from tqdm import tqdm from tqdm import tqdm
import pickle import pickle
import fire
from deepface.basemodels import VGGFace, OpenFace, Facenet, Facenet512, FbDeepFace, DeepID, DlibWrapper, ArcFace, SFace, Boosting from deepface.basemodels import VGGFace, OpenFace, Facenet, Facenet512, FbDeepFace, DeepID, DlibWrapper, ArcFace, SFace, Boosting
from deepface.extendedmodels import Age, Gender, Race, Emotion from deepface.extendedmodels import Age, Gender, Race, Emotion
@ -826,4 +825,5 @@ def detectFace(img_path, target_size = (224, 224), detector_backend = 'opencv',
functions.initialize_folder() functions.initialize_folder()
def cli(): def cli():
import fire
fire.Fire() fire.Fire()

3
scripts/dockerize.sh Normal file
View File

@ -0,0 +1,3 @@
docker build -t deepface_image .
docker run -it deepface_image /bin/sh

11
scripts/push-release.sh Normal file
View File

@ -0,0 +1,11 @@
cd ..
echo "deleting existing release related files"
rm -rf dist/*
rm -rf build/*
echo "creating a package for current release - pypi compatible"
python setup.py sdist bdist_wheel
echo "pushing the release to pypi"
python -m twine upload dist/*

View File

@ -13,7 +13,6 @@ setuptools.setup(
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
url="https://github.com/serengil/deepface", url="https://github.com/serengil/deepface",
packages=setuptools.find_packages(), packages=setuptools.find_packages(),
scripts=['deepface/models/face-recognition-ensemble-model.txt'],
classifiers=[ classifiers=[
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",