Open rose-jinyang opened 4 years ago
There is no limit to the image size in the demo.py
.
Hi I used the size 875x583 of image. Please check this issue.
Traceback (most recent call last):
File "E:/Jin/Internet_Task/Jobs/2020/2020.08.31-U2_Net/Fast-SCNN-pytorch-master/demo.py", line 57, in
Thanks
Hi I did padding so that the width and height of image can be multiples of 32. So the issue disappeared but the result is not normal. This is the padded input image.
That is the output image.
How can I understand this? Thanks
same problem. did you find any solution? thanks
There was no such problem during the first training. The same data set for the second training is reported as follows:
Traceback (most recent call last): File "/home/lyl/000_Code/Fast-SCNN/train.py", line 200, in <module> trainer.train() File "/home/lyl/000_Code/Fast-SCNN/train.py", line 127, in train for i, (images, targets) in enumerate(self.train_loader): File "/home/lyl/anaconda3/envs/fastscnn1.0/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 615, in __next__ batch = self.collate_fn([self.dataset[i] for i in indices]) File "/home/lyl/anaconda3/envs/fastscnn1.0/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 615, in <listcomp> batch = self.collate_fn([self.dataset[i] for i in indices]) File "/home/lyl/000_Code/Fast-SCNN/data_loader/cityscapes.py", line 93, in __getitem__ img, mask = self._sync_transform(img, mask) File "/home/lyl/000_Code/Fast-SCNN/data_loader/cityscapes.py", line 141, in _sync_transform img = img.resize((ow, oh), Image.BILINEAR) File "/home/lyl/anaconda3/envs/fastscnn1.0/lib/python3.6/site-packages/PIL/Image.py", line 1923, in resize return self._new(self.im.resize(size, resample, box)) ValueError: height and width must be > 0
Hello How are you? Thanks for contributing this project. It seems that the script demo.py can not process any size of image. Could u revise the script so that it can process any size of image? Thanks.