I'm sorry if there is
By the way, it seems that there are various types of Gray Scale, so you can use your favorite parameters.
def getGrayImage(self,rgbImg):
gray = 0.114*rgbImg[:,0,:,:] + 0.587*rgbImg[:,1,:,:] + 0.299*rgbImg[:,2,:,:]
gray = torch.unsqueeze(gray,1)
return gray
Recommended Posts