-
Notifications
You must be signed in to change notification settings - Fork 50
issue in training #1
New issue
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
Comments
Could u give me a more detailed description of the error |
RuntimeError: CUDA error: device-side assert triggered Traceback (most recent call last): |
Your category number is 3, so your label map should only contain 0,1 and 2, but your label map contain something else. Check your label map. |
could not get it? Please give more details. Thanks |
Check that your label map contains only 0,1, and 2. You can complete the check by running the following program: import os
import os.path as osp
from tqdm import tqdm
import cv2
import numpy as np
num_classes = 3
mask_dir = "masks"
mask_names = os.listdir(mask_dir)
for mask_name in tqdm(mask_names):
mask_path = osp.join(mask_dir, mask_name)
mask = cv2.imread(mask_path, 0)
h, w = mask.shape[:2]
pix = []
for i in range(0, num_classes):
pix.append(len(np.where(mask==i)[0]))
if sum(pix) != h*w:
print("error: " + mask_name) |
when i set the model='Unet',cannot run,could you help to reply me ,thinks follow is the erros: |
不能把category number的类别定义为mask的分割种类呢,即不需要再把mask的颜色种类重新按0,1,2,3这样排序,保留原本的颜色? |
可以,但你需要对加载数据的代码做一些修改。 |
这代码只能运用于图像尺寸一样的数据集吗??? |
INFO: Using device cuda
INFO: Network:
NestedUNet model
3 input channels
3 output channels (classes)
Bilinear upscaling
INFO: Creating dataset with 20 examples
training stops after this. can anyone help
The text was updated successfully, but these errors were encountered: