Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iris — Biometric Infrastructure

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.


Core Philosophy

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

Prerequisites

Before running Iris, ensure you have the following installed:


Installation & Setup

Clone the Repository

git clone [https://github.com/your-username/iris.git](https://github.com/your-username/iris.git)
cd iris

Run Web

cd web
npm install

Run API

cd ../api

Download AI Models

Iris 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.sh

Or 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.onnx

Running the API

Start the Server

cargo run --release

The API will be available at http://localhost:3002.

Test the Endpoint

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",
    },
    ]
}'

Project Structure


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)

Security & Privacy

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.

License

Distributed under the MIT License.

About

Face match system for medical purposes - Rust africa hackathon

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages