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

Pre-trained HyperPose models (.npz) for the new Tensorflow 2 Implementation #297

Closed
carlosh93 opened this issue Aug 10, 2020 · 9 comments
Closed
Assignees

Comments

@carlosh93
Copy link

carlosh93 commented Aug 10, 2020

Hello. Thank you very much for this amazing project, and thank you for the efforts to upgrade Hyperpose to Tensorflow 2. In my actual project, I only need the pre-trained openpose model; however, as mentioned in this issue #291, the trained models uploaded here are not compatible with the new version of Hyperpose. Therefore, I would like to ask if you could please upload the newly trained models compatible with TF2? At least I need the original openpose trained model.

On the other hand, I started to train the model in my GPU-limited PC, and I am observing something strange.

image

The L2_loss of the model started in approximately 2.12. Then it decreases until approximately 1.75 but suddenly (nearly the 50.000 iterations) it started to increase, and now it is around 2.68. I used the following configuration:

  • model_type: Openpose
  • model_backbone: Default
  • dataset_type: MSCOCO
  • train_type: single_train
  • learning_rate: 4e-5
  • kf_optimizer: Sync_avg

It is basically the same configuration provided here

In summary, I would like to know if this behavior is normal since I am using the configuration provided in the Config folder (it is loaded by default). Also, if you (or anybody in this great community :) ) could please provide the trained models for the new TF2 implementation, it could be awesome. Thank you in advance!

@Gyx-One
Copy link
Contributor

Gyx-One commented Aug 12, 2020

Hello!
Thanks for using our library, @carlosh93
1.Is this normal for l2-loss to increase here?:
Sorry, the loss message may be confusing, here the l2-loss is actually the L2 regulerization loss of model parameters which make constrain to the complexity of the model, rather than the conf_map and paf_map l2-loss that calculated to generate more accurate detection. So this regulerization loss decrease at first because the initialized model paramter need to be optimized to a certain distribution to start working, then after a period training, the model tend to be overfitting, so the regulerization loss become larger to put further constrain to the trained model parameters to avoid overfitting.
So, generally, it's normal to have this l2-loss change.
In the coming commitment(very soon), I already modified loss messages to be more specific(including conf loss,paf loss and the mentioned re-loss to avoid confusing), and add APIs to set log interval to show the averaged loss in the whole interval to make the training process more easy to understand :).

2.Release the npz models
Sorry to let thre pretrained model issue to brother you!
I haven't upload the pretrained openpose npz model yet because its accuracy doesn't reach my expectation, but I have been working on it for a week and the job will finish soon :).
the lightweight openpose model is accurate now(meet the paper's description), before I upload the openpose model, I'll upload that, maybe you can try that first :)

@Gyx-One Gyx-One self-assigned this Aug 12, 2020
@carlosh93
Copy link
Author

Thank you, @Gyx-One, for your response. Ok, so it is normal such behavior of the L2 loss. I will try to train the model with the computational resources I have, but I will really appreciate if you could share any of the npz model (even the lightweight openpose model) to try out on my project. Thank you again for this project, and I will look forward to any update regarding the pre-trained models.

@Gyx-One
Copy link
Contributor

Gyx-One commented Aug 16, 2020

Yes, @carlosh93 , the behavor of L2 loss is normal.
And the lightweight openpose model (evaluation result mAP 40.0 over MSCOCO dataset, model_type=LightweightOpenpose model_backbone=Resnet50) is already upload to the model zoo(filename=hyperposev2_lightweight_openpose_resnet50.npz),Openpose is coming soon, wait for our good news! :)

@ganler
Copy link
Contributor

ganler commented Aug 16, 2020

@carlosh93 We are uploading all models of all formats to the google drive. You can get the npz model in the npz folder.

@carlosh93
Copy link
Author

@Gyx-One, @ganler those are excellent news, thank you so much!

@ganler
Copy link
Contributor

ganler commented Aug 18, 2020

Closed. Feel free to reopen it if new troubles occur. :-)

@ganler ganler closed this as completed Aug 18, 2020
@rajat-008
Copy link

@carlosh93 We are uploading all models of all formats to the google drive. You can get the npz model in the npz folder.

Thanks for sharing the models
Btw we were running the infer.py file and specified Resnet50_backbone for the backbone for the resnet50 lightweight model
But this throws an error at load_weights saying input shapes are incompatible
Please help me with this
Also how do I load the .pb or any other formats' model using the infer.py script?

@ganler
Copy link
Contributor

ganler commented Aug 24, 2020

@Gyx-One Could add some details on how to use pre-trained models on the Python training side?

@bhumikasinghrk
Copy link

hey @rajat-008 ,
Have you find a solution to the problem where it says input shapes are incompatible, I am also facing the same issue. I'll be thankful if you could help me with this.

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

5 participants