Iris is a stateless, high-performance face recognition infrastructure built in Rust. It provides a REST API designed for hospital IT systems to identify unresponsive patients in real-time by comparing emergency captures against secure patient databases.
- Stateless by Design: Images are processed in RAM and destroyed immediately after feature extraction. No biometric data ever touches the disk.
- Infrastructure, Not Storage: Iris does not store medical records. It returns a mathematical similarity score between two images, allowing hospitals to link to their own secure EMR systems.
- High Performance: Powered by Rust and ONNX-accelerated models (YuNet and SFace) for sub-100ms inference.
Before running Iris, ensure you have the following installed:
- Rust: Install via rustup
- OpenCV 4.x: * macOS:
brew install opencv- Linux:
sudo apt install libopencv-dev - Windows: Follow OpenCV-Rust installation guide
- Linux:
git clone [https://github.com/your-username/iris.git](https://github.com/your-username/iris.git)
cd iriscd web
npm installcd ../apiIris requires pre-trained ONNX models for detection and recognition. These files are excluded from Git due to size. Run these commands in the project root:
chmod +x setup.sh
./setup.shOr try to do it manually by running the following commands.
# Face Detection (YuNet)
curl -L [https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx](https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx) -o face_detection_yunet_2023mar.onnx
# Face Recognition (SFace)
curl -L [https://github.com/opencv/opencv_zoo/raw/main/models/face_recognition_sface/face_recognition_sface_2021dec.onnx](https://github.com/opencv/opencv_zoo/raw/main/models/face_recognition_sface/face_recognition_sface_2021dec.onnx) -o face_recognition_sface_2021dec.onnxStart the Server
cargo run --releaseThe API will be available at http://localhost:3002.
Use curl to verify the comparison engine:
curl -X POST http://localhost:3002/compare \
-H "Content-Type: application/json" \
-d '{
"target_url": "https://static.wikia.nocookie.net/amazingspiderman/images/3/33/Tobey_Maguire_Infobox.png/revision/latest/scale-to-width-down/535?cb=20240322015635",
"people": [
{
"name": "Maguire",
"image_url":
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQqiVCCW7eH5Q_8q4VULShU7O8QnOgp7Us2RBNhAlnesh2_iho_D1Toosuxj_x66J1w8ks&usqp=CAU",
},
{
"name": "Tom",
"image_url":
"https://static.wikia.nocookie.net/marvelcinematicuniverse/images/2/2f/Tom_Holland.jpg/revision/latest/scale-to-width-down/1200?cb=20220213015022",
},
]
}'
iris/
├── api/ # The "Engine" (Rust + OpenCV)
│ ├── src/
│ ├── Cargo.toml
│ └── setup.sh
├── web/ # The "Interface" (React Js Landing Page)
│ ├── src/
│ └── package.json
└── README.md # The "Pitch" (Master Documentation)
Zero Persistence: Images are downloaded into volatile memory (RAM), decoded, converted to a 128-dimensional vector, and then purged.
CORS Enabled: The API is pre-configured to allow secure communication with authorized frontends.
Third-Party Isolation: Iris is designed as a biometric engine only. It never stores PII (Personally Identifiable Information) or sensitive medical history.
Distributed under the MIT License.