funkelab / gunpowder

A library to facilitate machine learning on multi-dimensional images.
https://funkelab.github.io/gunpowder/
MIT License
78 stars 56 forks source link

Implement Placeholders #85

Closed pattonw closed 4 years ago

pattonw commented 4 years ago

Add support for placeholders in BatchRequests. ArraySpecs and GraphSpecs can both be marked as placeholders. Placeholders are specs that are added to your request that contain important meta data, but will not result in actually reading data. For example, you may want a RandomLocation with the ensure_nonempty flag, however not actually need the points for anything.

BatchProviders will remove placeholders before passing the request to process unless opted in with enable_placeholders in the setup method. BatchFilters by default will provide placeholders as part of the request during the prepare method, but not the process method.