Scenes/Objects Rocognition toolbox v0.12
---------------------------------------
This toolbox provides some basic tools for scenes/object recognition in vision systems.
Based on supervised classification, this toolbox offerts some state-of-art descriptors coupled with fast and efficient classifiers.
Descriptors are divided in two famillies:
i) "direct" features computed from images [1,2,3,4,5,19],
ii) "dictionnary learning + spatial pooling" features computed from a collection of patches:
a) Bag of Features [6,7] and
b) Sparse Dictionary learning [8,9].
Large-Scale Linear SVM such Liblinear [10] or Pagasos [11] are used to train models since features are almost perfectly linearly separable.
Non-linear Kernels extension for additive homogeneous kernels (chi2, intersection histogram, etc...) is performed through features map method [12,22].
The main objective of this toolbox is to deliver simple but efficient tools, easy to modify, mainly written in C codes with a matlab interface.
Installation
------------
This toolbox has been tested on Windows system (32 & 64 bits) and should work also on Linux plateform without any problem (not fully tested).
This toolbox use 4 third-party API freely available : SPAMS [13], FFTW[14], YAEL [15] and pthreads32[16] (for windows systems)
1) Please run "setup_reco_toolbox.m" from matlab command. It will download the 15-scene dataset [17] and compile mex-files
(except for the SPAMS functions mexLasso, mexTrainDL, mexTrainDL_Memory where the sources code are not (yet) available, only binaries can be found in [13]).
2) Compilation
a) For Windows system, if you encounter some difficulties, please unzip in core folder mexw32.zip or mexw64.zip for win32/64 respectively.
b) For Linux system, i) please recompile last build of FFTW statically, renamed it libfftw_glnx32.a/libfftw_glnx64.a and copy in core folder,
ii) visit [13], download binaries associated to your system and untar mexLasso, mexTrainDL, mexTrainDL_Memory mex-files in core folder.
c) For Mac system especially for mac64+I7, please recompile statically fftw as
1) ./configure CC="gcc -arch x86_64" CXX="g++ -arch x86_64"
2) ./make
3) rename xxx.a lib as libfftw_glnx64.a and copy in core folder
3) Add recotool directory in the matlab path
How to use ?
------------
The first step is to extract advanced features from a image dataset before training models. By default, the 15-scenes dataset is downloaded
during the setup and selected (choice_database = 1) in the 3 main matlab files : extract_bag_of_features.m, extract_direct_features.m and simple_train.m
For all descriptors (direct or dictionary learning+spatial pooling approaches), a common spatial pyramid definition is used to create a L=nspyr level spatial pyramid.
For a particular level of the pyramid, each subwindow size is defined by ratio of input image I size (ny x nx). The other parameters control the overlapping.
The pyramyd is defined as below:
spyr Spatial Pyramid (nspyr x 4) (default [1 , 1 , 1 , 1] with nspyr = 1)
where spyr(i,1) is the ratio of ny in y axis of the blocks at level i (by(i) = spyr(i,1)*ny)
where spyr(i,2) is the ratio of ny in y axis of the shifting at level i (deltay(i) = spyr(i,2)*ny)
where spyr(i,3) is the ratio of nx in x axis of the blocks at level i (bx(i) = spyr(i,3)*nx)
where spyr(i,3) is the ratio of nx in x axis of the shifting at level i (deltax(i) = spyr(i,4)*nx)
The total number of sub-windows for all levels of the pyramid is computed by the following formula:
nS = sum(floor(((1 - spyr(:,1))./(spyr(:,3)) + 1)).*floor((1 - spyr(:,2))./(spyr(:,4)) + 1))
For example if spyr = [1 , 1 , 1 , 1 ; 1/2 , 1/2 , 1/2 , 1/2 ; 1/4 , 1/4 , 1/4 , 1/4],
then spyr is the classic 3 levels pyramid with 21=(1 + 4 + 16) non-overlapping sub-windows used in a lot of papers.
i) If you plan to extract direct features, please edit extract_direct_features.m and xxxx_config_descriptors.m. With the first file, select descriptors with
choice_descriptors variable (which can be vector for extracting simultaneously several descriptors at the same time, eg. choice_descriptors = [3,4]).
With the second file, please change descriptors parameters in the "direct descriptor" section.
ii) If you plan to extract "unsupervised trained features", please edit extract_bag_of_features.m and xxxx_config_descriptors.m.
With the first file, a) select descriptors with choice_descriptors variable (can be vector for extracting simultaneously several descriptors at the same time, eg. choice_descriptors = [3,4]).
b) Select the encoder (unsupervised training algorithm) with the variable choice_encoding (can be vector for training simultaneously several dictionary at the same time, eg. choice_encoding = [1,2]).
Please open xxxx_config_encoding.m for changing encoder parameters.
c) Finally select the way to project descriptors with the choice_feature variable. Open xxxx_config_features.m for changing parameters especially fpr the spatial pyramid pooling definition.
With the second file, please change descriptors parameters in the "Local Patches DESCRIPTORS" section.
iii) Finally edit simple_train.m. In this file you can compare several combinaisons of descriptors and classifiers with choice_descriptors and choice_classifier variables respectively.
Training is performed by K-cross validation with 1-vs-all approach.
In the config_databases.m, you can select number of training/testing examples per class.
Tips
----
i) For unsupervised trained features, during the spatial pooling, normalization must be done for all windows of each pyramid level with the L2-norm
(eg. set the variable norm = [x 2 x] in the scenes15_config_features.m)
ii) For additive homogeneous kernels approximation (chi2, intersection histogram) with feature map method [12,22], please change the "n" parameter with n>0.
Il will increase the vector dimension by a factor (2n+1).
As mentionned in [22], in order to obtain best results, please normalize full vector with the L1 norm (eg. set the variable norm = [1 x x]).
How to use with a new dataset?
-------------------------------
i) You must extract the new dataset says "xxxx" in its own "xxxx" subdirectory of the 'image' folder.
Images of each label must be located in seperated folders.
ii) Copy/rename the scenes15_config_classifier.m, scenes15_config_descriptors.m, scenes15_config_encoding.m and scenes15_config_features.m by
xxxx_config_classifier.m, xxxx_config_descriptors.m, xxxx_config_encoding.m and xxxx_config_features.m
iii) Add the new string "xxxx" in the database_name variable (and the associated file extension variable database_ext) for the 3 files:
extract_bag_of_features.m, extract_direct_features.m and simple_train.m
Important : please open *.c files to read full descriptions of each function, how to use them in Matlab, specific examples and references.
----------
P.S1 For win64 system, when yeal is linked with pthreads statically, a crash occurs if nt>1. If you want to use nt>1, link yeal dynamically by building
---- pthread32 with the following msvc command line : "nmake clean VC" (see yeal_kmeans.c for more instructions)
P.S2 At least 4Gb of RAM is recommended
----
Demos
-----
demo_denseCOLOR
demo_denseMBLBP
demo_denseMBLDP
demo_densePATCH
demo_denseSIFT
demo_mlhmslbp_spyr
demo_mlhmsldp_spyr
demo_mlhmslsd_spyr
demo_mlhoee_spyr
demo_homker
Organization
------------
\
config_classifier Config file of classifiers'parameters
config_descriptors Config file of descriptors'parameters (direct & patches)
config_encoding
没有合适的资源?快使用搜索试试~ 我知道了~
LSD直线检测,matlab工具箱
共186个文件
png:59个
c:41个
m:38个
4星 · 超过85%的资源 需积分: 35 202 下载量 118 浏览量
2015-12-19
20:48:59
上传
评论 9
收藏 19.28MB ZIP 举报
温馨提示
LSD直线检测工具箱,可以通过配置,直接调用,详细的配置信息参见reco_toolbox目录下的read me.txt
资源推荐
资源详情
资源评论
收起资源包目录
LSD直线检测,matlab工具箱 (186个子文件)
mexopts_intel11_64.bat 3KB
mexopts_intel10.bat 3KB
mlhmslsd_spyr.c 64KB
mlhmslbp_spyr.c 55KB
denseMBLBP.c 44KB
mlhmsldp_spyr.c 39KB
denseSIFT.c 38KB
mlhoee_spyr.c 35KB
denseMBLDP.c 33KB
vector.c 28KB
denseCOLOR.c 26KB
densePATCH.c 24KB
mlhlcc_spyr.c 24KB
mlhbow_spyr.c 21KB
sorting.c 19KB
nn.c 16KB
homker_pegasos_train.c 15KB
homker_predict.c 13KB
train_dense.c 12KB
svmtrain.c 10KB
pegasos_train.c 10KB
kmeans.c 9KB
homkermap.c 9KB
yael_kmeans.c 9KB
sigmoid_train.c 9KB
svmpredict.c 8KB
machinedeps.c 8KB
predict_dense.c 8KB
predict.c 8KB
svm_model_matlab.c 7KB
encoder.c 7KB
ber_classif.c 7KB
perf_classif.c 7KB
vlad.c 6KB
binheap.c 4KB
imresize.c 4KB
linear_model_matlab.c 3KB
pwlsgd_predict.c 3KB
rgb2gray.c 3KB
dnrm2.c 1KB
ddot.c 1KB
daxpy.c 1KB
dscal.c 1KB
svm.cpp 63KB
linear.cpp 45KB
fiksvm.cpp 17KB
tron.cpp 7KB
fiksvm_predict.cpp 4KB
precomp_model.cpp 3KB
Thumbs.db 218KB
project.h 67KB
pthread.h 41KB
pthread_win.h 41KB
blasp.h 16KB
fftw3.h 14KB
vector.h 14KB
nn.h 7KB
sorting.h 6KB
sched_win.h 4KB
sched.h 3KB
svm.h 3KB
binheap.h 3KB
kmeans.h 2KB
machinedeps.h 2KB
linear.h 2KB
fiksvm.h 2KB
timeval.h 1KB
blas.h 702B
tron.h 687B
vlad.h 574B
svm_model_matlab.h 260B
linear_model_matlab.h 166B
demo_denseSIFT.html 25KB
demo_mlhmsldp_spyr.html 24KB
demo_mlhmslbp_spyr.html 23KB
demo_mlhmslsd_spyr.html 22KB
demo_denseCOLOR.html 17KB
demo_mlhoee_spyr.html 17KB
demo_denseMBLDP.html 16KB
demo_denseMBLBP.html 16KB
demo_densePATCH.html 12KB
simple_train.m 24KB
extract_bag_of_features.m 14KB
tick2text.m 14KB
mexme_reco.m 11KB
scenes15_config_descriptors.m 11KB
demo_denseSIFT.m 9KB
demo_mlhmsldp_spyr.m 9KB
demo_mlhmslbp_spyr.m 9KB
scenes15_config_classifier.m 8KB
demo_mlhmslsd_spyr.m 8KB
dl_spyr.m 8KB
demo_denseCOLOR.m 6KB
demo_mlhoee_spyr.m 6KB
scenes15_config_features.m 6KB
demo_denseMBLDP.m 6KB
demo_denseMBLBP.m 5KB
mexTrainDL.m 5KB
sp_find_sift_grid.m 4KB
sp_dense_sift.m 4KB
共 186 条
- 1
- 2
sooAnderson
- 粉丝: 224
- 资源: 58
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页