ProcessTiles¶
- MLModule¶
 genre
author
package
dll
definition
see also
ApplyTileProcessorPageWise,TensorFlowServingTileProcessor,SetTileProcessorProperties,AutoProposeTileProcessorProperties,ApplyTileProcessorkeywords
classific,prediction,inference,machine,deep,learning,deeplearning,patch,batch,RemoteVoxelClassification,TensorFlowVoxelClassification,ApplyTileClassifier
Purpose¶
Applies a C++ it applies a C++ TileProcessor demand driven and a page-by-page to the input image.
It can also be used for “whole image” processing (see Tips section for more info), but usually, you may want to use ApplyTileProcessor instead for such cases.
If you need more than a single input or output, you need to use the module ApplyTileProcessor instead.
Usage¶
Connect an image and a processor with tile properties, chose an appropriate Custom Output Tile Size (if necessary) and press update.
Details¶
Tile Processor Properties¶
Unlike when using the module ApplyTileProcessor, the object inTileProcessor must be a TileProcessingContainer and must, on top of a TileProcessor, also contain a TileProcessorPropertiesSource object that can be queried for proposed tile processor properties (inputs, outputs, padding, stride, dimension mapping, etc.).
For more information on the TileProcessorProperties (strongly recommended reading, if you are not familiar), see the ‘Details’ section of the ApplyTileProcessorPageWise, or directly check out the TileProcessorProperties Schema Documentation.
The only tile property that can be modified by this module is the output tile size, which can be customized via Use and Custom Output Tile Size to best match the data and TileProcessor used.
In contrast to its more complex derivate, ApplyTileProcessorPageWise, ProcessTiles does not support any property overriding except for outputTileSize. Thus, it requires already the correct tile properties to be present and valid at the input. You can always change incorrect properties with ApplyTileProcessorPageWise or by prepending the module SetTileProcessorProperties to ProcessTiles, but it is recommended to fix the properties that come with the model.
See also SetTileProcessorPropertiesFromJson to see how to apply a complete set of properties from file.
Processing ROI¶
A region of interest (ROI, cf. Use, Output Restriction ROI [VC]) can be set to restrict processing to a sub-region of the input image, which is mostly useful for speeding up computation. In comparison to just applying the ROI to the input image before feeding it to the module, using this feature has the advantage that in case padding is used, it can make use of the actual input data where available, and only resort to filling (see above) where there is none. In comparison to just applying the ROI to the output image, it has the slight performance advantage that the page/tile borders will be optimally aligned to the required region.
Note that:
the ROI box is to be given in voxel (index) coordinates relative to the image at the reference input (this is the format modules like
BoundingBoxorBoundingBoxWithMarginput out)the ROI box is ignored for the dimension specified as a channel dimension (in the tile properties externalDimensionForChannel1/2), as the ROI is not for clamping channel data
Debugging/Profiling of Individual Batch Processing Requests¶
Set the environment variable TILEPROCESSING_ENABLE_REQUEST_DEBUGGING to a non “0” value to enable sending a unique request ID string with each individual tile request. This simplifies tracking for debugging and profiling in the inference providers (i.e. tile processors).
Tips¶
Using ProcessTiles for “Full” (i.e. non-tiled) Image Processing¶
The stride tile property can actually be used to implement a single-tile processing of the entire image, instead of a “classic” localized tile processing. The trick is to ensure that the stride is always identical to the input image extent. You can use the module SetTileProcessorProperties so ensure that the input tile will comprise the entire input image, and the output tile only a single voxel (spanning the entire image region).
Windows¶
Default Panel¶
Input Fields¶
inTileProcessor¶
- name: inTileProcessor, type: TileProcessor/TileProcessorContainer(MLBase), deprecated name: inTileClassifier¶
 Used to provide an input processor (implementing the ml::TileProcessor interface) and proposed tile properties. The input must be of type BaseList (which serves as TileProcessorContainer) containing both the TileProcessor and a TileProperiesSource.
See
SetTileProcessorProperties,SetTileProcessorPropertiesFromJsonandAutoProposeTileProcessorPropertiesfor more info on how to generate proposed tile properties.
Output Fields¶
outParameterInfo¶
- name: outParameterInfo, type: MLBase¶
 ParameterInfo for the connected processor as a python object.
Parameter Fields¶
Field Index¶
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
|
  | 
  | 
  | 
  | 
  | 
|
  | 
  | 
Visible Fields¶
Update¶
- name: update, type: Trigger¶
 Initiates update of all output field values.
Clear¶
- name: clear, type: Trigger¶
 Clears all output field values to a clean initial state.
On Input Change Behavior¶
- name: onInputChangeBehavior, type: Enum, default: Clear, deprecated name: shouldAutoUpdate,shouldUpdateAutomatically¶
 Declares how the module should react if a value of an input field changes.
Values:
Title  | 
Name  | 
Deprecated Name  | 
|---|---|---|
Update  | 
Update  | 
TRUE  | 
Clear  | 
Clear  | 
FALSE  | 
Status Code¶
- name: statusCode, type: Enum, persistent: no¶
 Reflects module’s status (successful or failed computations) as one of some predefined enumeration values.
Values:
Title  | 
Name  | 
|---|---|
Ok  | 
Ok  | 
Invalid input object  | 
Invalid input object  | 
Invalid input parameter  | 
Invalid input parameter  | 
Internal error  | 
Internal error  | 
Status Message¶
- name: statusMessage, type: String, persistent: no¶
 Gives additional, detailed information about status code as human-readable message.
Has Valid Output¶
- name: hasValidOutput, type: Bool, persistent: no¶
 Indicates validity of output field values (success of computation).
[]¶
- name: updateDone, type: Trigger, persistent: no¶
 Notifies that an update was performed (Check status interface fields to identify success or failure).
Expected Inputs¶
- name: availableInputs, type: String, persistent: no¶
 Comma-separated list of all inputs declared by the current TileProcessorAll inputs declared by the current TileProcessor
Available Outputs¶
- name: availableOutputs, type: String, persistent: no¶
 Comma-separated list of all outputs declared by the current TileProcessor
Use (inUseProcessingRoi)¶
- name: inUseProcessingRoi, type: Bool, default: FALSE¶
 If enabled, you can restrict processing (and hence the output image) to a rectangular Region of Interest defined by
Output Restriction ROI [VC].
Output Restriction ROI [VC]¶
Snap to valid¶
- name: inEnableOutputTileSizeSnapping, type: Bool, default: TRUE¶
 If enabled (default) the module snaps the output tile size to a valid value greater or equal to the proposed one, if this is supported by the processor. Disabling the flag is only for those rare cases in which the processor errs on what he supports. Of course, it is better to fix the proposed properties than to disable this flag.
See modules
SetTileProcessorPropertiesandSetTileProcessorPropertiesFromJsonon how to adapt the proposed tile properties that snapping will always work correctly for you processor.
Use (inUseCustomOutputTileSize)¶
- name: inUseCustomOutputTileSize, type: Bool, default: FALSE, deprecated name: inUseCustomTileSize¶
 If enabled,
Custom Output Tile Sizeis used (instead of the proposal from the connected processor).
Custom Output Tile Size¶
- name: inCustomOutputTileSize, type: IntVector6, default: 128 128 1 1 1 1, deprecated name: inCustomTileSize¶
 If
Useis enabled, this overrides the processor’s proposal for the output tile size used for processing. If you have a multi-channel result, this must include the output channel extent in the CHANNEL dimension (indicated by the “Ch” label in the vector edit control). Any ‘0’ entry will be automatically mapped to the corresponding input image extent.The “0 to full extent mapping” makes it also easier to use the module for whole image classification, but it is still recommended to use
ApplyTileProcessorfor that purpose.See
ApplyTileProcessorPageWiseDetails section for details.
Used Output Tile Size¶
- name: outUsedOutputTileSize, type: IntVector6, persistent: no, deprecated name: outUsedTileSize¶
 Actually used output tile size.
See
ApplyTileProcessorPageWiseDetails section for details.
Selected Output¶
- name: outUsedOutput, type: String, persistent: no, deprecated name: outUsedModelOutput¶
 Name of the actually used model output.