fire717 / movenet.pytorch

A Pytorch implementation of MoveNet from Google. Include training code and pre-trained model.
MIT License
374 stars 87 forks source link

About post processing of multipose #5

Open liamsun2019 opened 2 years ago

liamsun2019 commented 2 years ago

fire老兄,请问你了解multipose的后处理吗?通过观察官方的multipose模型,看起来后处理跟singlepose颇有不同,不过有一些细节还不是很明白。

fire717 commented 2 years ago

我当时复现的时候好像还没有multipose,后面也没有关注了。

大概看了下hub的说明 `Outputs A float32 tensor of shape [1, 6, 56].

The first dimension is the batch dimension, which is always equal to 1. The second dimension corresponds to the maximum number of instance detections. The model can detect up to 6 people in the image frame simultaneously. The third dimension represents the predicted bounding box/keypoint locations and scores. The first 17 * 3 elements are the keypoint locations and scores in the format: [y_0, x_0, s_0, y_1, x_1, s_1, …, y_16, x_16, s_16], where y_i, x_i, s_i are the yx-coordinates (normalized to image frame, e.g. range in [0.0, 1.0]) and confidence scores of the i-th joint correspondingly. The order of the 17 keypoint joints is: [nose, left eye, right eye, left ear, right ear, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, right ankle]. The remaining 5 elements [ymin, xmin, ymax, xmax, score] represent the region of the bounding box (in normalized coordinates) and the confidence score of the instance.`

我猜测应该跟singlepose一样的,而它支持最多6人,因此对于singlepose修改应该就是取一个中心的heatmap变成取六个中心的,其余操作应该类似,根据这6个中心去找对应的关键点进行分组。

因为任务复杂了,所以模型的输入尺寸、 depth multiplier都相应增大了。

liamsun2019 commented 2 years ago

谢谢。这些信息我之前看过,也测试过官方的multipose模型。另外,也修改了代码,Multipose已经可以训练起来。不过,后处理的部分,通过netron观察,跟singlepose不太一样,并不是取出6个点(center的index,需要先做Maxpool,再做topK=6的处理),然后每个点和singlepose相同处理。我这样试验过,效果比官方模型差。主要是netron中看到的一些操作,比较难跟实际的op对应起来。我再研究看看。

LIUTAOGE commented 2 years ago

请问下怎么修改可以训练multipose,有开源代码吗,谢谢

LIUTAOGE commented 2 years ago

谢谢。这些信息我之前看过,也测试过官方的multipose模型。另外,也修改了代码,Multipose已经可以训练起来。不过,后处理的部分,通过netron观察,跟singlepose不太一样,并不是取出6个点(center的index,需要先做Maxpool,再做topK=6的处理),然后每个点和singlepose相同处理。我这样试验过,效果比官方模型差。主要是netron中看到的一些操作,比较难跟实际的op对应起来。我再研究看看。

请问有开源代码吗,谢谢!

liamsun2019 commented 2 years ago

目前应该还没有开源的代码,连singlepose的训练代码都没有开源。

LIUTAOGE commented 2 years ago

目前应该还没有开源的代码,连singlepose的训练代码都没有开源。

请问在fire717基础上去修改成多人训练,只需要修改后处理这块吗,我看您已经修改好了,代码能发我一份学习下,谢谢。974549230@qq.com

bigliuyq commented 1 year ago

目前应该还没有开源的代码,连singlepose的训练代码都没有开源。

请问在fire717基础上去修改成多人训练,只需要修改后处理这块吗,我看您已经修改好了,代码能发我一份学习下,谢谢。974549230@qq.com

你好,请问能分享一下代码吗,学习用,感谢,yqliusmu@163.com