Being able to pass multiple images as multichannel input into the model in Anomalib #2310
Replies: 5 comments 12 replies
-
Why would you do this? You can pass multiple image one after another to the anomalib models via a datamodule. One (RGB) image already has 3 channels. If you are working with grayscale image, you could try to concatenate 3 single-channel images to one 3-channel image, but I'm not sure if that helps you with anomaly detection accuracy (would be interesting to know though!) |
Beta Was this translation helpful? Give feedback.
-
I have 4 RGB images representing the same defect in different lighting conditions. Each lighting condition highlights a different aspect of the defect. In total 12 channels. They have to be passed together because they represent the same example. In timm models (which is being used in anomalib), we can pass in_channels. In pytorch dataset module, we can customize the channels. How can we do the same in anomalib? |
Beta Was this translation helpful? Give feedback.
-
Ahh ok so the timm model loading function is already designed in a way to support more than three channels even with pre-trained models: https://timm.fast.ai/models#How-is-timm-able-to-use-pretrained-weights-and-handle-images-that-are-not-3-channel-RGB-images? There is no interface to this functionality in anomalib built-in at the moment but you can do it yourself by modifying how the timm models are created in anomalib give it a try and tell us how this changed the anomaly detection performance! |
Beta Was this translation helpful? Give feedback.
-
If camera and object in fixed position, you can use stereo photometric to generate one image form multiple light. |
Beta Was this translation helpful? Give feedback.
-
@alexriedel1 |
Beta Was this translation helpful? Give feedback.
-
I have multiple images of the same defect in different lighting conditions. How can I merge them as 1 image having multiple channel in anomalib?
Beta Was this translation helpful? Give feedback.
All reactions