Multiple output at inference/ aggregation
Possibility to output multiple files (images or other) Attached a possibility for taking care of it using a dictionary for the decoder batch. May not be the best way to do it but this hacked way is working out fine for me Happy to get any comments and/or suggestions on it
Changes made to windows_aggregator and to the application file
Ex for application file:
` outputs_collector.add_to_collection(
var=masked_distreg, name='window_reg',
average_over_devices=False, collection=NETWORK_OUTPUT)
outputs_collector.add_to_collection(var=map_boxes,
name='window_yboxes',
average_over_devices=False,
collection=NETWORK_OUTPUT)
outputs_collector.add_to_collection(var=com_map,
name='window_com',
average_over_devices=False,
collection=NETWORK_OUTPUT)
# outputs_collector.add_to_collection(
# var=bbox_image, name='window_box',
# average_over_devices=False, collection=NETWORK_OUTPUT)
# outputs_collector.add_to_collection(
# var=data_dict['image'], name='window_mask',
# average_over_devices=False, collection=NETWORK_OUTPUT)
# outputs_collector.add_to_collection(
# var=rpn_bbox, name='window_prop',
# average_over_devices=False, collection=NETWORK_OUTPUT)
outputs_collector.add_to_collection(
var=data_dict['image_location'], name='location',
average_over_devices=False, collection=NETWORK_OUTPUT)
init_aggregator =
self.SUPPORTED_SAMPLING[self.net_param.window_sampling][2]
init_aggregator()
def interpret_output(self, batch_output):
if not self.is_training:
return self.output_decoder.decode_batch(
{'window_yboxes': batch_output['window_yboxes'],
'window_reg': batch_output['window_reg'],
'window_com': batch_output['window_com']},
batch_output['location'])
# return self.output_decoder.decode_batch(
# {'window_prop':batch_output['window_prop'],
# 'window_gt':batch_output['window_gt'],
# 'window_init':batch_output['window_mask']}, batch_output[
# 'location'])
return True`