Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block berak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
berak /
Created Mar 30, 2019
python landmarks test script
# this is a travis related oddity, ignore ...
import sys
import cv2, numpy as np
img = cv2.imread("david2.jpg",0)
cas = cv2.CascadeClassifier("haarcascade_frontalface_alt2.xml")
faces = cas.detectMultiScale(img, 1.5, 5)
View fbox.cpp
#include <opencv2/dnn.hpp>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace cv::dnn;
using namespace std;
int main(int argc, char **argv)
String modelTxt = "c:/data/mdl/faceboxes/deploy.prototxt";
View lenet2.pbtxt
node {
name: "conv2d_input"
op: "Placeholder"
attr {
key: "dtype"
value {
type: DT_FLOAT
attr {
berak / dnn_edges.cpp
Last active Jan 6, 2019
dnn edge detection
View dnn_edges.cpp
#include <opencv2/opencv.hpp>
#include <opencv2/dnn.hpp>
#include <opencv2/dnn/layer.details.hpp>
class CropLayer : public cv::dnn::Layer
CropLayer(const cv::dnn::LayerParams &params) : Layer(params)
berak / core.hpp
Created Dec 28, 2018
LDA wrapped (minimally) to python/java
View core.hpp
/** @brief constructor
Initializes a LDA with num_components (default 0).
explicit LDA(int num_components = 0);
/** Initializes and performs a Discriminant Analysis with Fisher's
Optimization Criterion on given data in src and corresponding labels
View exudates.cpp
#include <iostream>
#include <fstream>
#include "opencv2/opencv.hpp"
#include "opencv2/ximgproc.hpp"
using namespace cv;
using namespace cv::ximgproc;
using std::cout;
using std::endl;
View test10.cpp
// Sample of using Halide backend in OpenCV deep learning module.
// Based on caffe_googlenet.cpp.
#include <opencv2/dnn.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
using namespace cv;
using namespace cv::dnn;
using namespace std;
View Tracker.cpp
* MKCFup Version 1.0
* Copyright 2018 Bin Yu, UCAS&NLPR, Beijing. []
* Paper [High-speed Tracking with Multi-kernel Correlation Filters]
#include <fftw3.h>
#include <opencv2\opencv.hpp>
#include <opencv2\tracking.hpp>
#include <stdio.h>
#include <stdlib.h>
View lbdmodel.yaml
C:\data\mdl>ls -l lbfmodel.yaml
-rw-r--r-- 1 ppp 197121 56375857 Jun 14 12:27 lbfmodel.yaml
C:\data\mdl>head -c 1000 lbfmodel.yaml
stages_n: 5
tree_n: 6
tree_depth: 5
n_landmarks: 68
berak / output.txt
Last active Nov 25, 2018
tracker benchmark
View output.txt
benchmark --video=david.webm --start=300 --plot CSRT,MOSSE,MEDIAN_FLOW,BACF,CMT,MIL,BOOSTING,TLD
Overlap > 0 100% 469
Overlap > 0.5 80.597% 378
Precision 80.597%
Recall 80.597%
f-measure 80.597%
AUC 0.438657
Performance 103.987 ms/frame 9.61663 fps
You can’t perform that action at this time.