Skip to main content

IRIS: Iris Recognition Inference System of the Worldcoin project.

Project description


IRIS: Iris Recognition Inference System

Package documentationGetting started tutorialHugging Face repoIRIS blog post

python Ruff Code style: black isort pydocstyle
ci-testing release-version


Table of contents

About

Welcome to Worldcoin's Iris Recognition Inference System (IRIS) project, an advanced iris recognition pipeline designed for robust and secure biometric verification. This project leverages state-of-the-art computer vision and machine learning techniques to provide accurate and efficient iris recognition system.

Iris recognition is a powerful biometric technology that identifies individuals based on the unique patterns within the iris of the eye. IRIS package aims to make iris recognition accessible and enable further advancement in the field.

Project features highlights are:

  • Large-Scale Verification: Capable of verifying uniqueness among billions of users.
  • High-Performance Iris Segmentation: Accurate segmentation of iris regions for precise feature extraction.
  • Scalable Matching Algorithm: Robust matching algorithm designed for scalability without compromising accuracy.
  • User-Friendly Integration: Simple integration into applications that demand seamless biometric verification.

High-level iris recognition pipeline steps overview:

  1. Iris Image Input: Provide an iris image for verification.
  2. Iris Segmentation: Identify and isolate the iris region within the image.
  3. Feature Extraction: Extract unique features from the iris to create a template.
  4. Scalable Matching: Efficiently compare extracted features for large-scale uniqueness verification.
  5. Result: Receive the verification result with a confidence score, enabling secure and scalable authentication.

The Worldcoin system utilizes iris recognition algorithm for verifying uniqueness in a challenging environment, involving billions of individuals. This entails a detailed exploration of the Worldcoin biometric pipeline, a system that confirms uniqueness through the encoding of iris texture into an iris code.

More detailed pipeline overview can be found in our blog post dedicated to IRIS project.

Disclaimer

The Iris Recognition Inference System (IRIS) software repository is owned and maintained by the Worldcoin Foundation, the steward of the Worldcoin protocol; the repository is not affiliated with any other project or service provider

Quickstart

Installation

Installation is as simple as running pip install with specifying IRIS_ENV installation global flag (IRIS_ENV flag may be skipped if iris is installed from PyPl server but this option is only available when iris is installed on local machine). The IRIS_ENV flag is used to indicate an "environment" in which package is meant to work. Possible options are:

  1. SERVER - For installing iris package with dependencies required for running an inference on a local machines.
# On a local machine
pip install open-iris
# or directly from GitHub
IRIS_ENV=SERVER pip install git+https://github.com/worldcoin/open-iris.git
  1. ORB - For installing iris package with dependencies required for running an inference on the Orb.
# On the Orb
IRIS_ENV=ORB pip install git+https://github.com/worldcoin/open-iris.git
  1. DEV - For installing iris package together with packages necessary for development of iris package.
# For development
IRIS_ENV=DEV pip install git+https://github.com/worldcoin/open-iris.git

After successfully installing iris, verify your installation by attempting to import.

python3 -c "import iris; print(iris.__version__)"

Setup for development

A conda environment simplifies the setup process for developing on the iris package. This conda environment ensures a seamless and consistent setup for contributors, reducing the complexity of dependency management. By utilizing conda, developers can easily replicate the development environment across different systems, minimizing potential setup obstacles. This approach aims to make it straightforward for anyone interested in contributing to quickly set up and engage in the development of iris package.

# Clone the iris repo
git clone https://github.com/worldcoin/open-iris

# Go to the repo directory
cd open-iris

# Create and activate conda environment
IRIS_ENV=DEV conda env create -f ./conda/environment_dev.yml
conda activate iris_dev

# (Optional, but recommended) Install git hooks to preserve code format consistency
pre-commit install
nb-clean add-filter --remove-empty-cells

Running inference

A simple inference run can be achived by running source code below.

import cv2
import iris

# 1. Create IRISPipeline object
iris_pipeline = iris.IRISPipeline()

# 2. Load IR image of an eye
img_pixels = cv2.imread("/path/to/ir/image", cv2.IMREAD_GRAYSCALE)

# 3. Perform inference
# Options for the `eye_side` argument are: ["left", "right"]
output = iris_pipeline(iris.IRImage(img_data=img_pixels, image_id="image_id", eye_side="left"))

To fully explore and understand the extensive capabilities of the iris package, visit the Example notebooks section. Here, you'll find a collection of Jupyter Notebooks that serve as valuable resources, offering practical guides and real-world examples to provide a comprehensive insight into the rich functionalities and potential applications of the iris package.

Project structure

The iris package features a structured design with modular components, enhancing code organization and scalability.

Module Description
iris an iris recognition package
iris.callbacks a module that implements callbacks used to customize on execute start and end behaviours of node or pipeline call
iris.io a module that contains dataclasses and errors that flow through iris recognition pipeline when called
iris.nodes a module that contains implementation of iris recognition pipeline nodes
iris.orchestration a module that contains iris recognition pipeline's orchestration support mechanisms
iris.pipelines a module that contains implementation of iris recognition pipelines
iris.utils a module that contains utilities used throughout the code base and modules useful for outputs analysis

Example notebooks

The Jupyter Notebooks provided present practical guides and real-world instances to demonstrate the complete capabilities of the iris package.

  1. Getting started Open In Collab
  2. Configuring custom pipeline Open In Collab
  3. Matching entities Open In Collab

Documentation

For detailed documentation, including installation instructions, usage guidelines, and configuration options, please refer to the IRIS project documentation.

Issues, pull requests and feature requests

If you have any question or you found a bug or you feel like some feature is missing, please don't hesitate to file a new issue, discussion or PR with respective title and description. Any suggestion for potential project improvements are and will always be welcome!

Contact

If you have any questions, suggestions, or feedback, feel free to reach out to us:

Citation

@misc{wldiris,
  author =       {Worldcoin AI},
  title =        {IRIS: Iris Recognition Inference System of the Worldcoin project},
  year =         {2023},
  url =          {https://github.com/worldcoin/open-iris}
}

License

This project is licensed under the MIT license.

Resources

  1. "Iris Recognition Inference System"
  2. "Iris feature extraction with 2D Gabor wavelets"
  3. "How iris recognition works"

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

open_iris-1.10.0.tar.gz (100.5 kB view details)

Uploaded Source

Built Distribution

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

open_iris-1.10.0-py3-none-any.whl (133.2 kB view details)

Uploaded Python 3

File details

Details for the file open_iris-1.10.0.tar.gz.

File metadata

  • Download URL: open_iris-1.10.0.tar.gz
  • Upload date:
  • Size: 100.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for open_iris-1.10.0.tar.gz
Algorithm Hash digest
SHA256 fd965db54d42a33cdc08ac891e0a8760af9663081e4498a8ab99c2542f514753
MD5 1ac481ae957916ee2e9c0485418725d0
BLAKE2b-256 65c7f4f842607e968c407b911a3684c65df110b8946a58410e441c63099a6d89

See more details on using hashes here.

File details

Details for the file open_iris-1.10.0-py3-none-any.whl.

File metadata

  • Download URL: open_iris-1.10.0-py3-none-any.whl
  • Upload date:
  • Size: 133.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for open_iris-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b578b5b9d9852eb8f7ee6d464115c00fb866ea3eeb698aa9dfead8948f526dc
MD5 f988ceb0a2f60880cd9538039727f579
BLAKE2b-256 5d4883fd168ef15da09a8926a3a2c4b866ae5a4ad7d7ed0e3ad1825b6bfd32ef

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