MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / colorize

Function colorize

examples/CaffeModels/load-cpm.py:27–32  ·  view source on GitHub ↗

img: bgr, [0,255] heatmap: [0,1]

(img, heatmap)

Source from the content-addressed store, hash-verified

25
26
27def colorize(img, heatmap):
28 """ img: bgr, [0,255]
29 heatmap: [0,1]
30 """
31 heatmap = viz.intensity_to_rgb(heatmap, cmap='jet')[:, :, ::-1]
32 return img * 0.5 + heatmap * 0.5
33
34
35@memoized

Callers 1

run_testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected