Skip to content

Instantly share code, notes, and snippets.

@berak
berak / exudates.cpp
Last active December 28, 2018 18:37
exudates
#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;
// https://ieeexplore.ieee.org/document/8015123
@berak
berak / test10.cpp
Created December 18, 2018 10:44
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;
@berak
berak / Tracker.cpp
Last active December 9, 2018 11:30
MCKFup
/*******************************************************************************
* MKCFup Version 1.0
* Copyright 2018 Bin Yu, UCAS&NLPR, Beijing. [yubin2017@ia.ac.cn]
* 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>
@berak
berak / lbdmodel.yaml
Last active December 3, 2018 12:24
lbfmodel
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
%YAML:1.0
---
stages_n: 5
tree_n: 6
tree_depth: 5
n_landmarks: 68
@berak
berak / output.txt
Last active November 25, 2018 15:06
tracker benchmark
benchmark --gt=david.gt.txt --video=david.webm --start=300 --plot CSRT,MOSSE,MEDIAN_FLOW,BACF,CMT,MIL,BOOSTING,TLD
==========
CSRT
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
@berak
berak / east_dnn.java
Last active October 4, 2023 04:56
east text detection, java flavour (@Zappyford, corrected)
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.opencv.core.Core;
import org.opencv.core.*;
import org.opencv.core.MatOfFloat;
import org.opencv.core.MatOfByte;
import org.opencv.core.Scalar;
@berak
berak / pcn.txt
Created November 3, 2018 13:26
PCN output
C:\p\ocv\dnn>dnn_print -m=C:\p\ocv\PCN-FaceDetection-FaceAlignment-master\code\model\PCN.caffemodel -p=C:\p\ocv\PCN-FaceDetection-FaceAlignment-master\code\model\PCN-1.
prototxt -W=24 -H=24 -i=C:\p\ocv\PCN-FaceDetection-FaceAlignment-master\imgs\1.jpg -v=3
_input i[1, 3, 24, 24] o[1, 3, 24, 24]
conv1_1 Convolution i[1, 3, 24, 24] o[1, 16, 11, 11] w[16, 3, 3, 3] w[16, 1]
relu1_1 ReLU i[1, 16, 11, 11] o[1, 16, 11, 11]
conv2_1 Convolution i[1, 16, 11, 11] o[1, 32, 5, 5] w[32, 16, 3, 3] w[32, 1]
relu2_1 ReLU i[1, 32, 5, 5] o[1, 32, 5, 5]
conv3_1 Convolution i[1, 32, 5, 5] o[1, 64, 2, 2] w[64, 32, 3, 3] w[64, 1]
relu3_1 ReLU i[1, 64, 2, 2] o[1, 64, 2, 2]
fc4_1 Convolution i[1, 64, 2, 2] o[1, 128, 1, 1] w[128, 64, 2, 2] w[128, 1]
#include "brisque.h"
#include "libsvm/svm.h"
/*
float computescore(char* imagename){
float qualityscore;
char* filename = "test.txt";
#include "brisque.h"
//function definitions
static void AGGDfit(const cv::Mat & structdis, double& lsigma_best, double& rsigma_best, double& gamma_best)
{
cv::Mat_<double> Imarr(structdis);
long int poscount=0, negcount=0;
double possqsum=0, negsqsum=0, abssum=0;
for (int i=0;i<structdis.rows;i++)
@berak
berak / irc.pl
Last active September 19, 2018 15:31
owl positive ..
:- use_module(library(socket)).
irc :-
NICK="cvtail",
CHAN="#p4p4p4",
Adress = 'irc.freenode.net':6667,
tcp_socket(Socket),
tcp_connect(Socket, Adress, Read, Write),
write_list(Write,["PASS i_am_",NICK]),
write_list(Write,["USER ",NICK," 12 * ",NICK]),