Skip to content

Instantly share code, notes, and snippets.

@natxopedreira
natxopedreira / setup OpenVINO 2019R3.txt
Created Feb 22, 2021 — forked from KunYi/setup OpenVINO 2019R3.txt
install OpenVINO 2019 R3 on Ubuntu 18.04 with Python3 for demo
View setup OpenVINO 2019R3.txt
# install steps for people_counting demo
# for Ubuntu 18.04 AMD64 & OpenVINO 2019R3
sudo apt update
sudo apt install vim curl wget apt-transport-https net-tools python3 python3-pip
cd Download
curl http://registrationcenter-download.intel.com/akdlm/irc_nas/15944/l_openvino_toolkit_p_2019.3.334.tgz
tar -xvzf l_openvino_toolkit_p_2019.3.334.tgz
cd l_openvino_toolkit_p_2019.3.334/
sudo ./install_GUI.sh
cd /opt/intel/openvino/install_dependencies/
View gist:420a274da9b5766d5045f8940308ea3f
/home/natxo/arduino-1.8.13/arduino-builder -dump-prefs -logger=machine -hardware /home/natxo/arduino-1.8.13/hardware -tools /home/natxo/arduino-1.8.13/tools-builder -tools /home/natxo/arduino-1.8.13/hardware/tools/avr -built-in-libraries /home/natxo/arduino-1.8.13/libraries -libraries /home/natxo/Arduino/libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=es-es -ide-version=10813 -build-path /tmp/arduino_build_876421 -warnings=none -build-cache /tmp/arduino_cache_681101 -verbose /home/natxo/Desktop/BSEC-Arduino-library-1.6.1474/examples/basic/basic.ino
/home/natxo/arduino-1.8.13/arduino-builder -compile -logger=machine -hardware /home/natxo/arduino-1.8.13/hardware -tools /home/natxo/arduino-1.8.13/tools-builder -tools /home/natxo/arduino-1.8.13/hardware/tools/avr -built-in-libraries /home/natxo/arduino-1.8.13/libraries -libraries /home/natxo/Arduino/libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=es-es -ide-version=10813 -build-path /tmp/arduino_build_876421 -warnings
View set_window_front.c
/* set_window_front
On EWMH-compliant window managers, sets the _NET_WM_STATE of the given
window to _NET_WM_STATE_ABOVE to make it stay on top of all others besides
_NET_WM_STATE_FULLSCREEN. If the window manager is not EWMH-compliant,
nothing is done.
Arguments:
Display *disp - a pointer to the X display
Window wind - the window being moved to the front
*/
View gist:752d893f46283de9c675acce582b6277
https://qiita.com/PINTO/items/9c39466b8473da2a27e1
https://github.com/jacopomaroli/intel-neural-compute-stick-2-raspberry-pi-zero
https://solarianprogrammer.com/2019/08/07/cross-compile-opencv-raspberry-pi-zero-raspbian/
View gist:f5467dea8b9f267e0a39e0cad422e37d
FROM debian:buster
USER root
RUN dpkg --add-architecture armhf && \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
crossbuild-essential-armhf \
git \
@natxopedreira
natxopedreira / annotation.xml
Created Jun 1, 2020 — forked from Prasad9/annotation.xml
A sample XML annotation file based on Pascal VOC format.
View annotation.xml
<annotation>
<folder>GeneratedData_Train</folder>
<filename>000001.png</filename>
<path>/my/path/GeneratedData_Train/000001.png</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>224</width>
<height>224</height>
@natxopedreira
natxopedreira / libfacedetection
Created May 21, 2020
libfacedetection output landmarks
View libfacedetection
net = cv.dnn.readNet('facedetectcnn_320.xml', 'facedetectcnn_320.bin')
net.setPreferableBackend(cv.dnn.DNN_BACKEND_DEFAULT)
net.setPreferableTarget(cv.dnn.DNN_TARGET_MYRIAD)
outNames = net.getUnconnectedOutLayersNames()
print("outNames ", outNames)
image = cv.imread('27.jpg')
blob = cv.dnn.blobFromImage(image, size=(image.shape[1], image.shape[0]), ddepth=cv.CV_8U)
@natxopedreira
natxopedreira / openvino build
Created May 20, 2020
my notes on how to build from source
View openvino build
FROM debian:buster
USER root
RUN dpkg --add-architecture armhf && \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
crossbuild-essential-armhf \
cmake \
@natxopedreira
natxopedreira / openvino install from source
Last active May 27, 2020
add paths of a fresh compiled openvino from source
View openvino install from source
export PYTHONPATH="/home/pi/openvino/bin/armv7l/Release/lib/python_api/python3.7/:$PYTHONPATH"
#export PYTHONPATH="/home/pi/openvino/inference-engine/temp/opencv_4.3.0_debian9arm/python/python3:$PYTHONPATH"
export LD_LIBRARY_PATH="/home/pi/openvino/inference-engine/temp/opencv_4.3.0_debian9arm/opencv/lib/:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/home/pi/openvino/bin/armv7l/Release/lib/:$LD_LIBRARY_PATH"
export PYTHONPATH=/home/pi/opencv_install/lib/python2.7/dist-packages/:$PYTHONPATH
export PYTHONPATH=/home/pi/opencv_install/lib/python3.7/dist-packages/:$PYTHONPATH
export LD_LIBRARY_PATH=/home/pi/opencv_install/lib/:$LD_LIBRARY_PATH
View facelib
from facelib import facerec
import cv2
import time
face_detector = facerec.SSDFaceDetector(tpu=True)
landmark_detector = facerec.LandmarkDetector(name='mobilenet_int8_tpu')
feature_extractor = facerec.FeatureExtractor(name='mobilenet_int8_tpu')
pipeline = facerec.Pipeline(face_detector, landmark_detector, feature_extractor)