worldcoin / open-iris

Open Iris Recognition Inference System (IRIS)
MIT License
238 stars 47 forks source link

Simplify `IRISPipeline` output. #12

Closed wiktorlazarski closed 7 months ago

wiktorlazarski commented 7 months ago

Simplify IRISPipeline output.

PR description

Currently, IRISPipeline returns serialised version of generated IrisTemplate that causes confusions and make it less intuitive how one can use HammingDistanceMatcher. This PR simplifies IRISPipeline output such that together with metadata, unserialised IrisTemplate object is by default returned from IRISPipeline inference call.

Also, update ruff tool setup to remove it's warnings and apply code quality tools to unify code base style etc.

Issue

Without knowing more details about inner working of a code base, users find it difficult to simply take two IR images, generate IrisTemplates and use HammingDistanceMatcher to get final distance between two irises.

Solution

Introduce a new builder function that returns IrisTemplate object (if error wasn't raised during the IRISPipeline inference call) and metadata in a dictionary.

Type

Checklist