This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |