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

How get only pupil or iris size box ? #41

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

How get only pupil or iris size box ? #41

DimIsaev opened this issue Jul 8, 2024 · 9 comments

Comments

@DimIsaev
Copy link

DimIsaev commented Jul 8, 2024

how to call one of the API methods to get pupil or iris sizes

thanks

@DimIsaev
Copy link
Author

Is there a chance that someone will answer?

@EliteWeapon
Copy link

how to call one of the API methods to get pupil or iris sizes

thanks

You can make your own 'pipeline_output_builder' in the environment when building pipeline and extract the size of pupil or iris from 'call_trace["geometry_estimation"]'. Please refer to the implementations in file 'src/iris/orchestration/output_builders.py'.

@DimIsaev
Copy link
Author

You can make your own 'pipeline_output_builder' in the environment when building pipeline and extract the size of pupil or iris from 'call_trace["geometry_estimation"]'. Please refer to the implementations in file 'src/iris/orchestration/output_builders.py'.

thanks for the answer
but how this builder is formed is not very clear from the file

@wiktorlazarski
Copy link
Member

Hey @DimIsaev,

thank you for raising the issue. @EliteWeapon is right. You can extract that information from metadata returned from pipeline_output_builder. If for some reason you only want to the pipeline to return only iris and pupil bounding box sizes, you have to implement your own pipeline builder.

How to do it? Please, first have a look at our Getting started tutorial. After studying the second section of this tutorial 2. Configuring IRISPipeline environment you should understand how IRISPipeline's Environment is configure - then you will know how to swap pipeline_output_builder.

How to implement your own pipeline_output_builder? Please refer to already cited by @EliteWeapon file in our repo src/iris/orchestration/output_builders.py. There you will find examples of several such builder functions:

  • build_simple_orb_output
  • build_orb_output
  • build_simple_debugging_output
  • build_debugging_output
    That should give you an intuition how to implement your own custom pipeline_output_builder function.

Please let me know if that helps.

@EliteWeapon Thank you also for answering.

Best regards,
Wiktor

@TanguyJeanneau
Copy link
Contributor

Hi @DimIsaev,

Alternatively you can use the bounding box information already present in the default metadata. The width or height of the bounding box will give you the iris / pupil diameter.

Please let us know if that answers your question !

Tanguy

@DimIsaev
Copy link
Author

Hi @DimIsaev,

Alternatively you can use the bounding box information already present in the default metadata. The width or height of the bounding box will give you the iris / pupil diameter.

Please let us know if that answers your question !

@TanguyJeanneau

great answer, to some other question

I need to separately obtain only these parameters without additional calculations
since you need to determine these parameters in real time
which does not allow the inference speed to be around 500ms even on a GPU

@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

Sorry for the late answer but we were swamped with other priorities. Regarding the issue, I think you should study tutorials we provided again. You will learn from them:

A small comment, I'm still not sure if you manage to configure pipeline such that it will run with the time performance you expect but it's something you should for sure check out and try it yourself. Main time complexity comes from semantic segmentation model. We never considered making this one run in real time so feel free to check out other algorithms that does that and maybe you will get some time performance improvement. We also encourage you to contribute any improvements you may find relevant and help open-iris package grow.

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

4 participants