McGregorWwww / UDTransNet

This repo is the official implementation of 'Narrowing the semantic gaps in U-Net with learnable skip connections: The case of medical image segmentation' which is an improved journal version of UCTransNet.
MIT License
74 stars 8 forks source link

训练数据归一化相关 #15

Closed LiangYong1216 closed 5 months ago

LiangYong1216 commented 5 months ago

我查看了源代码,为什么没有数据归一化相关的部分呢?或者说在输入图像的时候已经对图像进行了归一化?

McGregorWwww commented 5 months ago

归一化是通过F.to_tensor实现的:https://github.com/McGregorWwww/UDTransNet/blob/a6dfa392c497d4d5e2c6a742f0cddbf945d95d98/Load_Dataset.py#L46 参考:https://pytorch.org/vision/main/_modules/torchvision/transforms/functional.html#to_tensor

LiangYong1216 commented 5 months ago

归一化是通过F.to_tensor实现的:

https://github.com/McGregorWwww/UDTransNet/blob/a6dfa392c497d4d5e2c6a742f0cddbf945d95d98/Load_Dataset.py#L46

参考:https://pytorch.org/vision/main/_modules/torchvision/transforms/functional.html#to_tensor

哈哈,非常感谢,我以为仅仅是转成了tensor呢,谢谢您