Skip to content

Stitching tiled predictions fails when prediction channels are different from input's channel #948

@mese79

Description

@mese79

When using convert_prediction to stitch back prediction tiles, there will be an error if the input and prediction channels are different. For example:

ValueError: could not broadcast input array from shape (2,56,56) into shape (5,56,56)

Raising from the stitch_single_sample function in here.
In microsplit branch, there is a potential solution, but I think it only works if the number of channels in prediction is larger than input (which make sense for microsplit).
For lambdaSplit, the predicted tiles can have a smaller or even a greater number of channels than input.
So, I think for stitching back tiles, taking the number of channels from prediction anyway, is more reasonable and safer!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions