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

Required channels not respected on predict #4

Closed
gnodar01 opened this issue Jun 17, 2024 · 0 comments
Closed

Required channels not respected on predict #4

gnodar01 opened this issue Jun 17, 2024 · 0 comments
Assignees

Comments

@gnodar01
Copy link
Member

Related to piximi/piximi#536.

The Model class lets subclasses define a required number of channels: https://github.com/piximi/piximi/blob/master/src/utils/common/models/Model.ts#L15

After adding the stardist-flourscence model in piximi-beta piximi/piximi#3, the requiredChannels was set to 1. When pressing predict on an image with 3 channels, piximi does not try to stop the user. Instead it attempts to pass the image in for prediction, and fails with a shape mismatch error from tensorflow.js.

What piximi should do in case of channel mismatch will probably vary.

  • It should at least issue a warning, and not try to predict on an image with a channel mismatch from the model.
  • A more sophisticated approach would be, If the number of channels the image has is greater than the number of channels required by the model, it will ask which channel(s) to use.
  • If the image is one channel, and the model takes n channels, we may automatically (or with permission) duplicate the 1 channel, n times.
@gnodar01 gnodar01 changed the title Required channels no respected on predict Required channels not respected on predict Jun 17, 2024
@Andrea-Papaleo Andrea-Papaleo transferred this issue from piximi/piximi Jun 24, 2024
@Andrea-Papaleo Andrea-Papaleo self-assigned this Jun 26, 2024
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