bmartacho / UniPose

We propose UniPose, a unified framework for human pose estimation, based on our “Waterfall” Atrous Spatial Pooling architecture, that achieves state-of-art-results on several pose estimation metrics. Current pose estimation methods utilizing standard CNN architectures heavily rely on statistical postprocessing or predefined anchor poses for joint localization. UniPose incorporates contextual seg- mentation and joint localization to estimate the human pose in a single stage, with high accuracy, without relying on statistical postprocessing methods. The Waterfall module in UniPose leverages the efficiency of progressive filter- ing in the cascade architecture, while maintaining multi- scale fields-of-view comparable to spatial pyramid config- urations. Additionally, our method is extended to UniPose- LSTM for multi-frame processing and achieves state-of-the- art results for temporal pose estimation in Video. Our re- sults on multiple datasets demonstrate that UniPose, with a ResNet backbone and Waterfall module, is a robust and efficient architecture for pose estimation obtaining state-of- the-art results in single person pose detection for both sin- gle images and videos.
Other
211 stars 44 forks source link

Pre-trained weight on the unipose_mpii predictions looks bad #40

Open mukeshnarendran7 opened 2 years ago

mukeshnarendran7 commented 2 years ago

Have loaded the pre-trained weights and made some predictions with the unipose modeland the predictions looks off

criterion   = torch.nn.MSELoss()
optimizer   = torch.optim.Adam(model.parameters(), lr=1e-3)
model = unipose(dataset="MPII",backbone='resnet', output_stride=16)

load weights of the model

model.load_state_dict(torch.load("/content/UniPose_MPII.pth",map_location='cpu'))
model.eval()
trfm = transforms.Compose(
                          [
                          transforms.ToTensor()                                      
                          ]
                          )
DEVICE     = "cuda" if torch.cuda.is_available() else "cpu"
img = cv2.resize(cv2.imread("/content/fed.jpg"), (513, 513))
img2 = trfm(img)[None].to(DEVICE, dtype=torch.float)

model.eval()
hmp = model(img2)

image