Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package version added into the interface #81

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ for face in faces:

<p align="center"><img src="https://raw.githubusercontent.com/serengil/retinaface/master/tests/outputs/alignment-procedure.png" width="80%" height="80%"></p>

If you prefer to prioritize alignment before detection, you may opt to set the `align_first` parameter to True. By following this approach, you will eliminate the black pixel areas that arise as a result of alignment following detection. This functionality is applicable only when the provided image contains a single face.

**Face Recognition** - [`Demo`](https://youtu.be/WnUVYQP4h44)

Notice that face recognition module of insightface project is [ArcFace](https://sefiks.com/2020/12/14/deep-face-recognition-with-arcface-in-keras-and-python/), and face detection module is RetinaFace. ArcFace and RetinaFace pair is wrapped in [deepface](https://github.com/serengil/deepface) library for Python. Consider to use deepface if you need an end-to-end face recognition pipeline.
Expand Down Expand Up @@ -151,7 +153,7 @@ If you are using RetinaFace in your research, please consider to cite its [origi
}
```

Finally, if you use this RetinaFace re-implementation in your GitHub projects, please add retina-face dependency in the requirements.txt.
Finally, if you use this RetinaFace re-implementation in your GitHub projects, please add `retina-face` dependency in the requirements.txt.

## Licence

Expand Down
3 changes: 3 additions & 0 deletions package_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "0.0.15"
}
1 change: 1 addition & 0 deletions retinaface/RetinaFace.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import tensorflow as tf

from retinaface import __version__
from retinaface.model import retinaface_model
from retinaface.commons import preprocess, postprocess
from retinaface.commons.logger import Logger
Expand Down
1 change: 1 addition & 0 deletions retinaface/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.15"
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import setuptools

with open("README.md", "r", encoding="utf-8") as fh:
Expand All @@ -6,13 +7,17 @@
with open("requirements.txt", "r", encoding="utf-8") as f:
requirements = f.read().split("\n")

with open("package_info.json", "r", encoding="utf-8") as f:
package_info = json.load(f)


setuptools.setup(
name="retina-face", # pip install retina-face
version="0.0.14",
version=package_info["version"],
author="Sefik Ilkin Serengil",
author_email="[email protected]",
description="RetinaFace: Deep Face Detection Framework in TensorFlow for Python",
data_files=[("", ["README.md", "requirements.txt"])],
data_files=[("", ["README.md", "requirements.txt", "package_info.json"])],
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/serengil/retinaface",
Expand Down
13 changes: 13 additions & 0 deletions tests/test_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import json
from retinaface import RetinaFace
from retinaface.commons.logger import Logger

logger = Logger("tests/test_package.py")


def test_version():
with open("./package_info.json", "r", encoding="utf-8") as f:
package_info = json.load(f)

assert RetinaFace.__version__ == package_info["version"]
logger.info("✅ versions are matching in both package_info.json and retinaface/__init__.py")
Loading