ssd-pytorch icon indicating copy to clipboard operation
ssd-pytorch copied to clipboard

大佬,我在运行get_dr_txt时,出现如下问题。所用的图片尺寸为320*320,您看看该怎么解决?谢谢!

Open shuweil opened this issue 4 years ago • 1 comments

Traceback (most recent call last):

File "C:\ssd-pytorch-master\get_dr_txt.py", line 77, in ssd.detect_image(image_id,image)

File "C:\ssd-pytorch-master\get_dr_txt.py", line 25, in detect_image preds = self.net(photo)

File "C:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 532, in call result = self.forward(*input, **kwargs)

File "C:\ssd-pytorch-master\nets\ssd.py", line 69, in forward self.priors

File "C:\ssd-pytorch-master\nets\ssd_layers.py", line 32, in forward self.num_classes).transpose(2, 1)

RuntimeError: shape '[1, 8732, 2]' is invalid for input of size 19180

shuweil avatar Jun 05 '20 02:06 shuweil

感觉你这里要么将图片改成300 * 300,要么去处理特征图的大小和计算

zkm98 avatar Jun 10 '20 01:06 zkm98