• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

jmrf/HOG-Pedestrian-Detector: MATLAB implementation of a basic HOG + SVM pedestr ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

jmrf/HOG-Pedestrian-Detector

开源软件地址(OpenSource Url):

https://github.com/jmrf/HOG-Pedestrian-Detector

开源编程语言(OpenSource Language):

MATLAB 77.8%

开源软件介绍(OpenSource Introduction):

HOG-Pedestrian-Detector

CRAN FOSSA Status stars forks

This repository contains the code for a MATLAB implementation of a basic HOG + SVM pedestrian detector form my Computer Science Master thesis

Disclaimer

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.

Requirements

  • MATLAB >= R2017b
  • libsvm >= 3.22

Installation

Please refer to MATLAB and libsvm documentation to install.

Data

Run

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.

Setting the environment

  1. Add the libs directory and all sub-directories to MATLABs path. Either through the command window or through the GUI.

  2. 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:

Train

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"]);

Eval

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>...

PCA versions of train / test

[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"]);

Known issues & contributions

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.

License

FOSSA Status




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap