def get_img_channel(image_path):
 img = load_image(image_path)
 img = pil_to_nparray(img)
 try:
  channel = img.shape[2]
 except:
  channel = 1
 return channel

def get_img_channel ( image_path ) : img = load_image ( image_path ) img = pil_to_nparray ( img ) try : channel = img . shape [ 2 ] except : channel = 1 return channel
load a image and return the channel of the image .