MCPcopy Index your code
hub / github.com/NVIDIA/FastPhotoStyle / visualize_result

Function visualize_result

process_stylization_ade20k_ssn.py:34–40  ·  view source on GitHub ↗
(label_map)

Source from the content-addressed store, hash-verified

32
33
34def visualize_result(label_map):
35 label_map = label_map.astype('int')
36 label_map_rgb = np.zeros((label_map.shape[0], label_map.shape[1], 3), dtype=np.uint8)
37 for label in np.unique(label_map):
38 label_map_rgb += (label_map == label)[:, :, np.newaxis] * \
39 np.tile(colors[label],(label_map.shape[0], label_map.shape[1], 1))
40 return label_map_rgb
41
42
43class SegReMapping:

Callers 1

stylizationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected