Closed ofirkris closed 3 years ago
Hi,
Thank you for being interested in my project.
Project doesn't work with JPG, JPEG input images, it just skips these files
Yes, I set it to read images from the dataset in PNG only. I will set it to read varied formats later.
Got the following error when trying to run inference on the attached image
Your PNG image contains 4 channels of RGB"A" including the transparency information.
Can you add support for images with more channels? can you support jpg too?
Sure, I will fix it within 24 hours.
By the way, you can roughly fix it yourself by:
img_names = [osp.basename(k) for k in glob.glob(args.in_dir + "/*.png")]
to
img_names = [osp.basename(k) for k in glob.glob(args.in_dir + "/*.png") + glob.glob(args.in_dir + "/*.jpg")]
pil_img = Image.open(img_path)
to
pil_img = Image.open(img_path).convert('RGB')
Hi, thanks for sharing this amazing project, i've tried to run inference on the attached image + on some old photos and got the following issues:
Traceback (most recent call last): File "run.py", line 26, in
dpscan(img_dir, out_path)
File "/root/filters/dpscan/dpscan.py", line 23, in call
tensor_out = self.G(tensor_img)
File "/root/anaconda/envs/ai/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, kwargs)
File "/root/filters/dpscan/networks/networks.py", line 50, in forward
X = self.layer_1(X)
File "/root/anaconda/envs/ai/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, *kwargs)
File "/root/filters/dpscan/networks/components.py", line 76, in forward
return self.layers(X)
File "/root/anaconda/envs/ai/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, kwargs)
File "/root/anaconda/envs/ai/lib/python3.7/site-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/root/anaconda/envs/ai/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/root/anaconda/envs/ai/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 423, in forward
return self._conv_forward(input, self.weight)
File "/root/anaconda/envs/ai/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 420, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [32, 3, 5, 5], expected input[1, 4, 720, 1072] to have 3 channels, but got 4 channels instead
Can you add support for images with more channels? can you support jpg too?