Module de détection faciale pour la modération de contenu
Project description
Niyya Face Detector
Module de détection faciale pour la modération de contenu image.
Supporte Haar Cascades, DNN et RetinaFace via une interface unifiée.
🚀 Installation
# Installation de base
pip install niyya-face-detector
Prérequis système (Linux)
# Pour OpenCV
sudo apt-get install -y libgl1-mesa-glx libglib2.0-0
📖 Usage Rapide
Détection depuis un fichier
from face_detection.detector import FaceDetector
# Initialisation
detector = FaceDetector(model_type="retinaface") # ou "haar", "dnn"
# Analyse d'une image
result = detector.analyze("photo.jpg")
print(f"Visage détecté: {result['has_face']}")
print(f"Nombre de visages: {result['face_count']}")
print(f"Confiance: {result['confidence']:.2%}")
Analyse depuis des bytes (pour API)
with open("photo.jpg", "rb") as f:
image_bytes = f.read()
result = detector.analyze_bytes(image_bytes)
⚙️ Modèles Disponus
| Modèle | Précision | Vitesse | Usage Recommandé |
|---|---|---|---|
haar |
⭐⭐ | ⚡⚡ | Tests rapides, prototype |
dnn (en cours d'implémentation) |
⭐⭐⭐⭐ | ⚡⚡ | Production légère |
retinaface |
⭐⭐⭐⭐⭐ | ⚡ | Hijab, occlusions, production |
Conseil : Pour une détection optimale sur des visages avec occlusions partielles, utilisez le modèle
retinaface.
📦 Options d'Installation
# Développement
pip install niyya-face-detector[dev]
# Documentation
pip install niyya-face-detector[docs]
# Tout en un
pip install niyya-face-detector[all]
🧪 Tests
# Installer les dépendances de test
pip install niyya-face-detector[dev]
# Lancer les tests
pytest tests/ -v
📚 Documentation Complète
La documentation complète est disponible sur :
🔗 https://saadiinho.github.io/niyya-face-detector/
🤝 Contributing
Les contributions sont les bienvenues !
- Fork le projet
- Crée une branche feature (
git checkout -b feature/amazing-feature) - Commit tes changements (
git commit -m 'Add amazing feature') - Push vers la branche (
git push origin feature/amazing-feature) - Ouvre une Pull Request
📄 Licence
Distribué sous la licence MIT. Voir LICENSE pour plus d'informations.
🙏 Remerciements
- OpenCV pour la vision par ordinateur
- InsightFace pour RetinaFace
- La communauté Niyya Women pour les retours et tests
📞 Contact
Saad RAFIQUL - @Saadiinho - saad.rafiqul1@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file niyya_face_detector-1.2.1.tar.gz.
File metadata
- Download URL: niyya_face_detector-1.2.1.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
139c9248d1f6dd6972428fa96a7de16ab872eec0a92c23b162566bcdb95cf53d
|
|
| MD5 |
1ee48b1da1d658f6050db18078bb9fe9
|
|
| BLAKE2b-256 |
710c49a61eedd96937f7806f7bc91f039722095a11d46de280662d295016aafe
|
Provenance
The following attestation bundles were made for niyya_face_detector-1.2.1.tar.gz:
Publisher:
publish.yml on Saadiinho/face-detection
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
niyya_face_detector-1.2.1.tar.gz -
Subject digest:
139c9248d1f6dd6972428fa96a7de16ab872eec0a92c23b162566bcdb95cf53d - Sigstore transparency entry: 1368692064
- Sigstore integration time:
-
Permalink:
Saadiinho/face-detection@c532ba3652bbe364455174259f0b06235c0bf2e9 -
Branch / Tag:
refs/tags/1.2.1 - Owner: https://github.com/Saadiinho
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c532ba3652bbe364455174259f0b06235c0bf2e9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file niyya_face_detector-1.2.1-py3-none-any.whl.
File metadata
- Download URL: niyya_face_detector-1.2.1-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fb23907efcb44836fbaa549c1a9b8fab9c32caddfb9148cbed16289e0cb93c8
|
|
| MD5 |
ba37cf6c192490704dd4739087f7d140
|
|
| BLAKE2b-256 |
8d31443b02c8f3a7e5cedcb6ccf3b54f5b82b512cda89967b315942146ce6bfa
|
Provenance
The following attestation bundles were made for niyya_face_detector-1.2.1-py3-none-any.whl:
Publisher:
publish.yml on Saadiinho/face-detection
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
niyya_face_detector-1.2.1-py3-none-any.whl -
Subject digest:
8fb23907efcb44836fbaa549c1a9b8fab9c32caddfb9148cbed16289e0cb93c8 - Sigstore transparency entry: 1368692154
- Sigstore integration time:
-
Permalink:
Saadiinho/face-detection@c532ba3652bbe364455174259f0b06235c0bf2e9 -
Branch / Tag:
refs/tags/1.2.1 - Owner: https://github.com/Saadiinho
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c532ba3652bbe364455174259f0b06235c0bf2e9 -
Trigger Event:
release
-
Statement type: