This repository contains the code for a MATLAB implementation of a basic HOG + SVM pedestrian detector form my Computer Science Master thesis
If you are going to use this code, please read the LICENCE
and keep in mind that I PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND
.
I partially adapted this code-base to newer versions of MATLAB but is very likely you find discrepancies in how some MATLAB functions work.I am in general happy to help understanding the project if you ask nicely but since the implementation of the project is now several years old and MATLAB has evolved, some functions might behave differently and I won't be updating the project continuously nor answering about how to update the code to newer MATLAB versions.
Please refer to MATLAB and libsvm documentation to install.
The project was developed on a Windows machine and now being resurrected on a Linux one, so you should be good in any platform as long as you can run MATLAB.
Add the libs
directory and all sub-directories to MATLABs path.Either through the command window or through the GUI.
Make sure libsvm
is visible to MATLAB. If you are not sure if your installation of libsvm
went alright, you can check with:
which -all svmtrain
Which should show something like:
~/HOG-Pedestrian-Detector/libs/libsvm-3.22/matlab/svmtrain.mexa64
/usr/local/MATLAB/R2017b/toolbox/stats/stats/svmtrain.m % Shadowed
There are several entry points to the project, but here the two main ones are shown:
Assuming there's a models
directory where trained models will be saved and that the positive and negative images can be found in dataset/Test/pos
and dataset/Test/neg
respectively.Train an SVM model named test
model = train_svm("test", ["./models", "dataset/Train/pos" "dataset/Train/neg"]);
To evaluate the just trained model:
test_svm(model.test, ["dataset/Test/pos" "dataset/Test/neg"]);
Note test_svm
expects model.<model-given-name-to-train-function>
...
[model, Ureduce] = train_svm_PCA("test_pca", ["./models", "dataset/Train/pos" "dataset/Train/neg"]);
test_svm_PCA(model.test_pca, Ureduce, ["dataset/Test/pos", "dataset/Test/neg"]);
Old MATLAB version used to concatenate strings by enclosing them between squared brackets but doesn't look like valid any longer. In that case you should use the strcat
function. For example when constructing paths, so:
path = ['folder', 'filename', '.extension'] % this is wrong!
path = strcat('folder', 'filename', '.extension') % this is right!
If you enjoyed this repository and find things that are not working any longer, you are very welcome to open a PR with fixes and I'll happily introduce them.
一、论文 CVPR 2012 与行人检测相关的论文 [1] Contextual Boost for Pedestrian Detection YuanyuanDing, Jing Xiao [2] Understanding Collective CrowdBehaviors:Learning Mixture Model of Dynamic Pedestrian-Agents Bolei
跑了An HOG-LBP Human Detector with Partial Occlusion Handling提供的代码,点击打开链接 又是linux的,sh是linux的shell脚本,在windows下跑perl要安装activeperl。在原程序中加入perl语句sleep(time),防止屏幕一闪而过。出现以下错误: error while loading shared libra
http://cs.nju.edu.cn/wujx/projects/C4/C4.htm Jianxin Wu实现的快速行人检测方法。 Real-Time Human Detection Using Contour Cues: http://c2inet.sce.ntu.edu.sg/Jianxin/paper/ICRA_final.pdf C4能够达到比现有人体检测算法更高的速度
1、HOG: HOG(Histogram of Oriented Gradient),即方向梯度直方图,是一种在计算机视觉和图像处理中用来进行物体检测的特征描述子。它通过计算和统计图像局部区域的梯度方向直方图来构成特征。其依据是所检测的局部物体外形能被光强梯度和边缘方向的分布所描述,本质就是梯度的统计信息,而梯度总是存在于图像的边缘(边缘是由图像中亮度变化明显的点组成的) 2、流程:
#include #include #include #include #include #include #include #include #include #include using namespace std; using namespace cv; //常量定义 char IMG_PATH_TEXT[]="E:/INRIAPerson/color/img_path.txt"; //
我试图理解python中使用HOG和SVM进行行人检测的代码,并用FPGA来加速。在 下面的代码工作精细复制自一个网站hog = cv2.HOGDescriptor() hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector()) def detector(image): rects, weights = hog.detectMu
行人检测(Pedestrian Detection)资源 原文链接 http://hi.baidu.com/susongzhi/item/085983081b006311eafe38e7 一、论文 CVPR2013年行人检测相关的文章 [1] Robust Multi-Resolution Pedestrian Detection in Traffic Scenes Junjie Y
在2005年CVPR上,来自法国的研究人员Navneet Dalal 和Bill Triggs提出利用Hog进行特征提取,利用线性SVM作为分类器,从而实现行人检测。而这两位也通过大量的测试发现,Hog+SVM是速度和效果综合平衡性能较好的一种行人检测方法。后来,虽然很多研究人员也提出了很多改进的行人检测算法,但基本都以该算法为基础框架。因此,Hog+SVM也成为一个里程表式的算法
有几种使用SIMD指令优化HOG描述符计算的尝试:OpenCV、Dlib和SIMD。它们都使用标量代码将结果幅值添加到HOG直方图中: 在那里,大小的值取决于实现,但一般意义相同。 我知道使用SIMD计算直方图的问题并没有简单有效的解决方案。但在这种情况下,我们有小尺寸(18)的直方图。它能帮助SIMD优化吗?
问题内容: 我已经阅读了有关如何使用OpenCV的基于HOG的行人检测器的文章: 如何使用OpenCV检测和跟踪人员? 我想使用HOG来检测图像中的其他类型的对象(不仅仅是行人)。但是, HOGDetectMultiScale 的Python绑定似乎无法提供对实际HOG功能的访问。 是否可以使用Python + OpenCV直接从任何图像中提取HOG功能? 问题答案: 如果您想要用于HOG功能的快
本文向大家介绍VisualStudio 使用Visual Leak Detector检查内存泄漏,包括了VisualStudio 使用Visual Leak Detector检查内存泄漏的使用技巧和注意事项,需要的朋友参考一下 那么在Windows下有什么好的内存泄漏检测工具呢?微软提供Visual Studio开发工具本身没有什么太好的内存泄漏检测功能,我们可以使用第三方工具Visual Lea
在使用apache Ignite2.6之后,我经常在JBoss的启动和停止上收到这样的警告。你能帮我知道是什么错误的配置会导致这些警告吗? 如果你需要更多的细节,请告诉我
水传感器砖专为水质检测而设计,可广泛用于感应降雨,水位,甚至液体泄漏。 将水传感器连接到Arduino是检测泄漏,溢出,洪水,雨水等的好方法。它可用于检测水的存在,水平,体积和/或缺水。 虽然这可以用来提醒你给植物浇水,但有一个更好的Grove传感器。 传感器有一系列暴露的痕迹,当检测到水时读数为低。 在本章中,我们将水传感器连接到Arduino上的数字引脚8,并将获得非常方便的LED,以帮助识别
一款超轻量级通用人脸检测模型(模型文件大小仅 1MB,320x240 输入下计算量仅 90MFlops),适用于边缘计算设备、移动端设备以及 PC。 Ultra-Light-Fast-Generic-Face-Detector-1MB 超轻量级通用人脸检测模型 该模型设计是针对边缘计算设备或低算力设备(如用 ARM 推理)设计的一款实时超轻量级通用人脸检测模型,旨在能在低算力设备中如用ARM进行实