Unet network for liver CT image segmentation
structure of project
--project
main.py
--data
--train
--val
to download data and trained weight link:https://pan.baidu.com/s/1oCKoujsZGi5iV1w1xiwTVg code: 1dhw
python main.py train
load the last saved weight
python main.py test --ckpt=weights_19.pth
项目文件分布如下
--project
main.py
--data
--train
--val
数据和权重可以使用百度云下载 链接: https://pan.baidu.com/s/1oCKoujsZGi5iV1w1xiwTVg 提取码: 1dhw
python main.py train
加载权重,默认保存最后一个权重
python main.py test --ckpt=weights_19.pth
修改2个地方即可:unet最后一层的通道数设置为类别数;损失函数使用CrossEntropyLoss