from PIL import Image
import cv2
from skimage import io
def shape_size():
img = cv2.imread('img_part.jpg')
print(img.shape) # h, w, c
img1 = Image.open('img_part.jpg')
print(img1.size) # w, h
img2 = io.imread('img_part.jpg')
print(img2.shape) # h, w, c
if __name__ == '__main__':
shape_size()
(50, 1248, 3)
(1248, 50)
(50, 1248, 3)