Skip to content

Instantly share code, notes, and snippets.

View yu4u's full-sized avatar

Yusuke Uchida yu4u

View GitHub Profile
@yu4u
yu4u / real_time_face.py
Created February 11, 2017 08:55
Real-time face recognition and visualization via dlib and matplotlib
import cv2
import dlib
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import os
predictor_path = "shape_predictor_68_face_landmarks.dat"
# download trained model
if not os.path.isfile(predictor_path):
@yu4u
yu4u / caltech_evaluation.sh
Created October 24, 2016 14:56
Download Caltech Pedestrian Detection Benchmark
#!/bin/bash
# download toolbox
git clone https://github.com/pdollar/toolbox pdollar_toolbox
# download evaluation/labeling code
wget http://www.vision.caltech.edu/Image_Datasets/CaltechPedestrians/code/code3.2.1.zip
mkdir code
unzip code3.2.1.zip -d code
rm code3.2.1.zip
@yu4u
yu4u / ExtractGSIFT.cpp
Created June 18, 2013 14:47
Extract a single SIFT feature vector (global SIFT) from an entire image.
void extractGSIFT(const cv::Mat& src, std::vector<float>& feature)
{
const int W = 200;
const int H = 200;
const int NBP = 4;
const int NBO = 8;
const bool USEW = true;
cv::Mat gray;
cv::Mat img;