GPIO、I2C、I2S、SPI、带流控制的TTL UART等接口,摄像头扩展头,PCIe x4接口,USB 2.0 Client/Host接口
sudo add-apt-repository universe
sudo apt-get update –y
/bin/echo -e "\e[1;32mLoading Caffe Dependencies.\e[0m"
sudo apt-get install cmake –y
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev \
libhdf5-serial-dev protobuf-compiler –y
sudo apt-get install --no-install-recommends libboost-all-dev –y
sudo apt-get install libatlas-base-dev –y
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev –y
sudo apt-get install python-dev python-numpy -y
sudo usermod -a -G video $USER
/bin/echo -e "\e[1;32mCloning Caffe into the home directory\e[0m"
cd $HOME
git clone https://github.com/BVLC/caffe.git
cd caffe
cp Makefile.config.example Makefile.config
cmake -DCUDA_USE_STATIC_CUDA_RUNTIME=OFF
echo "INCLUDE_DIRS += /usr/include/hdf5/serial/" >> Makefile.config
/bin/echo -e "\e[1;32mCompiling Caffe\e[0m"
make -j4 all
/bin/echo -e "\e[1;32mRunning Caffe Tests\e[0m"
make -j4 runtest
若opencv 有问题,更换opencv版本,修改CMakeList.txt如下
Opencv_DIR为你自己编译的opencv build 目录
参考http://blog.csdn.net/haizimin/article/details/51927386
MNIST 是由Yann LeCun 创建的一个手写数字数据库,手写数字包括0~9共10类数字,有60000幅训练图像以及10000幅测试图像。
官方网站:http://yann.lecun.com/exdb/mnist/。
获得MNIST数据集
# cd ./data/mnist
#./get_mnist.sh
生成训练及测试数据,将样本转为leveldb格式
# cd ./examples/mnist
# ./create_mnist.sh
执行该命令后在当前路径下生成两个目录,mnist_test_lmdb及mnist_train_lmdb
训练及测试
# cd ./examples/mnist/data/mnist
# ./train_lenet.sh
本次训练使用60000幅图像迭代了10000次,同时测试了识别10000幅图像,正确率为99.05%。
同时,程序分别生成训练迭代5000次及10000次的模型文件
cifar-10是由Hinton等人整理的用于目标识别的图像数据集。该数据集中总共有10类目标,每一类有 6000 幅32x32 的彩色图像组成,共60000幅。其中50000幅用于训练,每一类中随机选出1000幅,共10000幅图片用于测试。
获得cifar-10 数据集
# cd ./data/cifar10
# ./get_cifar10.sh
共下载得到6个batch文件,其中5个用于训练,一个用于测试。每个batch有10000幅图像。
生成训练及测试数据,将样本转为leveldb格式
# cd ./examples/cifar10
# ./create_cifar10.sh
生成cifar10_train_lmdb、cifar10_test_lmdb两个目录及均值文件mean.binaryproto
训练及测试
# cd ./examples/cifar10
# ./train_full.sh
本次训练使用50000幅图像迭代了68000次,同时测试了识别10000幅图像,正确率为81.51%。
1、git clone –recursive https://github.com/rbgirshick/py-faster-rcnn.git
2、
cd py-faster-rcnn/lib
Make
3、编译caffe,先修改 cudnn 为cudnn 3
cd caffe-fast-rcnn
cmake -DCUDA_USE_STATIC_CUDA_RUNTIME=OFF
make –j8 all
make pycaffe
4.
http://stackoverflow.com/questions/31328436/typeerror-constructor-returned-null-while-importing-pyplot-in-ssh
5.
cd ../
./data/scripts/fetch_faster_rcnn_models.sh
./tools/demo.py
1、 修改CMakeLists.txt
2、 Cmake ../
3、 Make
4、 报错
解决:https://github.com/muupan/dqn-in-the-caffe/issues/3
5、运行
在tx1上我们无法使用nvidia-smi查看GPU使用情况,这里要使用sudo ~/tegrastats
EMC – memory controller
AVP – audio/video processor
VDE – video decoder engine
GR3D – GPU
1.apt-get install vnc4server
2.$sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
3.然后修改xstartup文件(/home/Ubuntu/.vnc)
#!/bin/sh
# Uncomment the following two lines for normal desktop:
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnmoe-settings-daemon &
metacity &
nautilus &
gnome-terminal &
4.vncserver
5.windows上下载客户端连接
tar zxvf file>
Copy files in “include” dir and “lib” dir into /usr/local/cuda/include/ and /usr/local/cuda/lib/
1.安装使用下载 OpenCV for Linux/Mac (Version 3.1),然后
sudo apt-add-repository universe
sudo apt-get update
# Some general development libraries
sudo apt-get install -y build-essential make cmake cmake-curses-gui g++
# libav video input/output development libraries
sudo apt-get install -y libavformat-dev libavutil-dev libswscale-dev
# Video4Linux camera development libraries
sudo apt-get install -y libv4l-dev
# Eigen3 math development libraries
sudo apt-get install -y libeigen3-dev
# OpenGL development libraries (to allow creating graphical windows)
sudo apt-get install -y libglew1.6-dev
# GTK development libraries (to allow creating graphical windows)
sudo apt-get install -y libgtk2.0-dev
# Compile and install opencv
cd ~
mkdir src
cd src
unzip ~/Downloads/opencv-3.1.0.zip
cd opencv-3.1.0
mkdir build
cd build
cmake -DWITH_CUDA=ON -DCUDA_ARCH_BIN="5.3" -DCUDA_ARCH_PTX="" -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DCUDA_FAST_MATH=ON -DCMAKE_INSTALL_PREFIX=/home/ubuntu/opencv-3.1.0 ..
make -j4 install
因为cuda8与opencv3不兼容会报错
解决办法:修改 ~/opencv/modules/cudalegacy/src/graphcuts.cpp文件内容,如图:
2、测试
test.c
#include "opencv/highgui.h"
int main(int argc,char** argv){
IplImage* img= cvLoadImage(argv[1]);
cvNamedWindow("Example1",CV_WINDOW_AUTOSIZE);
cvShowImage("Example1",img);
cvWaitKey(0);
cvReleaseImage(&img);
cvDestroyWindow("Example1");
}
编译文件
g++ test.c -o test `pkg-config --libs --cflags opencv`