Skip to main content

IrisVision - Face Recognition Suite | Made in Emirates 🇦🇪

Project description

🇦🇪 IrisVision - Face Recognition Suite

PyPI version Python 3.8+ License: MIT Made in Emirates

IrisVisionAixL - A high-accuracy face recognition model achieving 98.58% accuracy, designed and trained in Dubai, UAE.

✨ Features

  • 🎯 98.58% Accuracy - Beats Buffalo_L benchmark
  • 📐 512-dimensional embeddings - Compact and efficient
  • 🚀 Easy to use - Simple API for encoding, comparing, and verifying faces
  • ☁️ Auto-download - Model weights automatically downloaded from HuggingFace
  • 🔧 Production-ready - Optimized for real-world deployment
  • 🇦🇪 Made in Emirates - Product of Dubai

📦 Installation

pip install irisvision

🚀 Quick Start

from irisvision import IrisVisionAixL

# Load model (auto-downloads from HuggingFace)
model = IrisVisionAixL.load()

# Encode a face image
embedding = model.encode("face.jpg")  # Returns (512,) numpy array

# Compare two faces
similarity = model.compare(emb1, emb2)  # Returns 0.0 to 1.0

# Verify if same person
is_match, score = model.verify(emb1, emb2, threshold=0.4)

📖 API Reference

IrisVisionAixL.load()

Load the model from HuggingFace Hub.

model = IrisVisionAixL.load(
    repo_id="vCodesUAE/IrisVisionAixL",  # Optional: custom repo
    device="cuda",                        # Optional: "cuda" or "cpu"
    token="hf_xxx"                        # Optional: HuggingFace token for private repos
)

model.encode(image)

Extract face embedding from an image.

# From file path
embedding = model.encode("path/to/face.jpg")

# From PIL Image
from PIL import Image
img = Image.open("face.jpg")
embedding = model.encode(img)

# From numpy array
import numpy as np
img_array = np.array(img)
embedding = model.encode(img_array)

# Batch encoding
embeddings = model.encode([img1, img2, img3])

Returns: numpy.ndarray of shape (512,) or (N, 512) for batch

model.compare(emb1, emb2)

Calculate cosine similarity between two embeddings.

similarity = model.compare(emb1, emb2)
# Returns: float between -1.0 and 1.0 (higher = more similar)

model.verify(emb1, emb2, threshold=0.4)

Verify if two embeddings belong to the same person.

is_match, score = model.verify(emb1, emb2, threshold=0.4)
# Returns: (bool, float)

🏢 Production Example: Attendance System

from irisvision import IrisVisionAixL
import numpy as np

class AttendanceSystem:
    def __init__(self):
        self.model = IrisVisionAixL.load()
        self.employees = {}  # name -> embedding
    
    def register(self, name, face_image):
        """Register a new employee"""
        self.employees[name] = self.model.encode(face_image)
    
    def identify(self, face_image, threshold=0.4):
        """Identify an employee from face"""
        embedding = self.model.encode(face_image)
        
        best_match = None
        best_score = -1
        
        for name, stored_emb in self.employees.items():
            score = self.model.compare(embedding, stored_emb)
            if score > best_score:
                best_score = score
                best_match = name
        
        if best_score >= threshold:
            return best_match, best_score
        return None, best_score

# Usage
system = AttendanceSystem()
system.register("Padam", "padam_face.jpg")
system.register("Ahmed", "ahmed_face.jpg")

name, score = system.identify("unknown_face.jpg")
if name:
    print(f"Identified: {name} (score: {score:.2f})")

🔧 Technical Details

Specification Value
Architecture IResNet-100
Configuration [3, 13, 30, 3]
Embedding Dimension 512
Input Size 112 × 112
Training Loss ArcFace
Accuracy 98.58%
Parameters ~65M

📊 Model Performance

Metric Value
Validation Accuracy 98.58%
Classes 405
Embedding Norm 1.0 (L2 normalized)

🔗 Links

📄 License

MIT License - see LICENSE file.

🙏 Acknowledgments

  • Made with ❤️ in Dubai, UAE 🇦🇪
  • Built by vCodesUAE
  • Powered by PyTorch and HuggingFace

🇦🇪 Made in Emirates | Product of Dubai

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

irisvision-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

irisvision-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file irisvision-0.1.0.tar.gz.

File metadata

  • Download URL: irisvision-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for irisvision-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d49906e413357a4ee82e20f9865d8a05856e45ebfc411f0c720ab37a5df55b67
MD5 352e4d6456d12faa309eb6fb6bf3c336
BLAKE2b-256 527bf07c77c253751b5940fe2da7284a7055b20e6209b3cc8f5a2941b371bbfc

See more details on using hashes here.

File details

Details for the file irisvision-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: irisvision-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for irisvision-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 912e985baba8259c57c4026aa347cf0eb662463518ea52b9dd5a64bd81b11cb0
MD5 9722bada3925af1fb67ceefd9b2dd9e1
BLAKE2b-256 750768734cfad5dbfd87d379ef39217e323ade7feb95d389bbc420a9ab8ad29f

See more details on using hashes here.

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