Welcome to the Exemplar-SVM library, a large-scale object recognition
library developed at Carnegie Mellon University while obtaining my PhD
in Robotics.
-- Tomasz Malisiewicz
The code is written in Matlab and is the basis of the following two
projects, as well as my doctoral dissertation:
## [Tomasz Malisiewicz](http://www.cs.cmu.edu/~tmalisie/), [Abhinav Gupta](http://www.cs.cmu.edu/~abhinavg), [Alexei A. Efros](http://www.cs.cmu.edu/~efros). **Ensemble of Exemplar-SVMs for Object Detection and Beyond.** In ICCV, 2011. [PDF](http://www.cs.cmu.edu/~tmalisie/projects/iccv11/exemplarsvm-iccv11.pdf) | [Project Page](http://www.cs.cmu.edu/~tmalisie/projects/iccv11/)
![](https://github.com/quantombone/exemplarsvm/raw/master/images/exemplar_classifiers-small_n.png)
Abstract
This paper proposes a conceptually simple but surprisingly powerful method which combines the effectiveness of a discriminative object detector with the explicit correspondence offered by a nearest-neighbor approach. The method is based on training a separate linear SVM classifier for every exemplar in the training set. Each of these Exemplar-SVMs is thus defined by a single positive instance and millions of negatives. While each detector is quite specific to its exemplar, we empirically observe that an ensemble of such Exemplar-SVMs offers surprisingly good generalization. Our performance on the PASCAL VOC detection task is on par with the much more complex latent part-based model of Felzenszwalb et al., at only a modest computational cost increase. But the central benefit of our approach is that it creates an explicit association between each detection and a single training exemplar. Because most detections show good alignment to their associated exemplar, it is possible to transfer any available exemplar meta-data (segmentation, geometric structure, 3D model, etc.) directly onto the detections, which can then be used as part of overall scene understanding.
---
## [Abhinav Shrivastava](http://www.abhinav-shrivastava.info/), [Tomasz Malisiewicz](http://www.cs.cmu.edu/~tmalisie/), [Abhinav Gupta](http://www.cs.cmu.edu/~abhinavg), [Alexei A. Efros](http://www.cs.cmu.edu/~efros). **Data-driven Visual Similarity for Cross-domain Image Matching.** In SIGGRAPH ASIA, December 2011. [PDF](http://www.cs.cmu.edu/~tmalisie/projects/sa11/shrivastava-sa11.pdf) | [Project Page](http://graphics.cs.cmu.edu/projects/crossDomainMatching/)
![](https://github.com/quantombone/exemplarsvm/raw/master/images/sa_teaser.png)
Abstract
The goal of this work is to find visually similar images even if they
appear quite different at the raw pixel level. This task is
particularly important for matching images across visual domains, such
as photos taken over different seasons or lighting conditions,
paintings, hand-drawn sketches, etc. We propose a surprisingly simple
method that estimates the relative importance of different features in
a query image based on the notion of "data-driven uniqueness". We
employ standard tools from discriminative object detection in a novel
way, yielding a generic approach that does not depend on a particular
image representation or a specific visual domain. Our approach shows
good performance on a number of difficult cross-domain visual tasks
e.g., matching paintings or sketches to real photographs. The method
also allows us to demonstrate novel applications such as Internet
re-photography, and painting2gps.
---
More details and experimental evaluation can be found in my PhD thesis, available to download as a PDF.
[Tomasz Malisiewicz](http://www.cs.cmu.edu/~tmalisie/). **Exemplar-based Representations for Object Detection, Association and Beyond.** PhD Dissertation, tech. report CMU-RI-TR-11-32. August, 2011. [PDF](http://www.cs.cmu.edu/~tmalisie/thesis/malisiewicz_thesis.pdf)
----
This object recognition library uses some great open-source software:
* Linear SVM training: [libsvm-3.0-1](http://www.csie.ntu.edu.tw/~cjlin/libsvm/)
* Fast blas convolution code (from [voc-release-4.0](http://www.cs.brown.edu/~pff/latent/)),
* HOG feature code (31-D) (from [voc-release-3.1](http://www.cs.brown.edu/~pff/latent/)),
* [VOC development/evaluation code](http://pascallin.ecs.soton.ac.uk/challenges/VOC/) imported from the PASCAL VOC website
----
# MATLAB Quick Start Guide
To get started, you need to install MATLAB and download the code from Github. This code has been tested on Mac OS X and Linux. Pre-compiled Mex files for Mac OS X and Linux are included.
## Download Exemplar-SVM Library source code (MATLAB and C++) and compile it
``` sh
$ cd ~/projects/
$ git clone git://github.com/quantombone/exemplarsvm.git
$ cd ~/projects/exemplarsvm
$ matlab
>> esvm_compile
```
## Download and load pre-trained VOC2007 model(s)
``` sh
$ matlab
>> addpath(genpath(pwd))
>> [models, M, test_set] = esvm_download_models('voc2007-bus');
```
or
``` sh
$ wget http://people.csail.mit.edu/~tomasz/exemplarsvm/models/voc2007-models.tar
$ tar -xf voc2007-models.tar
$ matlab
>> load voc2007_bus.mat
>> [models, M, test_set] = esvm_download_models('voc2007-bus.mat');
```
You can alternatively download the pre-trained models individually from [http://people.csail.mit.edu/tomasz/exemplarsvm/models/](http://people.csail.mit.edu/tomasz/exemplarsvm/models/) or a tar file of all models [voc2007-models.tar](http://people.csail.mit.edu/tomasz/exemplarsvm/models/voc2007-models.tar) (NOTE: tar file is 450MB)
## Demo: Example of applying models to a single image or a set of images
See the demo walk-through [tutorial/esvm_demo_apply.html](http://people.csail.mit.edu/tomasz/exemplarsvm/tutorial/esvm_demo_apply.html) for a step-by-step tutorial on applying Exemplar-SVMs to images.
Or you can just run the demo:
``` sh
>> esvm_demo_apply;
```
# Training an Ensemble of Exemplar-SVMs
## Toy Demo: Exemplar-SVM training and testing on a set of synthetic images
See the synthetic training demo walk-through [tutorial/esvm_demo_train_synthetic.html](http://people.csail.mit.edu/tomasz/exemplarsvm/tutorial/esvm_demo_train_synthetic.html) for a step-by-step tutorial on how to set-up images and bounding boxes for a training experiment.
Or you can run the synthetic training demo:
``` sh
>> esvm_demo_train_synthetic;
```
The training scripts are designed to work with the PASCAL VOC 2007
dataset, so we need to download that first.
## Prerequsite: Install PASCAL VOC 2007 trainval/test sets
``` sh
$ mkdir /nfs/baikal/tmalisie/pascal #Make a directory for the PASCAL VOC data
$ cd /nfs/baikal/tmalisie/pascal
$ wget http://pascallin.ecs.soton.ac.uk/challenges/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
$ wget http://pascallin.ecs.soton.ac.uk/challenges/VOC/voc2007/VOCtest_06-Nov-2007.tar
$ tar xf VOCtest_06-Nov-2007.tar
$ tar xf VOCtrainval_06-Nov-2007.tar
```
You can also get the VOC 2007 dataset tar files manually, [VOCtrainval_06-Nov-2007.tar](http://pascallin.ecs.soton.ac.uk/challenges/VOC/voc2007/VOCtrainval_06-Nov-2007.tar) and [VOCtest_06-Nov-2007.tar](http://pascallin.ecs.soton.ac.uk/challenges/VOC/voc2007/VOCtest_06-Nov-2007.tar)
## Demo: Training and Evaluating an Ensemble of "bus" Exemplar-SVMs quick-demo
``` sh
>> data_dir = '/your/directory/to/pascal/VOCdevkit/';
>> dataset = 'VOC2007';
>> results_dir = '/your/results/directory/';
>> [models,M] = esvm_demo_train_voc_class_fast('car', data_dir, dataset, results_dir);
# All output (models, M-matrix, AP curve) has been written to results_dir
```
See the file [tutorial/esvm_demo_train_voc_class_fast.html](http://people.csail.mit.edu/tomasz/exemplarsvm/tutorial/esvm_demo_train_voc_class_fast.html) for a step-by-step tutorial on what esvm_demo_train_voc_class_fast.m produces
## Script: Training and Evaluating an Ensemble of "bus" Exemplar-SVMs full script
``` sh
>> data_dir = '/your/directory/to/pascal/VOCdevkit/';
>> dataset = 'VOC2007';
>> results_dir = '/your/results/directory/';
>> [models,M] = esvm_script_train_voc_class('bus', data_dir, dataset, res
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
提出了基于SVM一种概念上简单但令人惊讶的强大方法,该方法将判别目标检测器的有效性与最近邻居方法提供的显式对应相结合。该方法基于为训练集中的每个示例训练单独的线性SVM分类器。因此,这些示例SVM中的每一个都由一个正实例和数百万个负定义。尽管每个检测器对其示例都非常特定,但我们从经验上观察到,这样的示例-SVM的集成提供了令人惊讶的良好通用性。我们在PASCAL VOC检测任务上的性能与Felzenszwalb等人的基于复杂潜在零件的模型相比要复杂得多,只增加了适度的计算成本。但是我们方法的主要好处是,它在每次检测与单个训练样本之间建立了明确的关联。由于大多数检测都显示出与其相关样本的良好对齐,因此可以将任何可用的样本元数据(细分,几何结构,3D模型等)直接传输到检测上,然后可以将其用作整体场景理解的一部分。
资源推荐
资源详情
资源评论
收起资源包目录
线性SVM分类器 实现信号/图片分类 (193个子文件)
libsvmtrain.c 11KB
libsvmpredict.c 9KB
svm_model_matlab.c 8KB
libsvmread.c 4KB
libsvmwrite.c 2KB
features_pedro.cc 6KB
features_raw.cc 5KB
fconvblas.cc 5KB
resize.cc 3KB
COPYING 1KB
COPYRIGHT 1KB
svm.cpp 61KB
psort.cpp 3KB
.gitignore 29B
.gitignore 9B
svm.h 3KB
svm_model_matlab.h 201B
009021.jpg 115KB
000858.jpg 98KB
009704.jpg 78KB
esvm_detect.m 12KB
esvm_show_transfer_figure.m 10KB
show_top_transfers.m 10KB
esvm_mine_negatives.m 9KB
esvm_perform_platt_calibration.m 8KB
esvm_get_default_params.m 7KB
esvm_exemplar_inpaint.m 7KB
esvm_show_top_dets.m 7KB
esvm_train_exemplars.m 6KB
esvm_initialize_fixedframe_exemplar.m 6KB
evaluate_pascal_voc_grid_complements.m 6KB
esvm_pool_exemplar_dets.m 5KB
esvm_detect_imageset.m 5KB
esvm_initialize_goalsize_exemplar.m 5KB
esvm_estimate_M.m 5KB
esvm_show_det_stack.m 5KB
esvm_demo_train_synthetic.m 5KB
esvm_initialize_exemplars.m 5KB
esvm_load_models.m 5KB
esvm_show_associations_figure.m 5KB
esvm_evaluate_pascal_voc.m 5KB
esvm_get_pascal_stream.m 5KB
esvm_update_svm.m 5KB
esvm_demo_train_voc_class_fast.m 5KB
VOCevaldet.m 4KB
esvm_script_train_voc_class.m 4KB
label_buses.m 4KB
esvm_initialize_exemplars_dt.m 4KB
esvm_load_result_grid.m 4KB
esvm_mine_train_iteration.m 4KB
cook_abhinav_transfers.m 4KB
esvm_update_dfun.m 4KB
VOCevallayout_pr.m 4KB
esvm_get_model_wiggles.m 4KB
create_segmentations_from_detections.m 3KB
esvm_get_exemplar_icon.m 3KB
VOCevalseg.m 3KB
PASreadrectxt.m 3KB
test_all_complements.m 3KB
VOCevaldet2.m 3KB
geom_eval.m 3KB
VOCinit.m 3KB
esvm_get_pascal_set.m 2KB
esvm_get_geometry_icon.m 2KB
esvm_pyramid.m 2KB
plot_bbox.m 2KB
esvm_show_exemplar_frames.m 2KB
esvm_generate_dataset.m 2KB
esvm_reconstruct_features.m 2KB
VOCreadrecxml.m 2KB
esvm_demo_apply.m 2KB
tight_subplot.m 2KB
esvm_apply_and_show_exemplars.m 2KB
VOCxml2struct.m 2KB
capture_screen.m 2KB
list_files_in_directory.m 2KB
do_pedro_transfer.m 2KB
esvm_learn_sigmoid.m 2KB
swarp.m 2KB
esvm_get_voc_dataset.m 2KB
esvm_compile.m 2KB
esvm_load_gt_function.m 2KB
esvm_get_M_features.m 2KB
get_movie_bg.m 2KB
count_correct_person.m 2KB
transfer_friends.m 2KB
complem_experiment.m 1KB
convert_to_I.m 1KB
esvm_strip_models.m 1KB
esvm_get_seg_icon.m 1KB
esvm_prune_grid.m 1KB
VOCevalaction.m 1KB
esvm_nms.m 1KB
esvm_adjust_boxes.m 1KB
apply_xform.m 1KB
generate_figures.m 1KB
VOCevalcls.m 1KB
VOCwritexml.m 1KB
getosmatrix_bb.m 1KB
distSqr_fast.m 1KB
共 193 条
- 1
- 2
资源评论
- qq_224735812020-10-13没有信号分类
weixin_41678506
- 粉丝: 4
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功