Skip to content

Instantly share code, notes, and snippets.

@natxopedreira
natxopedreira / gist:8029087
Last active December 31, 2015 18:49
ffmpeg instalar mac
http://www.markszulc.com/blog/2012/09/03/installing-ffmpeg-with-h264-support-on-mac-os-x-mountain-lion/
// TESTED ON nightly-build ver 0.8 (of_v20130813) in Visual Studio 2012 - Win64
// MAKE APP ALWAYS ON TOP
HWND AppWindow = GetActiveWindow();
SetWindowPos(AppWindow, HWND_TOPMOST, NULL, NULL, NULL, NULL, SWP_NOMOVE | SWP_NOSIZE);
// DISABLE FUNCTION DESCRIBED ABOVE
HWND AppWindow = GetActiveWindow();
From this: https://github.com/raspberrypi/linux/issues/1285#issuecomment-182264729
That is, add:
dtparam=watchdog=on
to the end of /boot/config.txt
$ ls -l /dev/wat*
crw------- 1 root root 10, 130 May 20 01:28 /dev/watchdog
crw------- 1 root root 253, 0 May 20 01:28 /dev/watchdog0
@natxopedreira
natxopedreira / piWatchdog.h
Last active September 27, 2017 19:33
clase para rpi watchdog
#ifndef rpiWatchdog_h
#define rpiWatchdog_h
#include <linux/watchdog.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
class piWatchdog
{
//
// s3Threaded.h
// AWS
//
// Created by Natxo Pedreira gonzalez on 31/5/18.
//
//
#ifndef AWS_s3Threaded_h
#define AWS_s3Threaded_h
https://github.com/williamFalcon/tensorflow-gpu-install-ubuntu-16.04
http://blog.nitishmutha.com/tensorflow/2017/01/22/TensorFlow-with-gpu-for-windows.html
https://medium.com/@taylordenouden/installing-tensorflow-gpu-on-ubuntu-18-04-89a142325138
python style.py --style styles\Staryy.jpg --checkpoint-dir models\starry --content-weight 1.5e1 --checkpoint-iterations 1000 --batch-size 3
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)
@natxopedreira
natxopedreira / openvino build
Created May 20, 2020 22:10
my notes on how to build from source
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 / libfacedetection
Created May 21, 2020 09:58
libfacedetection output landmarks
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)