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

Keep dataset shape and use shaped data for training and prediction #513

Merged
merged 7 commits into from
Jan 9, 2023

Conversation

juliabeliaeva
Copy link
Contributor

This PR is a continuation of #494. It adds shape information for all the data used for prediction and training. Since shape is always known, we can create tensors for the data more easily.

Some models do not have the input shape defined and data with arbitrary shape can be used (ex EfficientDetObjectDetectionModel). In this PR such models still use resize operation in preprocessing, so they still have some input shape set manually for this. Maybe this is not needed (?)

Since the model accepts input data with shape, there is no need to manually set desired shape to the model itself.
Copy link
Collaborator

@ermolenkodev ermolenkodev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some models do not have the input shape defined and data with arbitrary shape can be used (ex EfficientDetObjectDetectionModel). In this PR such models still use resize operation in preprocessing, so they still have some input shape set manually for this. Maybe this is not needed (?)

I think it's okay to have explicit resize in examples because it's pretty common to explicitly resize the image before inference because size has an effect on performance, moreover, some models work better with specific input sizes, although support variable input.

@juliabeliaeva juliabeliaeva merged commit 449360e into Kotlin:master Jan 9, 2023
@juliabeliaeva juliabeliaeva deleted the dataset-shape-4 branch January 9, 2023 12:44
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

Successfully merging this pull request may close these issues.

2 participants