- 下载安装segnet,放在文件夹下(本人SegNet-Tutorial)可得文件如下所示:
/SegNet-Tutorial/
CamVid/
test/
testannot/
train/
trainannot/
test.txt
train.txt
Models/
# SegNet and SegNet-Basic model files for training and testing
Scripts/
compute_bn_statistics.py
test_segmentation_camvid.py
caffe-segnet/
# caffe 下载安装
修改CamVid/test.txt 和 CamVid/train.txt 里面的路径,修改为自己的路径(最好改为绝对路径),例如/SegNet/CamVid/train/0000.png 修改为 /home/zml/SegNet-Tutorial/CamVid/train/0000.png。 我用我的vim编辑器进行操作【 :%s#SegNet#home/zml/SetNet-Tutorial#g 】
首先修改 Models/segnet_train.prototxt
和 Models/segnet_inference.prototxt
。把 Models/segnet_train.prototxt
里面的第8行 source 修改为自己的绝对路径(例如:/home/zml/Segnet-Tutorial/CamVid/train.txt)。因为是CPU运行,所以把第9行的batch-size改为了1。
其次,修改