YuliangXiu / MobilePose

Light-weight Single Person Pose Estimator
http://xiuyuliang.cn
632 stars 148 forks source link

Converting model to CoreML #23

Open MetaDev opened 5 years ago

MetaDev commented 5 years ago

I would like to convert the model to CoreML to use it on the iPhone. But the DSNTNN layer is not supported because of its flip and linspace pytroch operands. Would it be possible to implement those operands in a different way, as such that it does convert? I am also looking to implement a similar layer to do coordinate and heatmap based regression, as in https://github.com/JimmySuen/integral-human-pose. These models are compatible with CoreML.

Russzheng commented 5 years ago

Hey, I am trying to convert it to coreml as well, any progress on your end?

YuliangXiu commented 5 years ago

I do not have a lot of time working on this... Please send a pull request if you convert it to CoreML successfully. Many Thanks

MetaDev commented 5 years ago

Hey, I am trying to convert it to coreml as well, any progress on your end?

I went to the DSNTNN repo. There was suggested I can convert the model without the final DSNTNN layer, as this layer basically doesn't have any weights. You would have to implement that layer in objective c or swift though. I will let you know once I have something running, should be doable.

YuliangXiu commented 5 years ago

wait for your good news! @MetaDev

Russzheng commented 5 years ago

Hey, I am trying to convert it to coreml as well, any progress on your end?

I went to the DSNTNN repo. There was suggested I can convert the model without the final DSNTNN layer, as this layer basically doesn't have any weights. You would have to implement that layer in objective c or swift though. I will let you once I have something running, should be doable.

Sounds great, our team don't wanna write custom layers, we are training from scratch now. Basically swapping OpenPose's VGG blocks with Shufflenet-like blocks.