MCPcopy Create free account
hub / github.com/SooLab/CGFormer / colorize

Function colorize

utils/misc.py:193–197  ·  view source on GitHub ↗
(gray, palette)

Source from the content-addressed store, hash-verified

191
192
193def colorize(gray, palette):
194 # gray: numpy array of the label and 1*3N size list palette
195 color = Image.fromarray(gray.astype(np.uint8)).convert('P')
196 color.putpalette(palette)
197 return color
198
199
200def find_free_port():

Callers

nothing calls this directly

Calls 1

convertMethod · 0.45

Tested by

no test coverage detected