SegNet安装运行
来源:互联网 发布:nginx php fpm 编辑:程序博客网 时间:2024/05/16 10:43
SegNet是英国剑桥大学Computer Vision and Robotics Group的作品;是一个深度卷积编码-解码结构,用于对图像进行像素级的语义分割;可以将像素分为12类,包括道路、建筑物、电线杆、路牌、行人和骑行者等12类标注,具有实时性;其源代码在github上。
1. 安装
首先下载SegNet并解压。因为它是给予caffe实现的,所以先编译过程和要求与caffe相同。
1.按照博客 Ubuntu14.04通过make+cmake编译安装caffe 的第一步准备依赖环境。
2.安装各种需要用到的库
sudo apt-get install python-matplotlibsudo apt-get install python-scipysudo apt-get install python-opencvsudo apt-get install python-protobufwget https://bootstrap.pypa.io/get-pip.py --no-check-certificatesudo python get-pip.pysudo pip install -U scikit-image
3.编译
进入主目录
cp Makefile.config.example Makefile.config
修改Makefile.config,注意将WITH_PYTHON_LAYER := 1前的注释去掉。
make allmake pycaffemake test
2. 运行Webcam Demo
去https://github.com/alexgkendall/SegNet-Tutorial下载目录并解压。去http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/下载对应的权重参数
修改Scripts/webcam_demo.py的14行为你安装的SegNet,我的为caffe_root = '/home/gph/Desktop/caffe-segnet-segnet-cleaned'
调用命令即可运行:
python Scripts/webcam_demo.py --model Example_Models/segnet_model_driving_webdemo.prototxt --weights /Example_Models/segnet_weights_driving_webdemo.caffemodel --colours /Scripts/camvid12.png
3. 问题记录
1. No module named matplotlib.pyplot
Traceback (most recent call last):
File “Scripts/webcam_demo.py”, line 2, in
import matplotlib.pyplot as plt
ImportError: No module named matplotlib.pyplot
sudo apt-get install python-matplotlib
2. No module named scipy
ImportError: No module named scipy
sudo apt-get install python-scipy
3. No module named cv2
ImportError: No module named cv2
sudo apt-get install python-opencv
4. No module named caffe
Traceback (most recent call last):
File “Scripts/webcam_demo.py”, line 16, in
import caffe
ImportError: No module named caffe
export PYTHONPATH=/home/gph/Desktop/caffe-segnet-segnet-cleaned/python
5. No module named _caffe
Traceback (most recent call last):
File “Scripts/webcam_demo.py”, line 16, in
import caffe
File “/home/gph/Desktop/caffe-segnet-segnet-cleaned/python/caffe/init.py”, line 1, in
from .pycaffe import Net, SGDSolver
File “/home/gph/Desktop/caffe-segnet-segnet-cleaned/python/caffe/pycaffe.py”, line 13, in
from ._caffe import Net, SGDSolver
ImportError: No module named _caffe
gph@gph-pc:~/Desktop/caffe-segnet-segnet-cleaned$ make pycaffe
6. KeyError: ‘argmax’
Traceback (most recent call last):
File “Scripts/webcam_demo.py”, line 32, in
output_shape = net.blobs[‘argmax’].data.shape
KeyError: ‘argmax’
模型文件不对
7. Check failed: error == cudaSuccess (2 vs. 0) out of memory
显存不够
- SegNet安装运行
- SegNet安装运行for 16.04
- caffe-segnet安装
- SegNet
- segnet---训练
- segnet---caffe
- READING NOTE: Bayesian SegNet
- segnet检测问题
- 语义分割SegNet
- ssd+segnet工作日志
- 图像分割“SegNet”
- SegNet 速览笔记
- SegNet-论文笔记-理解
- 【SegNet】SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image
- 语义分割-2:segnet网络
- 【语义分割】[文章阅读]segNet
- u-net segnet 学习笔记
- 关于Segnet训练过程中的几个问题
- Android Studio 入门指南
- plsql 查询正在执行的sql
- Thinkpad恢复F1F2...功能键
- ip输入限制及验证
- Fuel9编译指南-2 自编译fuel运行情况
- SegNet安装运行
- jsonp 跨域请求
- PHP中使用curl实现get、post请求
- Mybatis中的resultType和resultMap
- hbase中list命令报错
- AB 液体发泡硅胶(双组份发泡硅胶)IOTA 663A,B
- BatteryHistorian
- MaterializeCss 解决没有Time Picker的问题
- 通过js从后台数据库拿到值,再由a标签向jsp传值,再通过另外一个js获取这个值