We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我使用json_to_dataset.py转化mask后尝试使用代码查看shape import cv2 import numpy as np from PIL import Image
file = '/home/fut/Downloads/unet-pytorch-main/mydata/masks/ID_1110_json.png' img = cv2.imread(file, cv2.IMREAD_UNCHANGED) print(img.shape)
pil = Image.open(file) img2 = np.array(pil) print(img2.shape) 结果会是: (800, 800, 3) (800, 800) 为什么PIL读取后通道就没了,正是因为这个原因你的项目会很好跑起来。
The text was updated successfully, but these errors were encountered:
发现是get_random_data有个转L操作,问题已经清楚
Sorry, something went wrong.
No branches or pull requests
我使用json_to_dataset.py转化mask后尝试使用代码查看shape
import cv2
import numpy as np
from PIL import Image
file = '/home/fut/Downloads/unet-pytorch-main/mydata/masks/ID_1110_json.png'
img = cv2.imread(file, cv2.IMREAD_UNCHANGED)
print(img.shape)
pil = Image.open(file)
img2 = np.array(pil)
print(img2.shape)
结果会是:
(800, 800, 3)
(800, 800)
为什么PIL读取后通道就没了,正是因为这个原因你的项目会很好跑起来。
The text was updated successfully, but these errors were encountered: