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

Difference between init_inference and get_pose methods #54

Closed
JMRMEDEV opened this issue Oct 10, 2021 · 3 comments
Closed

Difference between init_inference and get_pose methods #54

JMRMEDEV opened this issue Oct 10, 2021 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@JMRMEDEV
Copy link

JMRMEDEV commented Oct 10, 2021

Doubt

What's the diference between init_inference and get_pose?, according to the comments on code, I see that both return an estimated pose.

@sneakers-the-rat
Copy link
Collaborator

@gkane26 can answer this better than I can, but quick answer since it's in my notifications -

init_inference prepares the model for use, creating the tensorflow objects, etc. depending on the type of model that's used. Some model types (tflite) need a frame in order to prepare the model, but it looks like it's just used to get a shape so it looks like that could be relaxed to also accept a shape tuple. Think the docs could spell that out a little clearer

if a frame is passed to init_inference, it calls get_pose, in which case it would return an estimated pose, otherwise it returns None.

get_pose is the main method for going frame -> pose.

it looks like there should be a check for initialization in get_pose so it raises a descriptive error if called before init, or else a little more permissive might be to auto-init with a warning saying "if u don't want to have first-frame lag call init first" or something. i'd be happy to PR that & docs if that sounds good.

@AlexEMG
Copy link
Member

AlexEMG commented Oct 23, 2021

Yes, please PR into the docs, @sneakers-the-rat.

@AlexEMG AlexEMG added the documentation Improvements or additions to documentation label Oct 23, 2021
@sneakers-the-rat sneakers-the-rat self-assigned this Oct 27, 2021
@sneakers-the-rat
Copy link
Collaborator

closing this to make a consolidated docs requests tracking issue

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

No branches or pull requests

3 participants