lfz / DSB2017

The solution of team 'grt123' in DSB2017
MIT License
1.24k stars 418 forks source link

What does the coord mean here? #33

Open iridescent303 opened 7 years ago

iridescent303 commented 7 years ago

Could you please tell me the meaning of coord in comb2 = self.back2(torch.cat((rev2, out2, coord), 1))?

totesarana commented 7 years ago

If I understand correctly, the coord means the relative coordinates of each voxel with respect to the center of the "lung". It provides location information under the assumption that the nodules usually appear on specific locations (wall of the lung, for example). Please let me know if my understanding is wrong.

lfz commented 7 years ago

@totesarana that's correct

specifically, the x,y,z posision are all normalized to [-1,1]

iridescent303 commented 7 years ago

Thank you for your reply, I feel that it means adding some position information in the network.

totesarana commented 7 years ago

@lfz Thanks. It's good to know I understood it correctly. Is there a specific reason for you to add this coordinate information in the last layer of the network?

Also, I noticed you have the same x,y,z generation procedure for images that are flipped (-1, 0 , 0, 0 ,-1, 0, 0, 0, 1). Should it be fixed during testing and training code? I have done a fix to my version. If needed, I can paste my code here.

Or another solution is to add a fix in the pre-processing step. From the version of code I have (Downloaded on May 13), you flipped the mask but did not flip the image.

iridescent303 commented 7 years ago

@totesarana In my opinion, if the image is flipped, then flipping either the image or the mask is enough when the label is got from the image that is flipped. But I am not sure about this.

totesarana commented 7 years ago

@iridescent303 I have read his recent updates just now. He added a line in prepare.py that flips the image as well. I think this is important. Otherwise, you will end up with getting an incorrectly masked CT image.

galactica147 commented 7 years ago

anyone found the definition of self.back2()?