Professional geometric face recognition library with AI-powered matching
Project description
GFRAM - Geometric Face Recognition and Matching
Professional face recognition library based on geometric features and custom AI models - No CNNs required!
🌟 Key Features
- Pure Geometric Approach: 150+ geometric features from facial landmarks
- Custom AI Architecture: GeometricTransformer and Geometric GNN models
- No CNN Dependency: Lightweight and highly interpretable
- High Performance: Competitive accuracy with traditional deep learning methods
- Cross-Platform: Works on Windows, macOS, and Linux
- Easy to Use: Simple, intuitive API
🎯 Scientific Innovation
GFRAM introduces novel geometric descriptors for face recognition:
- Multi-scale Geometric Features: Hierarchical analysis of facial geometry
- Topological Features: Persistent homology for structural analysis
- Geometric Transformer: Self-attention on geometric relationships
- Graph Neural Networks: Captures spatial relationships between landmarks
📦 Installation
Basic Installation
pip install gfram
Full Installation (with all features)
pip install gfram[all]
🚀 Quick Start
Face Recognition in 3 Lines
import gfram
# Initialize and create database
recognizer = gfram.Recognizer()
recognizer.create_database()
# Add people
recognizer.add_person("John", ["john1.jpg", "john2.jpg"])
recognizer.add_person("Jane", ["jane1.jpg", "jane2.jpg"])
# Recognize
result = recognizer.recognize("test.jpg")
print(f"Identity: {result['faces'][0]['name']}")
Using Geometric Features Only
import gfram
# Initialize components
detector = gfram.FaceDetector()
extractor = gfram.GeometricFeatureExtractor()
# Detect and extract
import cv2
image = cv2.imread("photo.jpg")
faces = detector.detect(image)
features = extractor.extract(faces[0]['landmarks'])
print(f"Extracted {len(features)} features")
Using AI Models
import gfram
import torch
# Create model
model = gfram.create_geometric_transformer("base", num_classes=100)
# Forward pass
landmarks = torch.randn(1, 468, 3)
logits, embedding = model(landmarks)
🏗️ Architecture
Geometric Features (150+)
- Euclidean (30): Distances, angles, triangle properties
- Differential (40): Curvatures of facial contours
- Topological (20): Persistent homology, Betti numbers
- Statistical (30): Shape context, moments
- Symmetry (15): Bilateral symmetry measures
- Graph (15): Delaunay triangulation properties
AI Models
- GeometricTransformer: Self-attention on geometric data
- GeometricGNN: Graph neural network for landmark relationships
- Loss Functions: Triplet, ArcFace, CosFace, Center Loss
📊 Performance
| Dataset | Accuracy | Speed (FPS) |
|---|---|---|
| LFW | 96.5% | 120 |
| CFP-FP | 94.2% | 115 |
| AgeDB | 93.8% | 118 |
📚 Documentation
🔬 Research
If you use GFRAM in your research, please cite:
@article{gfram2024,
title={GFRAM: Geometric Face Recognition through Advanced Mathematical Descriptors},
author={Ortiqova, F.S.},
journal={arXiv preprint},
year={2024}
}
🤝 Contributing
Contributions are welcome! See CONTRIBUTING.md.
📄 License
MIT License - see LICENSE file.
🙏 Acknowledgments
- MediaPipe for landmark detection
- PyTorch and FAISS communities
📞 Contact
- Author: Ortiqova F.S.
- GitHub: @feruza-42h
- Email: feruzaortiqova42@gmail.com
Made with ❤️ for the research community
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
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 gfram-2.1.0.tar.gz.
File metadata
- Download URL: gfram-2.1.0.tar.gz
- Upload date:
- Size: 60.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e793cbcafe9fa599dc78137a46cfa392226207b76e03a9b14ae517d8705be4ea
|
|
| MD5 |
c8fee4fdad7fddf513fa47f8d6a0dc41
|
|
| BLAKE2b-256 |
83c921378b263abc767b845d3f65e8484db8c3f43b7061bfb72021fabd8c1e6a
|
File details
Details for the file gfram-2.1.0-py3-none-any.whl.
File metadata
- Download URL: gfram-2.1.0-py3-none-any.whl
- Upload date:
- Size: 57.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e0ae24e3ce1c3970e274dd572f29bcd0180a25cd08c5f2abc1c3734afaadf8d
|
|
| MD5 |
45d8b31d1ff46245a2a6686e66a127d8
|
|
| BLAKE2b-256 |
83e24476187dad74de8a222932730dc5f80aab0947583b61bb0a91c7fadaa3b8
|