Comments (15)
Thank you @Amschel.
This problem also exists in the origin work: ZheC/Realtime_Multi-Person_Pose_Estimation#54. I'm wondering the reason caused that problem and I think to avoid that problem, put 0 is reasonable if the algorithm is unable to find a joint for at subject.
Thanks for your appreciation!
from pytorch_realtime_multi-person_pose_estimation.
Hi @tensorboy , @Amschel ,
I agree, putting 0 if the algorithm is unable to find a joint for a subject should fix it and will definetly fix the indexing problem, because if one takes the all_peaks var and try to take all the joints belonging to a certain subject it will take also some joints belonging to other subjects.
This is an example:
for i in range(len(subset)-1):
subtJoints = pd.DataFrame([d[i] for d in all_peaks])
print('Subject %d') %i
print(subtJoints[0], subtJoints[1])
it will print the coordinates of the joints for each subject in the image, but the problem is that it will also take some joints of other subjects, so it will mix few of them because of the indexing problem.
If you use the default picture from the project and try the code you'll see the problem.
Also I've noticed that for the default picture, for 2-3 of the 18 joints it creates another subject, but the joints belong to the subjects that already existed.
Thank you for your hard work!
Best regards!
liviust
from pytorch_realtime_multi-person_pose_estimation.
Thank you @liviust
I would like to figure out it today!
Best,
Wangpeng
from pytorch_realtime_multi-person_pose_estimation.
Hi, @Amschel , @liviust. The correspondingly MATLAB code is here:
Maybe these parts caused the problem in the python version:
% if find no partB in the subset, create a new subset
if num==0
subset = [subset; zeros(1,kpt_num)];
subset(end, indexB) = candB(i,4);
subset(end, end) = 1;
subset(end, end-1) = candB(i,3);
end
Thank you!
Wangpeng
from pytorch_realtime_multi-person_pose_estimation.
Thank you @liviust , I executed these code for the default picture:
"for i in range(len(subset)-1):
subtJoints = pd.DataFrame([d[i] for d in all_peaks])
print('Subject %d') %i
print(subtJoints[0], subtJoints[1])"
and it showed:
Subject 0
(0 615
1 616
2 580
3 545
4 283
5 648
6 654
7 657
8 610
9 620
10 619
11 651
12 340
13 294
14 606
15 621
16 593
17 626
Name: 0, dtype: int64, 0 33
1 75
2 87
3 123
4 167
5 72
6 120
7 159
8 197
9 280
10 363
11 193
12 277
13 344
14 30
15 30
16 34
17 31
Name: 1, dtype: int64)
Subject 1
(0 296
1 298
2 267
3 340
4 565
5 331
6 349
7 563
8 294
9 305
10 313
11 335
12 650
13 636
14 294
15 299
16 280
17 312
Name: 0, dtype: int64, 0 73
1 106
2 116
3 135
4 171
5 105
6 149
7 185
8 212
9 282
10 365
11 210
12 278
13 358
14 62
15 62
16 72
17 65
Name: 1, dtype: int64)
Subject 2
(0 475
1 457
2 414
3 253
4 74
5 502
6 535
7 93
8 438
9 74
10 117
11 457
12 104
13 161
14 462
15 486
16 434
17 75
Name: 0, dtype: int64, 0 91
1 136
2 136
3 162
4 343
5 135
6 182
7 354
8 322
9 347
10 404
11 314
12 341
13 407
14 78
15 76
16 88
17 269
Name: 1, dtype: int64)
Subject 3
(0 60
1 59
2 30
3 59
4 162
5 89
6 117
7 189
8 147
9 504
10 532
11 181
12 236
13 403
14 57
15 63
16 43
17 180
Name: 0, dtype: int64, 0 269
1 301
2 301
3 343
4 376
5 301
6 331
7 375
8 375
9 434
10 571
11 373
12 366
13 574
14 258
15 259
16 269
17 274
Name: 1, dtype: int64)
(BTW, I'm executed that code on my laptop, so only 0.5, 1. scale_search are used)
from pytorch_realtime_multi-person_pose_estimation.
Hi @tensorboy ,
Great! We have the same results. Let's take the subject 0 for example:
Subject 0
(0 615
1 616
2 580
3 545
4 283
5 648
6 654
7 657
8 610
9 620
10 619
11 651
12 340
13 294
14 606
15 621
16 593
17 626
Name: 0, dtype: int64, 0 33
1 75
2 87
3 123
4 167
5 72
6 120
7 159
8 197
9 280
10 363
11 193
12 277
13 344
14 30
15 30
16 34
17 31
Name: 1, dtype: int64)
If we open the image in matlab for example, and check the coordinates from the index 12 (340,277) we see that the joint belongs to another subject, not to subject 0. The same happens with the coordinates from the indexes 4 and 13. In the matlab version this doesn't happen.
Thank you!
liviust
from pytorch_realtime_multi-person_pose_estimation.
@tensorboy
This is the result of the bug in the python file (on this image it can be seen better)
Thank you!
liviust
from pytorch_realtime_multi-person_pose_estimation.
Yes, by executing:
i=2
img = cv2.imread('./sample_image/ski.jpg')
subtJoints = pd.DataFrame([d[i] for d in all_peaks])
print('Subject %d') %i
print(subtJoints[0], subtJoints[1])
for i in range(17):
cv2.circle(img, (subtJoints[0][i],subtJoints[1][i]), 4, (0,255,0), thickness=-1)
cv2.imwrite('a.png',img)
I got:
from pytorch_realtime_multi-person_pose_estimation.
@liviust, Your picture looks funny.
Thank you!
Wangpeng
from pytorch_realtime_multi-person_pose_estimation.
Hi @tensorboy ,
Do you have a fix for it?
from pytorch_realtime_multi-person_pose_estimation.
@liviust , I'm still debugging and try to fix it.
The example mentioned above is wrong, but the final result is right:
I found this part may useful:
for i in range(17):
for n in range(len(subset)):
index = subset[n][np.array(limbSeq[i])-1]
print index
if -1 in index:
continue
I believe "if -1 in index" will help!
Thanks!
from pytorch_realtime_multi-person_pose_estimation.
Hi @tensorboy ,
Yes, it fixed the problem for that instance:
I will test the code with more images and report the results.
Hopefully, we can find a fix for the problem with the coordinates aswell.
Thank you!
from pytorch_realtime_multi-person_pose_estimation.
Haha, That's awesome!!
from pytorch_realtime_multi-person_pose_estimation.
Hi @tensorboy
Did you find any solution to get the right coordinates per subject?
Thank you!
from pytorch_realtime_multi-person_pose_estimation.
Hi @liviust ,
I'm reading the part about data augmentation now. Want to fix that in the coordinates level in the future.
Thank you,
Wangpeng
from pytorch_realtime_multi-person_pose_estimation.
Related Issues (20)
- no results on own datasets test HOT 3
- mystical memory cost issues
- Hello,where is “slim”? HOT 1
- Some questions about training?
- ImportError: DLL load failed while importing _pafprocess HOT 9
- model from 'rtpose' link cannot archieved a good performance
- Runs very slow on ubuntu 20.04
- 去掉隐藏点训练为啥效果很差
- Cannot open the dropbox HOT 1
- Same results as openpose demo?
- The following error occurred when I tested my trained model. HOT 4
- Is there any post-processing code for C++
- Loss nan
- In the demo code, update the lines to load the model as below:
- how to get multi person heatmaps/confidence maps
- How can the model achieve real-time?
- 您好,请问您有保存最后的optimizer的dict吗
- who can share pretrained model?
- Can I get openpose.pkl file?
- How to training base on MobileNetV2?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch_realtime_multi-person_pose_estimation.