Open Averu-zz opened 4 years ago
How did you run the fsns_demo.py
script?
with command python fsns_demo.py /home/ml/Downloads/see/chainer/models model_35000.npz /home/ml/Downloads/see/chainer/models/vk.jpg /home/ml/Downloads/see/datasets/fsns/fsns_char_map.json
could you show me this image? /home/ml/Downloads/see/chainer/models/vk.jpg
sure here is a link: https://imgur.com/a/sDiJdaL I tried pictures of varying format and sizes. Getting the same error, but values of known size and actual change.
I did not copy all files fsns_model/model to see/chainer/models. Just model_35000.npz and log files. The fsns.py and train_fsns.py wher not copied. see/chainer/models already contained a fsns.py file and I dont think I'll need train_fsfs.py to test demo. Should i replace the fsns.py?
I tried pictures of varying format and sizes
The FSNS Model is trained on pictures of size 600x150
. Furthermore, the FSNS dataset consists of images that always show four independent views of a street sign. So the model won't work on an image like the one you provided.
Hello. I'm getting error when trying to run fsns_demo.py.
Traceback (most recent call last): File "fsns_demo.py", line 153, in
predictions, crops, grids = network(image[xp.newaxis, ...])
File "/home/ml/Downloads/see/chainer/models/fsns.py", line 514, in call
images = F.reshape(images, (batch_size, num_channels, height, 4, -1))
File "/home/ml/env/lib/python3.5/site-packages/chainer/functions/array/reshape.py", line 98, in reshape
y, = Reshape(shape).apply((x,))
File "/home/ml/env/lib/python3.5/site-packages/chainer/function_node.py", line 230, in apply
self._check_data_type_forward(in_data)
File "/home/ml/env/lib/python3.5/site-packages/chainer/function_node.py", line 298, in _check_data_type_forward
self.check_type_forward(in_type)
File "/home/ml/env/lib/python3.5/site-packages/chainer/functions/array/reshape.py", line 40, in check_type_forward
type_check.prod(x_type.shape) % size_var == 0)
File "/home/ml/env/lib/python3.5/site-packages/chainer/utils/type_check.py", line 524, in expect
expr.expect()
File "/home/ml/env/lib/python3.5/site-packages/chainer/utils/type_check.py", line 482, in expect
'{0} {1} {2}'.format(left, self.inv, right))
chainer.utils.type_check.InvalidType:
Invalid operation is performed in: Reshape (Forward)
Expect: prod(in_types[0].shape) % known_size(=1800) == 0 Actual: 900 != 0
Any Ideas how to fix this? I have tried different shaped and sized pictures but no avail.