-
Notifications
You must be signed in to change notification settings - Fork 201
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
added evaluation script for PPHumanSeg model #130
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contribution! Please, take a look at the comments below.
@labeeb-7z Thanks for your contribution! Could you add the evaluation results of Results of accuracy evaluation with tools/eval.
*: 'quant' stands for 'quantized'. |
@WanliZhong here's the output I got for quantized model : |
There is too much loss of accuracy in the quantized model and we need to consider re-quantizing the model. Thank you for the evaluation script! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments below. I will have a check on the implementation of the evaluation metric later.
@fengyuentau For more reference on the evaluation metric you can have a look at the metrics module of PaddleSeg which is used by the evaluation script of PaddleSeg I linked in PR description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the official evaluation script and the mIoU of the model should be 0.8602. I found there are many differences between your implementation and the official evaluation script. Below are some differences I found.
I am not saying you have to follow the official implementation completely but just make sure it is correct. If you cannot ensure correctness, it will save a lot of time.
I've moved the *_all variables outside the loop (apologies for that). As for ignoring index and adding 1, I've tried to followed the PaddleSeg implementation. And for the one_hot vectors, again I have implemented the one_hot function of PaddleSeg and followed their evaluation script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update! Lets try to reproduce the exact mIoU number.
pbar.set_description( | ||
"Evaluating {} with {} val set".format(model.name, self.name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines should be placed outside the for loop since the description does not need to be updated every single iteration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was referred from eval script of icdar.
I've changed it for this script, should I also change it for icdar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed it for this script, should I also change it for icdar?
Not in this pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good 👍 We can merge this pull request after the comments below are resolved.
@fengyuentau I've made the suggested changes, Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contribution! 👍
* added evaluation script for PPHumanSeg * added quantized model, renamed dataset * minor spacing changes * moved _all variables outside loop and updated accuracy * removed printing for class accuracy and IoU * added 2 transforms * evaluation done on same size tensor as input size with mIoU 0.9085 * final changes * added mIoU and reference
This PR is meant to add an evaluation script for the PP Human segmentation model present in the zoo as mentioned in this issue #119 .
I referred to the val script used by PaddleSeg which can be found here and here and implemented the evaluation script for PPHumanSeg in the method other evaluation scripts on zoo are written.
This is the ouput I'm getting after running the evaluation script :
Let me know if this PR can be improved further. Thanks!