Skip to main content

Niyya Face Detector

PyPI Python Versions License

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 !

  1. Fork le projet
  2. Crée une branche feature (git checkout -b feature/amazing-feature)
  3. Commit tes changements (git commit -m 'Add amazing feature')
  4. Push vers la branche (git push origin feature/amazing-feature)
  5. 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

Projet : https://github.com/Saadiinho/niyya-face-detector

Metadata

Release files for niyya-face-detector 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for niyya-face-detector 1.2.2
File Size Uploaded Provenance Actions
niyya_face_detector-1.2.2.tar.gz 22.9 kB With provenance Details for niyya_face_detector-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for niyya-face-detector 1.2.2
File Interpreter ABI Platform Actions
niyya_face_detector-1.2.2-py3-none-any.whl Python 3 none any Details for niyya_face_detector-1.2.2-py3-none-any.whl

Total release size: 42.2 kB

Release files / niyya_face_detector-1.2.2.tar.gz

Download URL niyya_face_detector-1.2.2.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0a3f31b1fb74e96e96572410d38187f998a257ac3ba8a5046144d8baaf3cc4f1
BLAKE2b-256 checksum
How to use checksums
acad258b0ff96961f94ff48ad1650d44470e1b862e0d10e2741c1f2b953409da
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 Oct 31, 2026.

Transparency log

Release files / niyya_face_detector-1.2.2-py3-none-any.whl

Download URL niyya_face_detector-1.2.2-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a5dcc54da76ed61f40ecc4613a2ad9390e05c794a1e3ca9568849a749798549
BLAKE2b-256 checksum
How to use checksums
d5cf98054cdf8608583965163eb05da0826d2647f4493cd5c9ceb94092363247
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 Oct 31, 2026.

Transparency log

Security for niyya-face-detector 1.2.2

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.

Select from 2 files

Attestation for niyya_face_detector-1.2.2.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 Oct 31, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page