smistad / FAST

A framework for high-performance medical image processing, neural network inference and visualization
https://fast.eriksmistad.no
BSD 2-Clause "Simplified" License
433 stars 101 forks source link

ImageFileStreamer always converts RGB input to grayscale #170

Closed andreped closed 1 year ago

andreped commented 1 year ago

Describe the bug In a bronchoscopy project, it was of interest to use FAST to enable real time deployment of temporal neural networks. However, we ran into issues at the very first step, where the ImageFileStreamer converted the RGB images to grayscale.

From what I can see, the ImageFileStreamer uses ImageFileImporter (see here), which in turn uses ImageImporter. The ImageImporter includes a method (and option) for setting whether to convert to grayscale or not (see here), though for the ImageFileImporter this is not exposed.

I believe adding an API option to set this for the ImageFileStreamer and ImageFileImporter would be of interest.

Just remember to make this possible to set in FPLs as well.

To Reproduce The pipeline we are working on is somewhat similar to this example.

System:

Expected behavior The ImageFileStreamer should produce RGB output if requested.

cc: @AI-Ingrid

smistad commented 1 year ago

A fix for this has been pushed. Note the ImageImporter will default to no grayscale conversion now.