Skip to content
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

models/preresnet.py question #18

Closed
sydney0zq opened this issue Sep 24, 2017 · 5 comments
Closed

models/preresnet.py question #18

sydney0zq opened this issue Sep 24, 2017 · 5 comments

Comments

@sydney0zq
Copy link

Hey, I am reading your code recently. But I found in models/preresnet.py:

def preresnet56(**kwargs):
    model = PreResNet(Bottleneck, [9, 9, 9], **kwargs)

As I know, your code of Bottleneck class implements three conv layers, so it should be 9*3*3+2=83, but you give it 9*2*3+2=56.

I don't actually which one is wrong, could you just check this class?
Thanks.

@bearpaw
Copy link
Owner

bearpaw commented Sep 25, 2017

@sydney0zq Yes you're right. The first conv should also be counted. Thus the total number of layers should be 9*3*3 + 3 = 84.

BTW, preresnet.py was just used for debugging at the beginning. It has never been evaluated for human pose estimation. You should try the hourglass model instead.

@sydney0zq
Copy link
Author

@bearpaw
Thanks for your check.
And another question in models/hourglass.py. It may be not an issue, the origin code in Lua puzzles me a lot.

I made several trials on this hourglass. Hourglass._make_hour_glass actually construct a model which may be like:

When I set depth=1, one time of Upsampling and Downsampling operation will be forwarded. So it means that depth controls the Upsampling and Downsampling times?

I am just a novice of pose-estimation, so thanks a lot.

@bearpaw
Copy link
Owner

bearpaw commented Sep 25, 2017

Yes. The 64x64 feature maps will be down sampled by 2^depth times and then upsampled to the original resolution (64x64).

@sydney0zq
Copy link
Author

Hey, thanks for your patience.

But, hmmmmmm, I still have some points that I could not understand. Weeeeell, one more question
in eval_PCKh.m

% 0  - r ankle, 1 - r knee, 2 - r hip, 3 - l hip, 4 - l knee, 
% 5  - l ankle, 6 - pelvis, 7 - thorax, 8 - upper neck, 9 - head top, 
% 10 - r wrist, 11 - r elbow, 12 - r shoulder, 13 - l shoulder, 
% 14 - l elbow, 15 - l wrist
pa = [2, 3, 7, 7, 4, 5, 8, 9, 10, 0, 12, 13, 8, 8, 14, 15];

in showskeletons_joints.m:

            for child = 1:p_no
                if pa(child) == 0  % removed pa == 1, I think unnecessary 
                    continue;
                end
                x1 = x(pa(child));
                y1 = y(pa(child));
                x2 = x(child);
                y2 = y(child);
                
                plot(x1, y1, 'o', 'color', partcolor{child}, ... 
                    'MarkerSize', msize, 'MarkerFaceColor', partcolor{child});
                plot(x2, y2, 'o', 'color', partcolor{child}, ...
                    'MarkerSize', msize, 'MarkerFaceColor', partcolor{child});
                line([x1 x2], [y1, y2], 'color', partcolor{child}, 'linewidth', round(msize/2));
            end

What pa corrsponds for?

e.g. When we use pa(i), we take the pair joint of i? If it is, then upper neck may have two pairs, one for the head and the other for the thorax. Could you explain some mechanism about it?

Thanks again.

@bearpaw
Copy link
Owner

bearpaw commented Jan 26, 2018

pa means the parent node of the current node. It determines which two body joints should be linked.

@bearpaw bearpaw closed this as completed Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants