Open zhengxinvip opened 5 years ago
i meet the same error
i meet the same error
did you fix it?
i meet the same error
did you fix it?
I have the same error!Did you saved this?
i meet the same error
did you fix it?
I have the same error!Did you saved this?
no how about you?
i meet the same error did you fix it? I have the same error!Did you saved this?
no how about you?
I change some code in the dataset.py pytorch_normalize img = normalize(t.from_numpy(img))to img = normalize(t.from_numpy(img)).float().It can run normaly.You can test it.
def pytorch_normalze(img): """ https://github.com/pytorch/vision/issues/223 return appr -1~1 RGB """ tensor = t.from_numpy(img) dtype = tensor.dtype mean = [0.485, 0.456, 0.406] std = [0.229, 0.224, 0.225] mean = t.as_tensor(mean, dtype=dtype, device=tensor.device) std = t.astensor(std, dtype=dtype, device=tensor.device) tensor.sub(mean[:, None, None]).div_(std[:, None, None]) return tensor.numpy()
i meet the same error. @YangYangGirl's code is right. thanks!
the solutions mentioned above do not work for me. any other solutions?
the solutions mentioned above do not work for me. any other solutions?
metoo, and now? how did u fix it?
pytorch 4.0.1 windows: 10 cuda: 9.0 python: 3.6 when I run the demo:
trainer.load('C:\Users\25118\.torch\models\fasterrcnn_12211511_0.701052458187_torchvision_pretrain.pth') opt.caffe_pretrain=False # this model was trained from torchvision-pretrained model _bboxes, _labels, _scores = trainer.faster_rcnn.predict(img,visualize=True) vis_bbox(at.tonumpy(img[0]), at.tonumpy(_bboxes[0]), at.tonumpy(_labels[0]).reshape(-1), at.tonumpy(_scores[0]).reshape(-1))
it failed to find the dog, but if you set threshold from 0.7 to 0.6, you'll find it
I got this error:
RuntimeError Traceback (most recent call last)