Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit f68e770

Browse files
committed
ffmpeg bugfix and dldt 2020.1 changes
1 parent 61f7d41 commit f68e770

2 files changed

Lines changed: 8 additions & 21 deletions

File tree

README.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,22 +107,17 @@ I compiled it on Ubuntu 18.04 Linux Container.
107107
sudo apt-get update
108108
sudo apt install build-essential cmake git pkg-config python3-dev nasm python3 virtualenv libusb-1.0-0-dev chrpath patchelf
109109
```
110-
#### Optional ranger-fm installation
111110

112-
```
113-
sudo apt install python3-pip
114-
pip3 install ranger-fm --user
115-
export PATH=~/.local/bin:$PATH
116-
```
117111
### Preparing
118112

113+
0. `git clone https://github.com/banderlog/opencv-python-inference-engine`
119114
1. Download releases of [dldt](https://github.com/opencv/dldt/releases), [opencv](https://github.com/opencv/opencv/releases) and [ffmpeg](https://github.com/FFmpeg/FFmpeg/releases) (or clone their repos)
120-
2. Unpack archives to `dldt`,`opencv` and `ffmpeg` folders.
115+
2. Unpack archives to `dldt`,`opencv` and `ffmpeg` folders (e.g.: `tar -xf 2020.1.tar.gz --strip-components=1 -C ./opencv-python-inference-engine/dldt/`).
121116

122117
3. You'll need to get 3rd party `ade` and `ngraph` repos of certain commit for dldt ([#2](https://github.com/banderlog/opencv-python-inference-engine/issues/2)):
123118

124119
```bash
125-
cd dldt/inference-engine/thirdparty/ade
120+
cd ./opencv-python-inference-engine/dldt/inference-engine/thirdparty/ade
126121
git clone https://github.com/opencv/ade/ ./
127122
git reset --hard cbe2db6
128123

@@ -135,7 +130,7 @@ git reset --hard b0bb801
135130

136131
```bash
137132
# return to "opencv-python-inference-engine" dir
138-
cd ../../../../
133+
cd ../../
139134
virtualenv --clear --always-copy -p /usr/bin/python3 ./venv
140135
./venv/bin/pip3 install numpy
141136
```
@@ -157,7 +152,6 @@ make install
157152
cd ../dldt
158153
./dldt_setup.sh
159154
make -j8
160-
make ie_cpu_extension
161155

162156
cd ../opencv
163157
ABS_PORTION=YOUR_ABSOLUTE_PATH_TO_opencv-python-inference-engine_dir ./opencv_setup.sh
@@ -171,9 +165,9 @@ make -j8
171165
cd ../../
172166
cp build/opencv/lib/python3/cv2.cpython*.so create_wheel/cv2/cv2.so
173167

174-
cp dldt/inference-engine/bin/intel64/Release/lib/*.so create_wheel/cv2/
175-
cp dldt/inference-engine/bin/intel64/Release/lib/*.mvcmd create_wheel/cv2/
176-
cp dldt/inference-engine/bin/intel64/Release/lib/plugins.xml create_wheel/cv2/
168+
cp dldt/bin/intel64/Release/lib/*.so create_wheel/cv2/
169+
cp dldt/bin/intel64/Release/lib/*.mvcmd create_wheel/cv2/
170+
cp dldt/bin/intel64/Release/lib/plugins.xml create_wheel/cv2/
177171
cp dldt/inference-engine/temp/tbb/lib/libtbb.so.2 create_wheel/cv2/
178172

179173
cp build/ffmpeg/binaries/lib/*.so create_wheel/cv2/

build/opencv/opencv_setup.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ PY_LIB_PATH=`find $ABS_PORTION/venv/lib/ -iname libpython3.${PY_VER}m.so`
1919
# >=dldt-2019_R2 requires SSE4_2 (?)
2020
# for CPU_BASELINE and CPU_DISPATCH see https://github.com/opencv/opencv/wiki/CPU-optimizations-build-options
2121
# they should match with ones for dldt/inference-engine/src/extension/cmake/OptimizationFlags.cmake
22+
2223
cmake -D CMAKE_BUILD_TYPE=RELEASE \
2324
-D OPENCV_FORCE_3RDPARTY_BUILD=ON \
2425
-D OPENCV_SKIP_PYTHON_LOADER=ON \
@@ -35,14 +36,6 @@ cmake -D CMAKE_BUILD_TYPE=RELEASE \
3536
-D WITH_PNG=ON \
3637
-D WITH_FFMPEG=ON \
3738
-D FFMPEG_INCLUDE_DIRS=$FFMPEG_PATH/include \
38-
-D FFMPEG_ABSOLUTE_avformat=$FFMPEG_PATH/lib/libavformat.so \
39-
-D pkgcfg_lib_FFMPEG_avformat=$FFMPEG_PATH/lib/pkgconfig/libavformat.pc \
40-
-D FFMPEG_ABSOLUTE_avcodec=$FFMPEG_PATH/lib/libavcodec.so \
41-
-D pkgcfg_lib_FFMPEG_avcodec=$FFMPEG_PATH/lib/pkgconfig/libavcodec.pc \
42-
-D FFMPEG_ABSOLUTE_avutil=$FFMPEG_PATH/lib/libavutil.so \
43-
-D pkgcfg_lib_FFMPEG_avutil=$FFMPEG_PATH/lib/pkgconfig/libavutil.pc \
44-
-D FFMPEG_ABSOLUTE_swscale=$FFMPEG_PATH/lib/libswscale.so \
45-
-D pkgcfg_lib_FFMPEG_swscale=$FFMPEG_PATH/lib/pkgconfig/libswscale.pc \
4639
-D CMAKE_INSTALL_PREFIX=./binaries/ \
4740
-D WITH_TBB=ON \
4841
-D WITH_PROTOBUF=ON \

0 commit comments

Comments
 (0)