M3DV / AlignShift

[MICCAI'21 & MICCAI'20] A Codebase for Universal Lesion Detection (DeepLesion SOTA)
Apache License 2.0
47 stars 10 forks source link

One quesion about data loading. #2

Closed chuxiang93 closed 4 years ago

chuxiang93 commented 4 years ago

I see the loading function in "AlignShift/deeplesion/dataset/DeepLesionDataset_25d.py", there is a line "im1-=50". But the annotation says that the image is normalized to 0~255.

def windowing(im, win): """scale intensity from win[0]~win[1] to float numbers in 0~255""" im1 = im.astype(float) im1 -= win[0] im1 /= win[1] - win[0] im1[im1 > 1] = 1 im1[im1 < 0] = 0 im1 *= 255 im1 -= 50 return im1

NotF404 commented 4 years ago

the annotation was missed to update, when we fintune the model. you can trust the code under this situation.