601d77a77a55323770bb2b214aa8844538b13d1f,art/visualization.py,,convert_to_rgb,#Any#,51
Before Change
rgb_images = np.zeros(shape=(s[0], s[1], s[2], 3))
for i, img in enumerate(images):
new_image = cv2.cvtColor(img, cv2.COLOR_GRAY2RGB)
rgb_images[i] = new_image
return rgb_images
After Change
:return: rgb_images
s = np.shape(images)
if not ((len(s) == 4 and s[-1] == 1) or len(s) == 3):
raise ValueError("Unexpected shape for grayscale images:" + str(s))
if s[-1] == 1:
// Squeeze channel axis if it exists
rgb_images = np.squeeze(images, axis=-1)
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 601d77a77a55323770bb2b214aa8844538b13d1f
Time: 2018-09-25
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/visualization.py
Class Name:
Method Name: convert_to_rgb
Project Name: dmlc/gluon-cv
Commit Name: fdd55d36c05c747643fc98430a7f9b787b6cec16
Time: 2019-08-29
Author: yizhu59@gmail.com
File Name: gluoncv/data/kinetics400/classification.py
Class Name: Kinetics400
Method Name: _TSN_RGB
Project Name: AlexEMG/DeepLabCut
Commit Name: 390d6560c6873526218606c254627f52898c700d
Time: 2020-08-19
Author: 30733203+jeylau@users.noreply.github.com
File Name: deeplabcut/pose_estimation_3d/plotting3D.py
Class Name:
Method Name: plot2D