* Segments an arbitrary image and generates a two-dimensional tensor with * class labels assigned to each cell of the grid overlayed on the image ( the * maximum number of cells on the side is fixed to 513). * * @param input :: * `ImageData|HTMLImageElement|HTMLCanvasElement|HTMLV
(input: DeepLabInput)
| 125 | * The segmentation map of the image |
| 126 | */ |
| 127 | public predict(input: DeepLabInput): tf.Tensor2D { |
| 128 | return tf.tidy(() => { |
| 129 | const data = tf.cast(toInputTensor(input), 'int32'); |
| 130 | return tf.squeeze(this.model.execute(data) as tf.Tensor); |
| 131 | }); |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * Segments an arbitrary image and generates a two-dimensional tensor with |
no test coverage detected