hotg-ai / proc-blocks

Common processing blocks used with your Runes.
https://hotg-ai.github.io/proc-blocks
9 stars 3 forks source link

Image normalisation does not work with grey scale images. #55

Open jacekpie opened 2 years ago

jacekpie commented 2 years ago

I connected grey-scale image source to image normalisation module. The output from image source is u8[1, 31, 200, 1]

Image normalisation logs out an error: "the number of channels should be either 1 or 3, found 1"

Michael-F-Bryan commented 2 years ago

The code at fault is this match statement:

https://github.com/hotg-ai/proc-blocks/blob/46fae77ce5485f57072ddf004b7b8edd78a3ecc5/image-normalization/src/lib.rs#L22-L29

The first arm needs to be changed to [_, _, _, 3] | [_, _, _, 1] => {} when we go through and migrate the image-normalization proc-block to the new Rune ABI.