Skip to content

Commit 35399a4

Browse files
committed
changed conversion code from mat files to txt files. updated README
1 parent a7c3cfa commit 35399a4

File tree

5 files changed

+52
-1
lines changed

5 files changed

+52
-1
lines changed

README.html

+33
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,39 @@ <h3 id="sec-6-5"><span class="section-number-3">6.5</span> Performance character
420420

421421
<p> Read the Tech-Report for more details on how the performance
422422
compares to the MATLAB testing pipeline.
423+
</p>
424+
</div>
425+
426+
</div>
427+
428+
<div id="outline-container-6-6" class="outline-3">
429+
<h3 id="sec-6-6"><span class="section-number-3">6.6</span> Getting more Exemplars</h3>
430+
<div class="outline-text-3" id="text-6-6">
431+
432+
<p> Supposing you have an Exemplar-SVM trained in a <code>.mat</code> file.
433+
Follow these steps
434+
</p><ul>
435+
<li>place the <code>.mat</code> files in the directory
436+
<code>sample-data/exemplars/exemplar-mat-files/</code>.
437+
</li>
438+
<li>run the MATLAB script at <code>matlab-files/convert_mat_txt.m</code>.
439+
</li>
440+
<li>you should now have the updated descriptor file
441+
<code>sample-data/exemplars/exemplar-txt-files-list</code>. Additionally
442+
there will be files corresponding to the models in the directory
443+
<code>sample-data/exemplars/</code>. All the models should be present as
444+
<code>txt</code> files in <code>sample-data/exemplars/exemplar-txt-files/</code>. Read
445+
Section <a href="#sec-6-1">Input format for Exemplars</a> to know what these files mean.
446+
</li>
447+
<li>Now you can place your code in the <code>demos</code> directory. Refer to
448+
<code>demo03.cpp</code> for a quick way to get started.
449+
</li>
450+
</ul>
451+
452+
453+
<p>
454+
Tomasz has a collection of trained exemplars on his <a href="http://people.csail.mit.edu/tomasz/exemplarsvm/models/">webpage</a>. These
455+
might be a quick way to get started.
423456
</p></div>
424457
</div>
425458

README.org

+18
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,24 @@ Project Page: https://github.com/imisra/esvmTestCPP
173173
** Performance characteristics
174174
Read the Tech-Report for more details on how the performance
175175
compares to the MATLAB testing pipeline.
176+
177+
** Getting more Exemplars
178+
Supposing you have an Exemplar-SVM trained in a =.mat= file.
179+
Follow these steps
180+
- place the =.mat= files in the directory
181+
=sample-data/exemplars/exemplar-mat-files/=.
182+
- run the MATLAB script at =matlab-files/convert_mat_txt.m=.
183+
- you should now have the updated descriptor file
184+
=sample-data/exemplars/exemplar-txt-files-list=. Additionally
185+
there will be files corresponding to the models in the directory
186+
=sample-data/exemplars/=. All the models should be present as
187+
=txt= files in =sample-data/exemplars/exemplar-txt-files/=. Read
188+
Section [[Input format for Exemplars]] to know what these files mean.
189+
- Now you can place your code in the =demos= directory. Refer to
190+
=demo03.cpp= for a quick way to get started.
191+
192+
Tomasz has a collection of trained exemplars on his [[http://people.csail.mit.edu/tomasz/exemplarsvm/models/][webpage]]. These
193+
might be a quick way to get started.
176194
* FAQs
177195
** The detection demos aren't even close to perfect
178196
Yes. It is just a demo. You will need to adjust the thresholds

matlab-files/convert_mat_txt.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
fname = files(i).name;
2121
baseName = strrep(fname,'.mat','');
2222
inpName = strcat(inpDir,fname);
23-
models = loadSingleVariableMAT(inpName);
23+
load(inpName);
2424
numWs = size(models,2);
2525
fprintf('Processing %s\n',inpName);
2626

Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)