Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
NiftyNet
NiftyNet
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • CMIC
  • NiftyNetNiftyNet
  • Issues
  • #274

Closed
Open
Opened May 21, 2018 by Carole Sudre@carole.sudreMaintainer

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`

windows_aggregator_base.py

windows_aggregator_grid.py

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: CMIC/NiftyNet#274