Download the OLT and the LabelMe Matlab toolbox and follow their respective installation instructions.
Download the scripts to interface between LabelMe and the OLT here.
I have created the following scripts that call functions in the LabelMe toolbox. Click here to download them. Unzip them and add the path to its directory to your Matlab path:
>> LABELMEDOWNLOADERPATH=fullfile(<downloadPath>, 'LMOLTInterfacer', 'LabelMeDownloader')
where <downloadPath> is the folder to where you unzipped the package.
In Matlab, run downloadObject.m to start downloading the LabelMe images to your local machine. You will have to edit some of the variables in this file to adapt the script to your machine:
car_full contains images labeled with cars, car_cropped contains crops of the cars in the images in car_full; finally, car_neg contains images that haven't been labeled as containing cars.
Go to the OLTRunner folder in a unix console. Add the OLTRunner subfolder in your $PATH variable.
>> export PATH=$PATH:<downloadPath>/LMOLTInterfacer/OLTRunner
Create the lists with the positive and negative examples for the training. All the images in the positive examples have to have the same size. The images created in the _cropped folder have been resized to fullfill this requirement.
> cd car/train; ls car_cropped/*.jpg> pos.lst
> cd car/train; ls car_neg/*.jpg> neg.lst
In the LabelMeImages folder, run: >createobjectdetector.sh [object dir] [out model folder] [width] [height]
> createobjectdetector.sh car/train car_hog 87 55
Run the classifier on images in the test data set.
> runonimage.sh [image name/image directory/list file] [out text file] [out image file/out image dir] [model path] [width] [height] [thresh]
> runonimage.sh car/test/car_full_test.lst car_out.txt car/test/car_full_test car_hog 87 55 12
The [image name/image directory/list file] is the image name, directory, or list file of the test image(s). [out text file] is the file name that will contain results from the classification, [model path] should be one of the _hog folders created in the previous steps containing the model. The [width] and [height] values are the same ones as in the previous command and finally the threshold can be adjusted to increase the precision.