MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / decolorization

Function decolorization

data/transforms.py:208–210  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

206
207
208def decolorization(image):
209 gray_image = image.convert('L')
210 return Image.merge(image.mode, [gray_image] * 3) if image.mode in ('RGB', 'L') else gray_image
211
212
213def downscale(image, scale_factor):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected