(link: http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html)
1. download caffe-segnet or caffe-segnet-cudnn accelerated version
- choose one considering your ubuntu configuration. In my case, I tried both, however, I used the 'caffe-segnet-cudnn'
(from https://github.com/ethereon/caffe-tensorflow/issues/118)
Note. we SHOULD download above caffe without using pre-installed caffe. because some parameters are deprecated and no longer valid in our current Caffe version (updated on 1.8.2018).
you can see the definitions in ${CAFFE_ROOT}/src/caffe/proto/caffe.proto
Ex)
message LayerParameter{
...
optional BNParameter bn_param = 45;
...
}
message BNParameter{
...
optional FillerParameter scale_filler = 1; // The filler for the scale
optional FillerParameter shift_filler = 2; // The filler for the shift
}
>> those parameters are no longer valid in current version of Caffe.
2. download trained weights
(link: https://github.com/alexgkendall/SegNet-Tutorial/blob/master/Example_Models/segnet_model_zoo.md)
- For testing segmentation performance of urban scenes, download two files:
CAMVID-SegnetBasic:
http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_basic_camvid.caffemodel ( segnet_basic_camvid.prototxt)
Cityscapes:
http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_iter_30000_timo.caffemodel ( segnet_model_driving_webdemo.prototxt)
3. testing the SegNet
using downloaded weights, we can test the network.
1) run test_segmentation_camvid.py
> python SegNet-Tutorial/Scripts/test_segmentation_camvid.py --model SegNet-Tutorial/Models/segnet_inference.prototxt --weights SegNet-Tutorial/Models/Inference/segnet_iter_30000_timo.caffemodel --iter 233
Note. for pretrained weights using cityscapes, author used 11-class model.
In 'test_segmentation_camvid.py' ignore 4th class 'road_marking'
you need to modify the example script a little bit
========================================================================
Activate conda environment
Activate conda environment
https://conda.io/docs/user-guide/tasks/manage-python.html
========================================================================
Caffe-segnet-cudnn build error
when uncommenting 'use_cudnn = 1', there is an error as follows:
...
bc: symbol lookup error: /opt/anaconda3/lib/libreadline.so.6: undefined symbol: PC
try to install readline properly in conda (with ncurses)
https://github.com/conda-forge/rpy2-feedstock/issues/1
========================================================================
Caffe-segnet-cudnn build error
when uncommenting 'use_cudnn = 1', there is an error as follows:
...
bc: symbol lookup error: /opt/anaconda3/lib/libreadline.so.6: undefined symbol: PC
...
try to install readline properly in conda (with ncurses)
https://github.com/conda-forge/rpy2-feedstock/issues/1
댓글 없음:
댓글 쓰기