table-transformer icon indicating copy to clipboard operation
table-transformer copied to clipboard

issue with package_area = package_rect.get_area() when adding --words_dir arg

Open AymenDoc opened this issue 1 year ago • 1 comments

I attempted to incorporate the --words_dir argument for cell recognition. However, I encountered an issue within the "slot_into_containers" function while calculating the area of a rectangle.

My package_rect is defined as follows, but I'm getting a package_area value of 0 at this line: package_area = package_rect.get_area() The Rect(95.99999451586913, 383.89018184350584, 98.0000028239502, 374.8903775869141)

AymenDoc avatar Aug 25 '23 14:08 AymenDoc

Hi,

Since Rect is in the form (x0, y0, x1, y1), in your case we would have y0 > y1, which means technically the box has negative area. Is this bad Rect coming from one of the words in your words data?

Best, Brandon

bsmock avatar Sep 01 '23 00:09 bsmock