Conversation
add benchmark for Net 8.0 add more test images
sdcb
left a comment
There was a problem hiding this comment.
Overall speaking, thanks for you PR again, it's really a promising performance improvement result even if you added padding manually, but I requested a few changes, can you check.
|
I agreed that we can use the method of ResizePadding resize and pad image to maxWidth directly in previous code, but I believe the StackingVertically method should keeps the same behavior of not constraint the input |
|
hi @sdcb |
|
@AvenSun Hi AvenSun, I created a branch and did some necessary work that I believe, can you merge my upstream https://github.com/sdcb/OpenVINO.NET/tree/mat-ext branch into your PR's branch? After that, I'll go ahead and merge this PR. |
|
hi @sdcb |
|
Thanks, merged. |
hi @sdcb
sorry for that I didn't noticed they have variety size in last PR.
I thought they already have the same size after padding and resize.
I looked into your implementation of PaddleOcrRecognizer.
OpenVINO.NET/projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR/PaddleOcrRecognizer.cs
Lines 129 to 144 in 6b99f89
the input of model must have the same shape in one batch.
I think you have no doubt about this.
It should be like the image below after invoked the method PrepareAndStackImages.
four images stack
Am I right? Here's my question.
the implementation of PrepareAndStackImages invoked the method ResizePadding
why not the method of ResizePadding resize and pad image to maxWidth directly?
then we can invoke VConcat immediately.
OpenVINO.NET/projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR/PaddleOcrRecognizer.cs
Lines 208 to 239 in 6b99f89
according to what you mentioned in last PR (#5) , I made this new PR ,
It fixs all problem, you can take a look.
I confirmed It keeps exactly the same OCR result compared with your commit (same input and same model).
meanwhile we also can get some improvement as shown below.