Skip to content

Instantly share code, notes, and snippets.

View pliablepixels's full-sized avatar
💭
A clear conscience is usually the sign of a bad memory

Pliable Pixels pliablepixels

💭
A clear conscience is usually the sign of a bad memory
View GitHub Profile
// create a dummy frame provider with the same dimensions as the original feed
Options options;
options.add( "width", IMG_W );
options.add( "height", IMG_H );
options.add( "pixelFormat", (PixelFormat)AV_PIX_FMT_RGB24 );
DummyInput dummyInput( "dummy", options );
app.addThread( &dummyInput );
// Instantiate a fallback class that looks for frames from "detector"
// and if none are received in 2 seconds, switches to dummy frames
Options faceOptions;
//faceOptions.set( "method", "hog" );
//faceOptions.set( "dataFile", "shape_predictor_68_face_landmarks.dat" );
faceOptions.set( "method", "cnn" );
faceOptions.set( "dataFile", "mmod_human_face_detector.dat" );
faceOptions.set( "markup", FaceDetector::OZ_FACE_MARKUP_ALL );
FaceDetector detector( "detector", faceOptions );
detector.registerProvider( r );
app.addThread( &detector );
@pliablepixels
pliablepixels / zoneminder-ssl.conf
Last active June 21, 2018 15:52
New ZM 1.3.44+ Apache config - all in one file for Ubuntu 16+
<IfModule mod_ssl.c>
<VirtualHost *:80>
# Replace these two lines with your server name and contact
ServerName myserver.domain
ServerAdmin webmaster@localhost
SSLEngine on
# Replace these lines with your SSL Certs
SSLCertificateFile /etc/letsencrypt/live/myserver.domain/fullchain.pem
# This is now started unconditionally
runCommand( "zmdc.pl start zmeventnotification.pl" );
runCommand( "zmdc.pl start zmfilter.pl" );
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam": "my team id",
"packageType": "development",
"automaticProvisioning": true,
"buildFlag": [
"EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
# This configuration is only needed for compatibility with zmninja
# Make sure you have enabled headers with sudo a2enmod headers
# If not using VirtualHosts, copy or symlink this file into the Apache config folder
# If using VirtualHosts, then this config must be placed inside the appropriate
# <VirtualHost> directive.
#zmNinja header permissions. Tweak to your needs
Header always set Access-Control-Allow-Credentials true
#zmNinja's WKWebView will set the origin header as localhost:8080
import face_recognition
import cv2
import os
my_portal='https://yourserver:yourport/zm'
my_user='admin'
my_pass='yourpass'
my_monitor=11
# src=0 # this is for your first local camera
diff --git a/zmeventnotification.pl b/zmeventnotification.pl
index cd622ab..b20d663 100755
--- a/zmeventnotification.pl
+++ b/zmeventnotification.pl
@@ -41,7 +41,9 @@ use Time::HiRes qw/gettimeofday/;
use Symbol qw(qualify_to_ref);
use IO::Select;
-#use Data::Dump qw(dump);
+# debugging only
@pliablepixels
pliablepixels / find_object.py
Last active June 7, 2019 17:08
Find object in recorded video
Moved to https://github.com/pliablepixels/zmMagik
@pliablepixels
pliablepixels / NVIDIA GPU CUDA 10.1 Ubuntu 18.md
Last active August 23, 2023 10:28
All the stuff to get CUDA 10.1 working with NVIDIA GPUs on Ubuntu 18.04. My notes.

All the stuff to get CUDA 10.1 working with NVIDIA GPUs on Ubuntu 18.04. My notes.

Step 1: Install NVIDIA Driver

  • sudo apt install nvidia-driver-430
  • reboot
  • run nvidia-smi. If it does not show your GPU, stop, fix. If this doesn't work, nothing else will (the rest of the stuff will compile, but won't work)