Skip to content

Commit

Permalink
Add dataset keys for bin and tote.
Browse files Browse the repository at this point in the history
  • Loading branch information
hgaiser committed Jun 8, 2016
1 parent 1ae3345 commit 41f9a78
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
12 changes: 12 additions & 0 deletions experiments/scripts/faster_rcnn_end2end.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ case $DATASET in
PT_DIR="apc"
ITERS=80000
;;
apcbin)
TRAIN_IMDB="apc_bin_trainval"
TEST_IMDB="apc_bin_test"
PT_DIR="apc"
ITERS=20000
;;
apctote)
TRAIN_IMDB="apc_tote_trainval"
TEST_IMDB="apc_tote_test"
PT_DIR="apc"
ITERS=20000
;;
*)
echo "No dataset given"
exit
Expand Down
10 changes: 9 additions & 1 deletion experiments/scripts/faster_rcnn_end2end_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ EXTRA_ARGS_SLUG=${EXTRA_ARGS// /_}

case $DATASET in
apc)
TEST_IMDB="apc_test_validated"
TEST_IMDB="apc_2016_test"
PT_DIR="apc"
;;
apcbin)
TEST_IMDB="apc_bin_test"
PT_DIR="apc"
;;
apctote)
TEST_IMDB="apc_tote_test"
PT_DIR="apc"
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions lib/datasets/apc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, image_set, year, devkit_path=None):
self._class_to_ind = _classes
print self._classes

self._image_ext = '.jpg'
self._image_ext = '.png'
self._image_index = self._load_image_set_index()
# Default to roidb handler
self._roidb_handler = self.selective_search_roidb
Expand Down Expand Up @@ -87,7 +87,7 @@ def _load_image_set_index(self):
Load the indexes listed in this dataset's image set file.
"""
# Example path to image set file:
# self._devkit_path + /DRapc2016/APC2007/ImageSets/Main/val.txt
# self._devkit_path + /DRapc2016/APC2016/ImageSets/Main/val.txt
image_set_file = os.path.join(self._data_path, 'ImageSets', 'Main',
self._image_set + '.txt')
assert os.path.exists(image_set_file), \
Expand Down
2 changes: 1 addition & 1 deletion lib/datasets/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
__sets[name] = (lambda split=split, year=year: pascal_voc(split, year))

# Set up apc_2016_<split>
for year in ['2016', 'test']:
for year in ['2016', 'bin', 'tote']:
for split in ['train', 'val', 'trainval', 'test', 'validated']:
name = 'apc_{}_{}'.format(year, split)
__sets[name] = (lambda split=split, year=year: apc(split, year))
Expand Down

0 comments on commit 41f9a78

Please sign in to comment.