waldo-seg / waldo

image-segmentation and text-localization
Apache License 2.0
13 stars 13 forks source link

scoring for madcat text localization #56

Closed aarora8 closed 6 years ago

aarora8 commented 6 years ago

ok thanks, i will do it.

danpovey commented 6 years ago

Merged, to keep things moving. Let us know what metric values you are seeing.

aarora8 commented 6 years ago

ok, thanks.

danpovey commented 6 years ago

Actually, for Madcat scoring, since our ultimate goal is to do OCR, we will have to compute the MARs from the detected regions. So there is no harm in doing scoring after finding the MARs.

If your task is more like dsb2018, it's possible that how Yiwen did it makes sense (I didn't look at that).

On Wed, May 30, 2018 at 3:47 PM, Ashish Arora notifications@github.com wrote:

@aarora8 commented on this pull request.

In egs/madcat_arabic/v1/scoring/scoring_utils.py https://github.com/waldo-seg/waldo/pull/56#discussion_r191899706:

  • matched_sum += det_matched
  • num_global_care_gt += num_gt_care
  • num_global_care_det += num_det_care +def _get_intersection_over_union(hyp, ref):
  • """returns iou value of two polygons
  • """
  • try:
  • intersection = _get_intersection(hyp, ref)
  • union = _get_union(hyp, ref)

ok thanks, i will do it.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/waldo-seg/waldo/pull/56#discussion_r191899706, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJVuxZdiUs8By36O8PNHwTIr3CNGNIyks5t3vdKgaJpZM4UPNDH .

aarora8 commented 6 years ago

Ok, thanks. To find MAR from predicted mask, should we assume every predicted pixel in an object as a point and run find MAR from these points.

YiwenShaoStephen commented 6 years ago

For MARs, since its rectangle, there must be a faster algorithm than comparing run-length encoding results. You can only use 4 coordinates to represent an object so the best algorithm should not exceed O(4).

danpovey commented 6 years ago

You could certainly do that. Or limit it to boundary or convex-hull points for efficiency. Or maybe initially boundary points, then call that function you were using to find the convex hull. Or maybe that algorithm that finds the convex hull is already fast enough.

Yiwen: Ashish already has code to fairly efficiently find the MAR. But we do need to process the input data somehow, so O(4) might not be realistic given that we have to read a much larger input.

On Wed, May 30, 2018 at 4:12 PM, Ashish Arora notifications@github.com wrote:

Ok, thanks. To find MAR from predicted mask, should we assume every predicted pixel in an object as a point and run find MAR from these points.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/waldo-seg/waldo/pull/56#issuecomment-393302058, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJVuw-pvAt9I7k_6yMeEXsUz5r-nd0dks5t3v03gaJpZM4UPNDH .

aarora8 commented 6 years ago

ok, thanks. I will do it.