GengDavid / pytorch-cpn

A PyTorch re-implementation of CPN (Cascaded Pyramid Network for Multi-Person Pose Estimation)
GNU General Public License v3.0
484 stars 98 forks source link

Color Normalization Issue #10

Closed mingloo closed 6 years ago

mingloo commented 6 years ago

Hi @GengDavid,

I've found the self.pixel_means is changed in every iteration when calling getitem due to modification of mean variable in color_normalize function. As a result, our expected color normalization will not take effect after several samples iterations because the mean value decreases to [0, 0, 0].

This issue infects both training and testing phase.

See detailed printed log below:

checking pixel means init: [122.7717 115.9465 102.9801] => loaded checkpoint 'checkpoint/epoch32checkpoint.pth.tar' (epoch 32) testing... checking pixel means getitem: [122.7717 115.9465 102.9801] checking pixel means getitem: [0.48145765 0.45469216 0.40384353] checking pixel means getitem: [0.00188807 0.00178311 0.0015837 ] checking pixel means getitem: [7.40419296e-06 6.99257450e-06 6.21058869e-06] checking pixel means getitem: [2.90360508e-08 2.74218608e-08 2.43552498e-08]

Please help to double check it.

mingloo commented 6 years ago

Please help to review this PR https://github.com/GengDavid/pytorch-cpn/pull/9

GengDavid commented 6 years ago

I have merge your PR and update the models. Thanks again.