-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/improve chipper bounding boxes (#292)
Chipper bounding boxes largely exceed the area where the annotated text is. This PR intends solving this problem. There are several fixes applied: * Improved cross attention processing. Maps are filtered at the head level, which is normalised [0-1], this improves the bounding box definition. * The correlation between the token index and cross attention map has been resolved. Before, with beam search size = 1 or 3 there were cases in which the cross attention map did not match the token being processed. In addition, the empty areas of the bounding boxes have been cleaned and the overlaps between bounding boxes are resolved by identifying the largest margin that separates both bounding boxes, identified as the largest gap without text either in the horizontal or vertical directions. Note: overlapping bounding boxes for child elements are not resolved for now. In the case of a list with list items, the list element will be affected by the overlapping resolution code. --------- Co-authored-by: Antonio Jimeno Yepes <[email protected]>
- Loading branch information
Showing
4 changed files
with
668 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.7.16" # pragma: no cover | ||
__version__ = "0.7.16-dev1" # pragma: no cover |
Oops, something went wrong.