Skip to main content

Module de détection faciale pour la modération de contenu

Project description

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 niyya_face_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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

niyya_face_detector-1.1.1.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

niyya_face_detector-1.1.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file niyya_face_detector-1.1.1.tar.gz.

File metadata

  • Download URL: niyya_face_detector-1.1.1.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for niyya_face_detector-1.1.1.tar.gz
Algorithm Hash digest
SHA256 dac65c9298b9a573fe153c492271285fd7aaa76e1ab6740ba3e3bcce99c55c6c
MD5 6db560e21fd19cbd661608564a813430
BLAKE2b-256 4866caad92a789a1729e75317ae0ba0377c70d2d07317491755302fcc6e053f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for niyya_face_detector-1.1.1.tar.gz:

Publisher: publish.yml on Saadiinho/face-detection

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file niyya_face_detector-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for niyya_face_detector-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc28eb8d14ea98b68d67429a634c3c8f79c8874faba592f2183cf1d633b60de2
MD5 107f2e691717e7af5b8b56b4ab24869a
BLAKE2b-256 139588437c4f2fc84e3f465682ee692570e941eec377ce48a179f06da819344d

See more details on using hashes here.

Provenance

The following attestation bundles were made for niyya_face_detector-1.1.1-py3-none-any.whl:

Publisher: publish.yml on Saadiinho/face-detection

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page