DollarPedestrianDetectionCode: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
No edit summary
Line 34: Line 34:
==How to evaluate the results of your algorithm==
==How to evaluate the results of your algorithm==


You should repeat for all the images in a given set:
You should repeat, for all the images in a given set:
# read one image  
# read one image  
# run your classifier on it
# run your classifier on it
# write the annotations in your results directory, e.g. '''$code/data-INRIA/res/myDetectorI00000.txt'''
# write the annotations in your results directory, e.g. '''$code/data-INRIA/res/myDetector/set01/V000/I00000.txt'''
 
== Read one or more imags from a ".seq" file and write it to a regular file ==
== Read one or more imags from a ".seq" file and write it to a regular file ==
   Is = seqIo( 'data-INRIA/videos/set00/V000.seq', 'toImgs', '.',              1,                  0,              2,          'png' )
   Is = seqIo( 'data-INRIA/videos/set00/V000.seq', 'toImgs', '.',              1,                  0,              2,          'png' )
               input seq file                      command  dest directory    frames to skip      first frame  last frame    format
               input seq file                      command  dest directory    frames to skip      first frame  last frame    format

Revision as of 15:56, 22 September 2011

All the files (image data bases, annotations, detection results) should be put in some standard directories: $code/ is the directory where you unpack the matlab code.
You have to have one subdirectory for each db, for instance, you need one for INRIA: $code/data-INRIA/. The names are standard, they're defined in some matlab file.
Inside the particular db directory, you need to have:

  1. the video subdirectory, $code/data-INRIA/videos, containing more subdirectories and the ".seq" files with the images
  2. the annotations subdirectory, $code/data-INRIA/annotations, containing more subdirectories and the ground truth annotations
  3. the res subdirectory, $code/data-INRIA/res, containing more subdirectories with the results of the detections obtained running various algorithms

Annotations are in the format: (x0, y0, deltaX, deltaY, confidence). The confidence value is used to plot the ROC curves. There is one annotation file for each image. I don't know if the top-left corner is (0,0) or (1,1).

Operations you want to do

Set the db you're working on

[pth,setIds,vidIds,skip,minHt] = dbInfo( 'inriatest' )

Show db images with annotations

vbbPlayer

Compute the ROC curves for the specified algorithms, on the current db

dbEval

Display images with GT annotations, the detections of a specific algorithm and their evaluation (true positive, false positive, etc.)

dbBrowser

You should set some parameters in dbBrowser.m, such as which algorithm's results you want to plot and if there's some padding to be removed (line 3). Padding should be removed for INRIA dataset only, as far as I know.

 rPth=[pth '/res/HOG'];        % directory containing results
 thr=[];                       % detection threshold
 resize={100/128, 42/64, 0};   % controls resizing of detected bbs

This file writes plots in $code/results and data in $code/eval.


How to evaluate the results of your algorithm

You should repeat, for all the images in a given set:

  1. read one image
  2. run your classifier on it
  3. write the annotations in your results directory, e.g. $code/data-INRIA/res/myDetector/set01/V000/I00000.txt

Read one or more imags from a ".seq" file and write it to a regular file

 Is = seqIo( 'data-INRIA/videos/set00/V000.seq', 'toImgs', '.',              1,                  0,               2,          'png' )
              input seq file                      command  dest directory    frames to skip      first frame   last frame     format