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

Remove unnecessary property declarations from ModelType #459

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

juliabeliaeva
Copy link
Contributor

  1. Both ImageRecognitionModel variants were dependent on ModelType which prohibited their usage for custom models.
  2. Properties ModelType.channelsFirst and ModelType.inputColorMode were only used in the image classification models, and unnecessary in other types.

@juliabeliaeva juliabeliaeva merged commit edfe8c4 into Kotlin:master Sep 29, 2022
@juliabeliaeva juliabeliaeva deleted the model-type branch September 29, 2022 13:44
ermolenkodev added a commit to ermolenkodev/KotlinDL that referenced this pull request Sep 29, 2022
ermolenkodev added a commit that referenced this pull request Sep 29, 2022
* More convenient API for inference of ModelHub models with ImageProxy input (#454)

* Extend the ModelHub's models with an API that accepts ImageProxy as an input.

* Now user not required to set targetRotation property by hand

The rotation operation is quite expensive, so it's beneficial to make a rotation after resizing, although it makes API less intuitive.

Fix wrong preprocessor for Mobilenetv1 in ModelHub

* Introduced in PR #459

* Refactoring of extension functions with ImageProxy input (#454)

* Introduce doWithRotation extension function to reduce code duplication

* Move extension functions to the base classes (e.g. SinglePoseDetectionModelBase instead SinglePoseDetectionModel)

Co-authored-by: Julia Beliaeva <[email protected]>
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