Skip to content

Commit

Permalink
adds scripts to prepare the data
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhuayc committed Jul 22, 2018
1 parent 121e8f4 commit c952800
Show file tree
Hide file tree
Showing 26 changed files with 1,939 additions and 10 deletions.
14 changes: 9 additions & 5 deletions lib/datasets/pascal_voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ def __init__(self, image_set, year, devkit_path=None):
self._devkit_path = self._get_default_path() if devkit_path is None \
else devkit_path
self._data_path = os.path.join(self._devkit_path, 'VOC' + self._year)
# self._classes = ('__background__', # always index 0
# 'aeroplane', 'bicycle', 'bird', 'boat',
# 'bottle', 'bus', 'car', 'cat', 'chair',
# 'cow', 'diningtable', 'dog', 'horse',
# 'motorbike', 'person', 'pottedplant',
# 'sheep', 'sofa', 'train', 'tvmonitor')
self._classes = ('__background__', # always index 0
'aeroplane', 'bicycle', 'bird', 'boat',
'bottle', 'bus', 'car', 'cat', 'chair',
'cow', 'diningtable', 'dog', 'horse',
'motorbike', 'person', 'pottedplant',
'sheep', 'sofa', 'train', 'tvmonitor')
'person', 'rider', 'car',
'truck','bus','train',
'motorcycle','bicycle')
self._class_to_ind = dict(zip(self.classes, xrange(self.num_classes)))
self._image_ext = '.jpg'
self._image_index = self._load_image_set_index()
Expand Down
2 changes: 1 addition & 1 deletion lib/datasets/voc_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def parse_rec(filename):
for obj in tree.findall('object'):
obj_struct = {}
obj_struct['name'] = obj.find('name').text
obj_struct['pose'] = obj.find('pose').text
obj_struct['pose'] = 'no pose' #obj.find('pose').text
obj_struct['truncated'] = int(obj.find('truncated').text)
obj_struct['difficult'] = int(obj.find('difficult').text)
bbox = obj.find('bndbox')
Expand Down
16 changes: 16 additions & 0 deletions models/da_faster_rcnn/faster_rcnn_end2end.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
EXP_DIR: faster_rcnn_end2end
TRAIN:
HAS_RPN: True
IMS_PER_BATCH: 1
BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True
RPN_POSITIVE_OVERLAP: 0.7
RPN_BATCHSIZE: 256
PROPOSAL_METHOD: gt
BG_THRESH_LO: 0.0
SCALES: [600]
MAX_SIZE: 1200
TEST:
HAS_RPN: True
SCALES: [600]
MAX_SIZE: 1200

Loading

0 comments on commit c952800

Please sign in to comment.