Purpose

Connects to remote TensorFlow Serving inference server to process voxels tile by tile as fed by ApplyTileProcessorPageWise.

Usage

Assuming you have a TensorFlow Serving inference server running, enter its URL into Server URL (e.g. http://localhost:8501), and enter the Model ID you want to use. You can also check if the connection is possible and the model was found by pressing the Check Connection button, which, if successful, will list all versions available for the current model and all outputs available for the currently selected model version. Then press Update to set up the processor.

Connect to an ApplyTileProcessorPageWise and make sure to edit the output tile size, padding and dimension mapping. See ApplyTileProcessorPageWise help for more details.

See the example network on how to apply these modules to process images.

Tips

If supported by your server and client setup, use GRPC for better performance.

Windows

Default Panel

../../../Projects/TileProcessing/RemoteVersionedTileProcessing/TensorFlowServingTileProcessor/Modules/mhelp/Images/Screenshots/TensorFlowServingTileProcessor._default.png

Output Fields

outCppTileProcessor

name: outCppTileProcessor, type: PythonTileProcessorWrapper(MLBase), deprecated name: outCppTileClassifier

Provides a C++ TileProcessor wrapping the python object communicating with the TensorFlow Serving backend. Usually to be connected to ProcessTiles or ApplyTileProcessor.

outPyTileProcessor (hidden)

name: outPyTileProcessor, type: MLBase, deprecated name: outPatchBasedProcessor,outPyProcessor,outPyTileClassifier

Python processor, usually only required for testing, as py-cpp conversion is already done internally for convenience.

Can of course also be connected to ApplyTileProcessorPageWise if a PythonToCppTileProcessorBridge module is inserted.

Parameter Fields

Field Index

[]: Trigger On Input Change Behavior: Enum Version: Enum
Clear: Trigger outAvailableModels: String  
Custom Version: Integer Prediction Timeout [ms]: Integer  
Default Timeout [ms]: Integer Server URL: String  
doNotClearOnFailedUpdate: Bool Status Code: Enum  
Expanded URL: String Status Message: String  
Has Valid Output: Bool Update: Trigger  
Model ID: String Used Model Version: Integer  

Visible Fields

Server URL

name: inServerUrl, type: String, default: $(FME_TFSERVING_URL), deprecated name: inServer

URL the TF serving inference server is to be contacted on (e.g. grpc://localhost:8500 or http://localhost:8501). The prefix (grpc:// or http://) determines the protocol to be used. You can use MDL variables here e.g. ‘$(MY_TFS_SERVER_URL)’, for example defined in the mevislab.prefs.

Expanded URL

name: outExpandedServerUrl, type: String, persistent: no

Expanded version of the Server URL

Prediction Timeout [ms]

name: inPredictionTimeout_ms, type: Integer, default: 2000, minimum: -1, deprecated name: inTimeout\_ms

Timeout (in milliseconds) for a tile prediction request. As prediction can take a long time depending on the used model and inference server performance, this value can be chosen independently from the default communication timeout.

Default Timeout [ms]

name: inDefaultTimeout_ms, type: Integer, default: 200, minimum: -1

Timeout (in milliseconds) for all server communication except tile prediction requests.

Model ID

name: inModelId, type: String, deprecated name: inModelName

Model ID to load on the server, including potential namespaces/hierarchies separated by ‘.’ (e.g. fme.MyModel.sagittal).

Version

name: inModelVersionSelectionMode, type: Enum, default: Latest

Version selection mode

Values:

Title Name Description
Latest Latest Choose latest model (highest version number) available
Custom Custom Select custom model version

Custom Version

name: inCustomModelVersion, type: Integer, default: 1, minimum: 1

Custom model version (integer > 0).

Used Model Version

name: outUsedModelVersion, type: Integer, persistent: no

Indicates the model version actually used.

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

[]

name: updateDone, type: Trigger, persistent: no

Notifies that an update was performed (Check status interface fields to identify success or failure).

Has Valid Output

name: hasValidOutput, type: Bool, persistent: no

Indicates validity of output field values (success of computation).

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.

Hidden Fields

outAvailableModels

name: outAvailableModels, type: String, persistent: no

Querying the server for all available models is currently not supported by TensorFlowServing.

doNotClearOnFailedUpdate

name: doNotClearOnFailedUpdate, type: Bool, persistent: no

Prevents automated clear after update failed. This does not affect status fields. It enables the developer to analyze module’s state after failure.