2 语义分割-模型训练(unet,DeepLabV3等)

 

语义分割-模型训练(unet,DeepLabV3等)

csdn参考:https://blog.csdn.net/weixin_44791964/category_10667625.html(憨批的语义分割重制版)

github:

  1deeplabv3:https://github.com/bubbliiiing/deeplabv3-plus-pytorch

  2unet:https://github.com/bubbliiiing/unet-pytorch

 

1 DeepLabV3使用txt

语义分割

STDC-Seg (可参考)
1https://github.com/MichaelFan01/STDC-Seg
BiSeNetV1
2https://github.com/CoinCheung/BiSeNet
mmsegmentation
3https://github.com/open-mmlab/mmsegmentation
############参考示例####
https://cvmart.net/community/detail/6224

#########Deeplabv3使用示例#############
csdn:https://blog.csdn.net/weixin_44791964/article/details/120113686
github:https://github.com/bubbliiiing/deeplabv3-plus-pytorch

1 标注
标注工具:labelme
安装:pip install labelme==3.16.7
使用:1终端输入labelme;2 file-->Save Automatically;3生成对应的json文件

2  转换json 为SegmentationClass图片
 修改20-23:路径与类(classes)的修改
 执行json_to_dataset.py

3 划分数据集 
复制JPEGImages 与 SegmentationsClass 到VOC2007
(如果已经标注好数据集,可参考separate_Segmentations_dataset.py 移动数据到VOC2007)
执行 voc_annotation.py

4 训练
 4.1修改 69行 num_classes=3
 其他修改可自行处理
 4.2 修改(log.txt,model,tensorboard等)
    train.py 213 行--》save_dir= '/project/train/models/' #wh
    utils.callbacks.LossHistory修改log.model相关
    
View Code

 

2 deeplabv3 && unet 经验

1 Deeplabv3+分割效果更好,边缘更光滑,但是训练和推断速度都比较慢;
2 Unet训练速度很快,硬件资源有限的情况下,可以用Unet尝试更多的想法;
3 Deeplabv3+增大epoch有改善趋势,但是它,实在,是好慢…

 

3 其他

 

posted @ 2022-05-18 17:40  风hua  阅读(625)  评论(0)    收藏  举报