Skip to content

Commit

Permalink
make cachedir setup same with a local override file
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgirshick committed Mar 14, 2014
1 parent 9a4ac2d commit 041b901
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ data/caffe_nets
data/rcnn_models
data/selective_search_data
data/window_files
rcnn_config_local.m
cachedir/*
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ Let's use PASCAL VOC 2007 as an example. The basic pipeline is:

You'll need about 200GB of disk space free for the feature cache (which is stored in `rcnn/feat_cache` by default; symlink `rcnn/feat_cache` elsewhere if needed). **It's best if the feature cache is on a fast, local disk.** Before running the pipeline, we first need to install the PASCAL VOC 2007 dataset.

#### Model cache directory

The training and testing procedures save models and results under `rcnn/cachedir` by default. I make `rcnn/cachedir` a symlink to where I want this data stored.

From inside the `rcnn` directory: `$ ln -sf /path/to/your/cache/directory cachedir`.

#### Installing PASCAL VOC 2007

1. Download the training and validation data [here](http://pascallin.ecs.soton.ac.uk/challenges/VOC/voc2007/VOCtrainval_06-Nov-2007.tar).
Expand Down Expand Up @@ -113,10 +107,15 @@ I use a symlink to hook the R-CNN codebase to the PASCAL VOC dataset:

#### Training R-CNN models and testing

Now to run the training and testing code, use the following experiments script:

<pre>
>> test_results = rcnn_exp_train_and_test()
</pre>

**Note:** The training and testing procedures save models and results under `rcnn/cachedir` by default. You can customize this by creating a local config file named `rcnn_config_local.m` and defining the experiment directory variable `EXP_DIR`. Look at `rcnn_config_local.example.m` for an example.


### Training an R-CNN detector on another dataset

It should be easy to train an R-CNN detector using another detection dataset as long as that dataset has *complete* bounding box annotations (i.e., all instances of all classes are labeled).
Expand Down
1 change: 0 additions & 1 deletion cachedir

This file was deleted.

1 change: 1 addition & 0 deletions cachedir/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is where saved models and test outputs live.
24 changes: 12 additions & 12 deletions rcnn_config.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@
% this file (or any portion of it) in your project.
% ---------------------------------------------------------

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Defaults config
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%
% If you want to override any of these, create a script named
% rcnn_config_local.m and redefine these variables there.
%
% ~~~~~~~~~~~~~~~~~~~~~~ BASIC SETUP ~~~~~~~~~~~~~~~~~~~~~~
% Please read the next few lines

% Experiments directory. The directory under which most outputs
% generated by running this code will go.
EXP_DIR = './cachedir/rcnn/v1.1/fc7';

EXP_DIR = './cachedir';
% Set to false if you do not want to use a GPU.
USE_GPU = true;


%
% You probably don't need to change configuration settings below this line.
%



% Load local overrides if rccn_config_local.m exists
% See rcnn_config_local.example.m for an example
if exist('rcnn_config_local.m')
rcnn_config_local;
end


% ~~~~~~~~~~~~~~~~~~~~~~ ADVANCED SETUP BELOW ~~~~~~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 5 additions & 0 deletions rcnn_config_local.example.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% Set your own experiments directory
EXP_DIR = './cachedir/foo/bar';

% Do not use the GPU
USE_GPU = false;

0 comments on commit 041b901

Please sign in to comment.