You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been working on converting Alphapose (the model which contributors have developed for X86 devices at #113) to onnx and tensorRT.
I will send a PR after finishing it. here I wanna share my experience with this procedure.
I tried to convert a Pytorch-based model of HRnet net (one of the available backbones of Alphapose) to Onnx but the path was not straightforward to me.
First of all, I use Pytorch version 1.1.0 for exporting the onnx model but the version was buggy and I faced several errors. after trying some versions of PyTorch finally the below versions worked for me.
`
torch==1.5.1
torchvision==0.6.1
//Expporting parameters
pose_model.load_state_dict(torch.load(MODEL.pt, map_location=map_location))
dummy_input = torch.randn(1, 3, 256, 192, requires_grad=True).cuda()
torch.onnx.export(pose_model, dummy_input, "alphapose.onnx", export_params=True, opset_version=11)
`
Next step, I will check the onnx model results and compare them to the x86 model result in order to make sure that the onnx model is exported successfully.
I will update the procedure here.
please feel free to ask for more details if you need them.
The text was updated successfully, but these errors were encountered:
Alphapose estimator is converted to TRT and tested on jetson-tx2 (10-12 fps on jetson-tx2 with 2 people on average at each frame)
The source code is available here.
Hi, I've been working on converting Alphapose (the model which contributors have developed for X86 devices at #113) to onnx and tensorRT.
I will send a PR after finishing it. here I wanna share my experience with this procedure.
I tried to convert a Pytorch-based model of HRnet net (one of the available backbones of Alphapose) to Onnx but the path was not straightforward to me.
First of all, I use Pytorch version 1.1.0 for exporting the onnx model but the version was buggy and I faced several errors. after trying some versions of PyTorch finally the below versions worked for me.
`
torch==1.5.1
torchvision==0.6.1
//Expporting parameters
pose_model.load_state_dict(torch.load(MODEL.pt, map_location=map_location))
dummy_input = torch.randn(1, 3, 256, 192, requires_grad=True).cuda()
torch.onnx.export(pose_model, dummy_input, "alphapose.onnx", export_params=True, opset_version=11)
`
Next step, I will check the onnx model results and compare them to the x86 model result in order to make sure that the onnx model is exported successfully.
I will update the procedure here.
please feel free to ask for more details if you need them.
The text was updated successfully, but these errors were encountered: