MCPcopy Create free account
hub / github.com/OpenDriveLab/OccNet / convert_color

Function convert_color

projects/mmdet3d_plugin/models/utils/visual.py:8–12  ·  view source on GitHub ↗
(img_path)

Source from the content-addressed store, hash-verified

6import numpy as np
7
8def convert_color(img_path):
9 plt.figure()
10 img = cv2.imread(img_path, cv2.IMREAD_GRAYSCALE)
11 plt.imsave(img_path, img, cmap=plt.get_cmap('viridis'))
12 plt.close()
13
14
15def save_tensor(tensor, path, pad_value=254.0,):

Callers 1

save_tensorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected