Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the gallery format temlates? #42

Open
DimIsaev opened this issue Jul 8, 2024 · 7 comments
Open

What is the gallery format temlates? #42

DimIsaev opened this issue Jul 8, 2024 · 7 comments

Comments

@DimIsaev
Copy link

DimIsaev commented Jul 8, 2024

in docs

https://worldcoin.github.io/open-iris/_code_subpages/iris.nodes.matcher.html

template_gallery (IrisTemplate) – Iris template from gallery.

what is the gallery format?

I also need an example of storing templates in a gallery or another database

thanks

@DimIsaev
Copy link
Author

Is there a chance that someone will answer?

@wiktorlazarski
Copy link
Member

wiktorlazarski commented Jul 16, 2024

Hey @DimIsaev,

thanks for raising the issue.

Regarding

what is the gallery format?

The implementation of the gallery is outside of the score of the open-iris project. You may implement templates' gallery that works best for your needs. It can be any kind of database, as long as you are able to serialise and deserialise saved templates to the required by the matcher IrisTemplate object.

Best regards,
Wiktor

@DimIsaev
Copy link
Author

The implementation of the gallery is outside of the score of the open-iris project

I asked about the format, not the implementation!

I'll ask you a different question:
how to submit a list of frames for input, and not just one

thanks
for future attentive answers

@DimIsaev
Copy link
Author

code this

"Call `run` method and provide two `IrisTemplate`s to compute distances.
def run(self, template_probe: IrisTemplate, template_gallery: IrisTemplate) -> float:\n",

how format this list template_gallery ?
Simple list images_pixel not work

@DimIsaev
Copy link
Author

DimIsaev commented Aug 6, 2024

Can I hope for an answer?

Maybe we should close the Issues section?

@wiktorlazarski
Copy link
Member

@DimIsaev

It's still vague to me what you try to achieve. Hence let me directly answer this question you asked

how to submit a list of frames for input, and not just one

What you can do is to load all your images, loop over them calling IRISPipeline and saving generated by the pipeline IRISTemplate. Source code may look something like that.

f_img = cv2.imread("/path/to/f_img", cv2.IMREAD_GRAYSCALE)
s_img = cv2.imread("/path/to/s_img", cv2.IMREAD_GRAYSCALE)

iris_templates: List[IrisTemplate] = []
for img in [f_img, s_img]:
    output = iris_pipeline(f_img, eye_side="left")
    iris_templates.append(output["iris_template"})

Regarding your second question

code this


how format this list template_gallery ?

If you already have IrisTemplates computed then list of templates can be formatted in many ways. You can loop over your computed iris templates and append them to list or do Python's list comprehension to create a List[IrisTemplate] expected by classes that implements cited by you interface.

As you also saw open-iris doesn't have N-N matcher interface implemented yet. Please, feel free and more then welcome to make your first contributions and implement first concrete class that provides this functionality.

Best regards,
Wiktor

@wiktorlazarski
Copy link
Member

Hey @DimIsaev,

Please, let me know if you manage to solve your problem, so we can close this issue, or you still would like some support from our side?

Best regards,
Wiktor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants