MCPcopy Create free account
hub / github.com/deepdrive/deepdrive / _heatmap_op

Function _heatmap_op

tf_utils.py:35–42  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

33
34
35def _heatmap_op(x):
36 red = x
37 green = 1.0 - tf.abs(0.5 - x) * 2.
38 blue = 1. - x
39 y = tf.stack([red, green, blue])
40 y = tf.transpose(y, (1, 2, 0))
41 y = tf.cast(y * 255, tf.uint8)
42 return y
43
44
45image_op = _image_op(IMAGE)

Callers 1

_depth_opFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected