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

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.2.1.tar.gz (22.7 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.2.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

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

Hashes for niyya_face_detector-1.2.1.tar.gz
Algorithm Hash digest
SHA256 139c9248d1f6dd6972428fa96a7de16ab872eec0a92c23b162566bcdb95cf53d
MD5 1ee48b1da1d658f6050db18078bb9fe9
BLAKE2b-256 710c49a61eedd96937f7806f7bc91f039722095a11d46de280662d295016aafe

See more details on using hashes here.

Provenance

The following attestation bundles were made for niyya_face_detector-1.2.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.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for niyya_face_detector-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8fb23907efcb44836fbaa549c1a9b8fab9c32caddfb9148cbed16289e0cb93c8
MD5 ba37cf6c192490704dd4739087f7d140
BLAKE2b-256 8d31443b02c8f3a7e5cedcb6ccf3b54f5b82b512cda89967b315942146ce6bfa

See more details on using hashes here.

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

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