What is Iris?
Iris is a stateless, high-performance face recognition API built in Rust, designed specifically for hospital IT systems to identify unresponsive patients in real-time. By comparing emergency captures against secure patient databases, Iris provides sub-100ms inference times while maintaining absolute privacy through zero-persistence architecture.Iris is infrastructure, not storage. It returns mathematical similarity scores between images, allowing hospitals to link results to their own secure Electronic Medical Record (EMR) systems.
Key Use Cases
Iris excels in scenarios where rapid, privacy-conscious biometric identification is critical:Emergency Patient Identification
Identify unconscious or unresponsive patients in emergency departments by comparing their face against the hospital’s patient database.
Medical Record Linking
Match patients to their correct medical records when traditional identification methods (ID cards, verbal confirmation) are unavailable.
Cross-Department Verification
Verify patient identity during transfers between departments, ensuring continuity of care and reducing medical errors.
Access Control Integration
Integrate with secure area access systems for authorized personnel or patient verification in restricted zones.
Core Architecture
Iris is built on three fundamental principles that make it suitable for healthcare environments:1. Stateless Processing
Every image is processed entirely in volatile memory (RAM) and destroyed immediately after feature extraction. The workflow:2. ONNX-Accelerated Models
Iris uses two pre-trained neural networks from OpenCV Zoo:YuNet - Face Detection
YuNet - Face Detection
Model:
face_detection_yunet_2023mar.onnxPurpose: Detects faces in images and extracts 5-point facial landmarks (eyes, nose, mouth corners)Performance: Processes 320×320 images with confidence threshold of 0.9Configuration:SFace - Face Recognition
SFace - Face Recognition
Model:
face_recognition_sface_2021dec.onnxPurpose: Generates 128-dimensional feature embeddings from aligned face cropsPerformance: Produces embeddings that enable sub-100ms comparison timesMatch Threshold: Cosine similarity score > 0.363 indicates a positive matchConfiguration:3. Rust Performance
Built with Rust for memory safety and performance:- Zero-cost abstractions: No runtime overhead for safety guarantees
- Ownership system: Automatic memory cleanup without garbage collection
- Async runtime: Tokio-powered concurrency for handling multiple requests
- Type safety: Compile-time guarantees prevent common programming errors
API Design
Iris provides a minimal REST API with three endpoints:POST /compare
Compare a target face against a list of people
GET /stats
Retrieve API usage statistics
GET /health
Check API health status
Request Flow
Here’s how a typical comparison request flows through the system:The Face Engine uses a mutex to ensure thread-safe access to the ONNX models, processing one face at a time while maintaining high throughput.
Security & Privacy
Iris is designed with healthcare data privacy regulations in mind:Zero Persistence
Images processed in RAM only—no disk writes, no logs, no retention
Rate Limiting
5 requests/second per IP with burst capacity of 10
CORS Enabled
Configurable CORS for secure frontend integration
No PII Storage
Returns only similarity scores—hospitals maintain their own EMR data
Match Threshold
The default threshold of 0.363 for cosine similarity is based on SFace model recommendations:- Score > 0.363: Positive match (same person)
- Score ≤ 0.363: No match (different people)
Deployment Options
Iris can be deployed in multiple configurations:- Local Development: Run directly with
cargo run --release - Docker Container: Deploy as a containerized service (see Dockerfile)
- Kubernetes: Scale horizontally with multiple replicas
- On-Premise: Install on hospital infrastructure for data sovereignty
Next Steps
Quickstart Guide
Get Iris running locally in 5 minutes
API Reference
Explore the complete API documentation
Architecture Deep Dive
Learn about Iris’s internal design
Docker Deployment
Deploy Iris in production environments