i want to configure caffe on my jetson tx2,and i installed some packages on tx2 at first.
i followed the a article from the internet,when i inputed the command :sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
the error were shown:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libopencv-dev : Depends: libopencv-core-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-ml-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-imgproc-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-video-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-objdetect-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-highgui-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-calib3d-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-flann-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-features2d-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-legacy-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-contrib-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-ts-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-photo-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-videostab-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-stitching-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-gpu-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-superres-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libopencv-ocl-dev (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libopencv2.4-java (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libopencv2.4-jni (= 2.4.9.1+dfsg-1.5ubuntu1) but it is not going to be installed
Depends: libcv-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libhighgui-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
Depends: libcvaux-dev (= 2.4.9.1+dfsg-1.5ubuntu1)
can i use the apt-get -f install command ?
You can build caffe without opencv. You’ll need to make sure your images are input in a format it can read without opencv, and you will have to view the output using stand-alone viewers, but that works OK.
Hi,
Just verified caffe on JetPack3.0, it works properly.
Here is our installation steps:
1. Flash TX2 via JetPack (including cuda, opencv4tegra, cuDNN)
2. Pre-required
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt-get install libboost-dev libboost-all-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev libatlas-base-dev liblmdb-dev libblas-dev libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler python-numpy
3. Source
export CAFFE_ROOT=~/caffe
git clone https://github.com/BVLC/caffe.git $CAFFE_ROOT
Apply change
diff --git a/Makefile b/Makefile
index 4d32416..ad173f8 100644
--- a/Makefile
+++ b/Makefile
@@ -178,7 +178,7 @@ ifneq ($(CPU_ONLY), 1)
LIBRARIES := cudart cublas curand
endif
-LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
+LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
# handle IO dependencies
USE_LEVELDB ?= 1
diff --git a/Makefile.config.example b/Makefile.config.example
index d552b38..037e452 100644
--- a/Makefile.config.example
+++ b/Makefile.config.example
@@ -2,7 +2,7 @@
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
-# USE_CUDNN := 1
+USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
@@ -39,6 +39,7 @@ CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=sm_50 \
-gencode arch=compute_52,code=sm_52 \
+ -gencode arch=compute_53,code=sm_53 \
-gencode arch=compute_60,code=sm_60 \
-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_61,code=compute_61
@@ -91,7 +92,7 @@ PYTHON_LIB := /usr/lib
# WITH_PYTHON_LAYER := 1
# Whatever else you find you need goes here.
-INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
+INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
4. Build
cd $CAFFE_ROOT/
cp Makefile.config.example Makefile.config
make -j4
make pycaffe
If not already present, it would make sense for TX2 to add also this in Makefile.config.example :
-gencode arch=compute_62,code=compute_62
Thanks Honey.
Yes, sorry for the misleading.
For tx1, please add
-gencode arch=compute_53,code=sm_53
For tx2, please add
-gencode arch=compute_62,code=sm_62
I want to use OpenCV 3.2.0 in Caffe, and change the Makefile.config. But when do the make, one error come out:
fatal error opencv2/core/core.hpp no such file or directory
Any help???