opencv_zoo
opencv_zoo copied to clipboard
Text Detection: add ppocr-v2 detect -WIP
- [x] add demo
- [x] add example in readme
Hi @the-star-sea. Since in OpenCV the DB
has been supported by High-Level API, can you provide more speed and accuracy test data for DB and proposed ppocr?
Hi @the-star-sea. Since in OpenCV the
DB
has been supported by High-Level API, can you provide more speed and accuracy test data for DB and proposed ppocr?
ok.I will do it
@the-star-sea the ppocr's speed is super fast. two questions:
- Are the pre-process and the post-process of ppocr's the same as the DB net?
- Is there accuracy test result?
@the-star-sea the ppocr's speed is super fast. two questions:
- Are the pre-process and the post-process of ppocr's the same as the DB net?
- Is there accuracy test result?
1.almost the same
2.
Thank you @the-star-sea! The accuracy result is good. Which validation data are used? How many data it has?
icdar2015.500 imgs.
Thanks for the clarification. The DB model
has hidded the post-process in the high level api, some thing like the following:
model = cv.dnn_TextDetectionModel_DB(
cv.dnn.readNet(self._modelPath)
)
# time start
model.detect(image)
# time stop
In order to get a fair speed comparison result, how did you test the speed of ppocr?
I write the config file in benchmark and add function support in ppdetect.It just tests the speed of infering onnx model. Besides.the onnx filesize of ppdetect is 2284 while DB is 47628.
47628
That's a great answer. Thanks! Can we re-use the High-Level API of DB for PPocr with no change or little change?
model = cv.dnn_TextDetectionModel_DB(
cv.dnn.readNet(modelPath_ppocr)
)
model.detect(image)
I think there need some changes because ppocr doesnot need polygon threhold.I will do it.
@the-star-sea Please keep one in the mobile and normal models, as we discussed before, to avoid confusing users.
@the-star-sea Please keep one in the mobile and normal models, as we discussed before, to avoid confusing users.
ok.I will do it
I suggest we remove DB from opencv_zoo after this pull request is merged.
Hi @fengyuentau, how about leaving it to the next PR to remove DB
model, because we have a lot of speed tests based on the DB
model. In addition, the high-level API based ppocr
model has not been completed and is expected to be completed by the end of September.
Sure, thats exactly what I meant. Just want to emphasize this plan.
@zihaomu Please update benchmark results on this model.
@zihaomu Please update benchmark results on this model.
Hi, @fengyuentau the benchmark results will be updated at PR #73, the student will complete it in the near future.
When we add or update a model in opencv zoo, we always update the average forward latency in the same pull request.
Ok, let's wait.
We dont need to wait for #73 as it is for accuracy. At least we need the speed of this model to merge a pull request of adding or updating a model.
After this PR is merged, PP-OCR_v3 can be supported and loaded with high-level API. And I think we can only put PP-OCR_v3 in opencv_zoo
since it has better accuracy.
@zihaomu Anything else is blocking this PR from merge?
Update: we need to merge with benchmark results. Could you run benchmarking with this model? @zihaomu
@zihaomu Anything else is blocking this PR from merge?
Update: we need to merge with benchmark results. Could you run benchmarking with this model? @zihaomu
This PR should be closed after the OpenCV support new DB API, since new DB API support pp-ocr V3 and V2.
This PR should be closed
Didn't we agree on adding this model (pp-ocr) in place of db? Why are we closing this PR?
We can directly support ppocr-DB v2 and v3 at new API.