Skip to content

Latest commit

 

History

History
64 lines (47 loc) · 2.05 KB

README.md

File metadata and controls

64 lines (47 loc) · 2.05 KB

Object detection in torch

Implementation of some object detection frameworks in torch.

Note on new code

You should probably check the refactoring branch of this repository, which simplifies the code structure, and also contains an implementation of Fast-RCNN and threaded RCNN (making it much faster than standard RCNN). It will be merged to master soon.

Dependencies

It requires the following packages

To install them all, do

## xml
luarocks install xml

## matio
# OSX
brew install libmatio
# Ubuntu
sudo apt-get install libmatio2

luarocks install matio

To install hdf5, follow the instructions in here

Running this code

First, clone this repo

git clone https://github.com/fmassa/object-detection.torch.git

The zeiler pretrained model is available at https://drive.google.com/open?id=0B-TTdm1WNtybdzdMUHhLc05PSE0&authuser=0. It is supposed to be at data/models. If you want to use your own model in SPP framework, make sure that it follows the pattern

model = nn.Sequential()
model:add(features)
model:add(pooling_layer)
model:add(classifier)

where features can be a nn.Sequential of several convolutions and pooling_layer is the last pooling with reshaping of the data to feed it to the classifer. See models/zeiler.lua for an example.

To finetune the network for detection, simply run

th main.lua

To get an overview of the different parameters, do

th main.lua -h

The default is to consider that the dataset is present in datasets/VOCdevkit/VOC2007/. The default location of bounding boxes .mat files (in RCNN format) is supposed to be in data/selective_search_data/.