hikopensource / DAVAR-Lab-OCR

OCR toolbox from Davar-Lab
Apache License 2.0
733 stars 157 forks source link

LGPMA - Global segmentation branch #142

Open smeetpatelmai opened 1 year ago

smeetpatelmai commented 1 year ago

I went through the LGPMA research paper and found the idea pretty interesting. However, I had some questions on going through the code a bit more closely.

I found that global segmentation branch results are never used to rescore LPMA branch results or fine tune the aligned bounding boxes. Only the local segmentation branch results are used to refine aligned bounding boxes. I tested the code using test_pub.py script where:

  1. In lgpma_base.py, I set refine_bboxes=True.
  2. In lgpma.py, line 167 appends the global segmentation result to the results list. However, in post_lgpma.py, line 336 never passes global segmentation results to softmasks_refine_bboxes().

This leads me to the question: Is global segmentation based refinement a missing feature or it turns out to provide better results without it?

I would really appreciate your feedback on the same.

qiaoliang6 commented 1 year ago

Yes, it is a little bit different from the previous implementation, mainly because we found that after removing this part of the participation, the performance impact is not very big, and the reasoning time can be improved a lot, so we removed this part. (The global branch is mainly used to provide feature support during training).

More details please refer to #27.