All Projects → icsfy → Pedestrian_detection

icsfy / Pedestrian_detection

通过HOG+SVM训练进行行人检测,行人数据库使用INRIAPerson,程序基于OpenCV实现

Labels

Projects that are alternatives of or similar to Pedestrian detection

Vehicle counting hog svm
Vehicle detection, tracking and counting by SVM is trained with HOG features using OpenCV on c++.
Stars: ✭ 82 (-67.59%)
Mutual labels:  opencv, svm
Vehicle Detection And Tracking
Udacity Self-Driving Car Engineer Nanodegree. Project: Vehicle Detection and Tracking
Stars: ✭ 60 (-76.28%)
Mutual labels:  opencv, svm
Smart Surveillance System Using Raspberry Pi
This is my Third Year Project for face recognition using OpenCV
Stars: ✭ 41 (-83.79%)
Mutual labels:  opencv, svm
Scene Text Recognition
Scene text detection and recognition based on Extremal Region(ER)
Stars: ✭ 146 (-42.29%)
Mutual labels:  opencv, svm
Keras-CIFAR10
practice on CIFAR10 with Keras
Stars: ✭ 25 (-90.12%)
Mutual labels:  svm
MachineLearning
机器学习教程,本教程包含基于numpy、sklearn与tensorflow机器学习,也会包含利用spark、flink加快模型训练等用法。本着能够较全的引导读者入门机器学习。
Stars: ✭ 23 (-90.91%)
Mutual labels:  svm
SpeechEmoRec
Speech Emotion Recognition Using Deep Convolutional Neural Network and Discriminant Temporal Pyramid Matching
Stars: ✭ 44 (-82.61%)
Mutual labels:  svm
SentimentAnalysis
(BOW, TF-IDF, Word2Vec, BERT) Word Embeddings + (SVM, Naive Bayes, Decision Tree, Random Forest) Base Classifiers + Pre-trained BERT on Tensorflow Hub + 1-D CNN and Bi-Directional LSTM on IMDB Movie Reviews Dataset
Stars: ✭ 40 (-84.19%)
Mutual labels:  svm
DSPKM
This is the page for the book Digital Signal Processing with Kernel Methods.
Stars: ✭ 32 (-87.35%)
Mutual labels:  svm
No-Reference-Image-Quality-Assessment-using-BRISQUE-Model
Implementation of the paper "No Reference Image Quality Assessment in the Spatial Domain" by A Mittal et al. in OpenCV (using both C++ and Python)
Stars: ✭ 137 (-45.85%)
Mutual labels:  svm
ExtendedMorphologicalProfiles
Remote sensed hyperspectral image classification with Spectral-Spatial information provided by the Extended Morphological Profiles
Stars: ✭ 32 (-87.35%)
Mutual labels:  svm
Hyperspectral-image-target-detection-based-on-sparse-representation
Hyperspectral image Target Detection based on Sparse Representation
Stars: ✭ 52 (-79.45%)
Mutual labels:  svm
text-classification-svm
The missing SVM-based text classification module implementing HanLP's interface
Stars: ✭ 46 (-81.82%)
Mutual labels:  svm
Padestrian-Detection
Padestrian Detection in images using HOG Vector
Stars: ✭ 21 (-91.7%)
Mutual labels:  svm
osqp
The Operator Splitting QP Solver
Stars: ✭ 929 (+267.19%)
Mutual labels:  svm
sign-language
Android application which uses feature extraction algorithms and machine learning (SVM) to recognise and translate static sign language gestures.
Stars: ✭ 35 (-86.17%)
Mutual labels:  svm
NIDS-Intrusion-Detection
Simple Implementation of Network Intrusion Detection System. KddCup'99 Data set is used for this project. kdd_cup_10_percent is used for training test. correct set is used for test. PCA is used for dimension reduction. SVM and KNN supervised algorithms are the classification algorithms of project. Accuracy : %83.5 For SVM , %80 For KNN
Stars: ✭ 45 (-82.21%)
Mutual labels:  svm
CS231n
My solutions for Assignments of CS231n: Convolutional Neural Networks for Visual Recognition
Stars: ✭ 30 (-88.14%)
Mutual labels:  svm
HOG-Pedestrian-Detector
MATLAB implementation of a basic HOG + SVM pedestrian detector.
Stars: ✭ 43 (-83%)
Mutual labels:  svm
ml
经典机器学习算法的极简实现
Stars: ✭ 130 (-48.62%)
Mutual labels:  svm

HOG+SVM进行行人检测

运行环境为:Ubuntu 16.04 && OpenCV 2.4.13
代码参考自:http://blog.csdn.net/masibuaa/article/details/16105073
INRIA Person数据库下载: 【相关说明
【直接下载地址(970M)】ftp://ftp.inrialpes.fr/pub/lear/douze/data/INRIAPerson.tar

开始前的准备工作

开始前建立文件夹用于存储正负样本和HardExample,正样本图片直接复制INRIA中的正样本图片,负样本图片通过裁剪得到。

$ mkdir -p dataset/pos dataset/neg dataset/HardExample
$ cp INRIAPerson/96X160H96/Train/pos/* dataset/pos/

编译出可执行文件

$ cmake .
$ make

也可以在命令行使用g++编译出可执行文件,例如

$ g++ -o CropImage crop_image.cpp $(pkg-config opencv --cflags --libs)
$ g++ -o SvmTrainUseHog main.cpp $(pkg-config opencv --cflags --libs)
$ g++ -o GetHardExample find_save_HardExample.cpp $(pkg-config opencv --cflags --libs)
$ g++ -o ImageDetect image_detect.cpp $(pkg-config opencv --cflags --libs)
$ g++ -o VideoDetect video_detect.cpp $(pkg-config opencv --cflags --libs)
$ g++ -o PeopleDetect peopledetect.cpp $(pkg-config opencv --cflags --libs)

第一步,裁剪出负样本图片

INRIA中有1218张负样本图片,CropImage从每一张图片中随机裁剪出10张大小为64x128的图片,最终总共会得到12180张图片,存储在dataset/neg文件夹中。上面已经编译出了可执行文件,直接通过CropImage裁剪出负样本图片。

$ ./CropImage

第二步,使用正负样本进行训练

先修改 dataset.h 里面参数,将 TRAINfalse 改为 true , 以进行训练,参数修改后需通过 make 重新编译可执行文件,然后通过 SvmTrainUseHog 开始训练。

$ make
$ ./SvmTrainUseHog

到这里已经得到了 SVM_HOG.xml 可以用来进行检测,但是检测效果不太好,所以下面加入 HardExample 来进行进一步训练。

第三步,得到HardExample

通过 GetHardExample 从 INRIA 原始的负样本图片中检测出 HardExample ,图片会保存到 dataset/HardExample

$ ./GetHardExample

第四步,将正负样本和HardExample一起重新进行训练

将 HardExample 图片列表写入文件 HardExample_FromINRIA_NegList.txt , 修改 dataset.h 里面的参数,将 HardExampleNO0 改为第三步中得到的图片数目,修改后通过 make 重新编译可执行文件,最后通过 SvmTrainUseHog 重新训练。

$ ls dataset/HardExample/ >HardExample_FromINRIA_NegList.txt
$ make
$ ./SvmTrainUseHog

至此训练完成。

检测示例图片:
检测示例图片

其它说明

  • SVM_HOG.xml为最终训练好的SVM分类器
  • ImageDetect可对图片进行检测
  • VideoDetect可对视频进行检测
  • PeopleDetect为OpenCV默认参数的行人检测程序

More

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].