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
Metadata
Release files for niyya-face-detector 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| niyya_face_detector-1.2.3.tar.gz | 23.7 kB | With provenance | Details for niyya_face_detector-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| niyya_face_detector-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for niyya_face_detector-1.2.3-py3-none-any.whl |
Total release size: 43.9 kB
Release files / niyya_face_detector-1.2.3.tar.gz
| Download URL | niyya_face_detector-1.2.3.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ed68fa3df09a70114349c3feca6275ab7f42c0f067b17f6bab832af92b85b76
|
|
BLAKE2b-256 checksum How to use checksums |
4076c0c9e6304457ebb20fa70edf105a98ad3826d03589605f873945e78bbdc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / niyya_face_detector-1.2.3-py3-none-any.whl
| Download URL | niyya_face_detector-1.2.3-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4efa0f5f2df8c335f50f7c4437708758755ee9ce32d0e6513e6587c68c66d36
|
|
BLAKE2b-256 checksum How to use checksums |
408ac32a34912a7d877bde609a6514880f13a1425d2dc02641fda5fc41eac2ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for niyya-face-detector 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for niyya_face_detector-1.2.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.