qijiezhao / pseudo-3d-pytorch

pytorch version of pseudo-3d-residual-networks(P-3D), pretrained model is supported
MIT License
451 stars 113 forks source link

About Image transform #31

Open wanxinzzz opened 4 years ago

wanxinzzz commented 4 years ago

Hello! I tried to use your released p3d pytorch model. But i got a wrong result, every class got a low score under 0.01. Is it my way to transform image into tensor result in this?

model = P3D199(pretrained=True)
model = model.eval().to(device)

transforms = Compose([Resize(160), CenterCrop(160), ToTensor(),
             Normalize(mean=(0.485,0.456,0.406),std=(0.229, 0.224, 0.255),inplace=True)])

clip = [transforms(img) for img in clip] # 16 frames
clip = torch.stack(clip, 0).permute(1, 0, 2, 3).unsqueeze(0).to(device)

out=model(clip)

Thank you for your advice

fabiozappo commented 4 years ago

Hi! Did you solve your problem? If yes, how?

wanxinzzz commented 4 years ago

Hi! Did you solve your problem? If yes, how?

No, I use another repository

fabiozappo commented 4 years ago

Can I have the link?

Il gio 27 feb 2020, 11:39 万昕 notifications@github.com ha scritto:

Hi! Did you solve your problem? If yes, how?

No, I use another repository

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/qijiezhao/pseudo-3d-pytorch/issues/31?email_source=notifications&email_token=ALCKVNRPVCG5QT4TAJB7RCTRE6J5HA5CNFSM4IZC6IF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEND3DWI#issuecomment-591901145, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCKVNVGOKYFOJGOHDE5CALRE6J5HANCNFSM4IZC6IFQ .

wanxinzzz commented 4 years ago

Can I have the link? Il gio 27 feb 2020, 11:39 万昕 notifications@github.com ha scritto: Hi! Did you solve your problem? If yes, how? No, I use another repository — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#31?email_source=notifications&email_token=ALCKVNRPVCG5QT4TAJB7RCTRE6J5HA5CNFSM4IZC6IF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEND3DWI#issuecomment-591901145>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCKVNVGOKYFOJGOHDE5CALRE6J5HANCNFSM4IZC6IFQ .

I use 3d-resnet or 3d-resnext

cvnovice95 commented 4 years ago

I have also some problem, who can help me?