Skip to content

Inference Model

Mohamed E. Masoud edited this page Dec 6, 2021 · 22 revisions

Default Models

For our user convenience, a MeshNet segmentation model is trained and converted to Tensorflow.js(tfjs).

While MeshNet Model has fewer number of parameters compared to the classical segmentation model U-Net, it is also can achieve a competitive DICE score.

New Models

If you need to import your own 3D segmentation model, please make sure your model layers are compatible with tfjs layers.

If you are using a layer not supported by tfjs, try to find a workaround. For example, Keras batchnorm5d will raise an issue with tfjs model because there is not a batchnorm5d layer in tfjs. One possible workaround here is to use a fusion technique with Keras layers by merging batch normalization layer with convolution layer as shown in this link.

After training your model on 3D segmentation task, multiple converters to tfjs can be used from command line , or by python code such as:

import tensorflowjs as tfjs keras_model = keras.models.load_model('path/to/model/location') tfjs.converters.save_keras_model(keras_model, tfjs_target_dir)

Clone this wiki locally