MEBOW
MEBOW copied to clipboard
About inference on single image
Hi, I am trying to write a demo to inference on a single image, I use the follwing code:
- img = Image.open(img_path) img = data_transform(img) img = torch.unsqueeze(img, dim=0) when i tried to see the output with:
- model(img) I have the following bug:
- RuntimeError: The size of tensor a (107) must match the size of tensor b (108) at non-singleton dimension 3 do you know why do I have this problem? Thanks.
uh, I have figured out the problem, i have to resize my input image according to my config file
well, I have a new question, what if the test image contains more than one person? how to get the predict classes for both of them?
Hi @Wjt0403 can u tell me how you perform the data_transform