-
Notifications
You must be signed in to change notification settings - Fork 23
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
Inference on PyTorch Backend not work #50
Comments
what is the version of your installed torchlm? check it: print(torchlm.__version__) |
the version is 0.1.6.8 |
can you upload your test image? I need it to reproduce your error. |
DefTruth
added a commit
that referenced
this issue
Mar 28, 2022
DefTruth
added a commit
that referenced
this issue
Mar 28, 2022
fix(inference): fixed inference error on Pytorch Backend. (#50)
fixed ~ you can try the latest version v0.1.6.9 pip uninstall torchlm
pip install torchlm>=0.1.6.9 test demo: device = "cpu"
img_path = "./assets/pipnet0.jpg"
save_path = "./logs/pipnet0_300w.jpg"
checkpoint = "./pretrained/pipnet/pipnet_resnet101_10x68x32x256_300w.pth"
image = cv2.imread(img_path)
torchlm.runtime.bind(faceboxesv2())
torchlm.runtime.bind(
pipnet(
backbone="resnet101",
pretrained=True,
num_nb=10,
num_lms=68,
net_stride=32,
input_size=256,
meanface_type="300w",
backbone_pretrained=False,
map_location=device,
checkpoint=checkpoint
)
)
landmarks, bboxes = torchlm.runtime.forward(image)
image = torchlm.utils.draw_bboxes(image, bboxes=bboxes)
image = torchlm.utils.draw_landmarks(image, landmarks=landmarks)
cv2.imwrite(save_path, image) you can set |
DefTruth
added a commit
that referenced
this issue
Mar 28, 2022
DefTruth
added a commit
that referenced
this issue
Mar 28, 2022
fix(inference): fixed inference error on Pytorch Backend. (#50)
Work perfectly! Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I tested the interface code for predict landmarks by using 300W pretrained weights like these:
when I run the forward code:
I got the error of
Could you help me with this, thx!
The text was updated successfully, but these errors were encountered: