awesome-semantic-segmentation-pytorch
awesome-semantic-segmentation-pytorch copied to clipboard
Help! TypeError: an integer is required (got type tuple)
wenwu@Amax:~ /chenyao/awesome-semantic-segmentation-pytorch-master/scripts$ python train.py --model fcn32s --backbone vgg16 --dataset pascal_voc --lr 0.0001 --epochs 50
2021-09-08 18:06:48,524 semantic_segmentation INFO: Using 1 GPUs
2021-09-08 18:06:48,524 semantic_segmentation INFO: Namespace(aux=False, aux_weight=0.4, backbone='vgg16', base_size=520, batch_size=4, crop_size=480, dataset='pascal_voc', device='cuda', distributed=False, epochs=50, jpu=False, local_rank=0, log_dir='../runs/logs/', log_iter=10, lr=0.0001, model='fcn32s', momentum=0.9, no_cuda=False, num_gpus=1, resume=None, save_dir='~/.torch/models', save_epoch=10, skip_val=False, start_epoch=0, use_ohem=False, val_epoch=1, warmup_factor=0.3333333333333333, warmup_iters=0, warmup_method='linear', weight_decay=0.0001, workers=4)
Found 1464 images in the folder /data1/chenyao/datasets/VOC2012
Found 1449 images in the folder /data1/chenyao/datasets/VOC2012
2021-09-08 18:06:53,200 semantic_segmentation INFO: Start training, Total Epochs: 50 = Total Iterations 18300
Traceback (most recent call last):
File "train.py", line 323, in
Please check the input of this line.
There might be something wrong with the version of pillow
. Try this : border=(0, 0, padw, padh)
-> border=20
There might be something wrong with the version of
pillow
. Try this :border=(0, 0, padw, padh)
->border=20
Thank you very much, I solved it. But I don't know why "img = ImageOps.expand(img, border=(0, 0, padw, padh), fill=0)" can run but "mask = ImageOps.expand(mask, border=(0, 0, padw, padh), fill=0)" can not?
@cy998412 how to solve this problem?
@cy998412 How did you solve this problem?