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!
When using
convert_predictionto stitch back prediction tiles, there will be an error if the input and prediction channels are different. For example:Raising from the
stitch_single_samplefunction 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!