yhygao/focusnet-v2

Question on Data Processing

Opened this issue · 1 comments

Hello,
I have question.
In brain_dataset.py, image was shifted and then normalized: npImg = (npImg+100) / 1000
Why did you do this specifically?

In my dataset, lowest value= -160 and highest value= +240 and data are 16bit Signed Int Format
So should I do this then, npImg = (npImg+160)/240.
After that, data remains in the range of 0-400 and its 16bit int. I am converting those data into 8 bit and then feeding it to network. Did you face this issue, or your data was always in unsigned 8-bit format (uint8)?

Hi,
Thank you for your interest in our work.
Yes, this is a preprocessing step to normalize the image. Basically, it normalizes the value of the region of interest to [0, 1]. So I recommend you check the min and max values of the target region in your dataset for normalization. Don't cast 16-bit int into 8-bit, as it will lose information due to precision. Cast the 16-bit int into float32 directly as the input of the network.