Hi,
Can anyone let me know how the data blob is created in py faster rcnn?? I have been checking all the train code, factory, imdb and pascal_voc under dataset and the layer. I wish to add another set of images (you could assume depth, so it is a pair of the input image, should have same order).
I see that the data is defined in prototxt as :
name: "ZF"
layer {
name: 'input-data'
type: 'Python'
top: 'data'
top: 'im_info'
top: 'gt_boxes'
python_param {
module: 'roi_data_layer.layer'
layer: 'RoIDataLayer'
param_str: "'num_classes': 21"
}
}
so I need another top for the new image set, and I see that in the layer.py (under roi data layer) the blob is accessed and reshaped as it is defined in prototxt.
# data blob: holds a batch of N images, each with 3 channels
idx = 0
top[idx].reshape(cfg.TRAIN.IMS_PER_BATCH, 3,
max(cfg.TRAIN.SCALES), cfg.TRAIN.MAX_SIZE)
self._name_to_top_map['data'] = idx
idx += 1
if cfg.TRAIN.HAS_RPN:
top[idx].reshape(1, 3)
self._name_to_top_map['im_info'] = idx
idx += 1
top[idx].reshape(1, 4)
self._name_to_top_map['gt_boxes'] = idx
idx += 1
Since idx is a counter, I am assuming the data blob is read in order.
fine, but how does the code prepare the data blob? I can not find it exactly. Thanks!!!!