from huggingface_hub import hf_hub_download import cv2 REPO_ID = "Mashengshuaiqi/myfirstdataset" FILENAME = "banana.png" img = cv2.imread( hf_hub_download(repo_id=REPO_ID, filename=FILENAME, repo_type="dataset") ) print(" ====> ",img.shape )