Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to infer one Image with COCO Config? #144

Open
radarjonathan opened this issue Jun 29, 2021 · 0 comments
Open

How to infer one Image with COCO Config? #144

radarjonathan opened this issue Jun 29, 2021 · 0 comments

Comments

@radarjonathan
Copy link

Hey Guys,

i'm currently trying to use the networt with coco_4_gpu on infering one image.

I'm inputting:
-jpg image with 1280x720
img = cv2.imread('00000001.jpg')
img = cv2.resize(img,(1280,720),interpolation=cv2.INTER_CUBIC)
img = img.transpose(2, 0, 1)
img_tensor = torch.from_numpy(img)
img_tensor = torch.unsqueeze(img_tensor,0).type(torch.FloatTensor).cuda()
img_info = np.array([[720, 1280, 3]])
data = {'data': img_tensor , 'img_info' : img_info}

When im running the model output i get:

88 fpn_p5_upsample = self.fpn_upsample(fpn_p5_1x1)
---> 89 fpn_p4_plus = fpn_p5_upsample + fpn_p4_1x1
90 fpn_p4_upsample = self.fpn_upsample(fpn_p4_plus)
91 fpn_p3_plus = fpn_p4_upsample + fpn_p3_1x1

RuntimeError: The size of tensor a (46) must match the size of tensor b (45) at non-singleton dimension 2

Whats the matter?

Im on Pytorch 1.4.

Kindest regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant