Skip to content

Commit

Permalink
fix: bug in resolve_lines (#537)
Browse files Browse the repository at this point in the history
* feat: add pytorch ckpts for crnn & mobilenet_v3_large

* fix: bug in resolve_lines
  • Loading branch information
charlesmindee authored Oct 25, 2021
1 parent 223abaf commit 18b79f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doctr/models/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _resolve_lines(self, boxes: np.ndarray) -> List[List[int]]:
y_center_sum = 0

words.append(idx)
y_center_sum = boxes[idxs[0]][1 if self.rotated_bbox else [1, 3]].mean()
y_center_sum += boxes[idx][1 if self.rotated_bbox else [1, 3]].mean()

# Use the remaining words to form the last(s) line(s)
if len(words) > 0:
Expand Down

0 comments on commit 18b79f2

Please sign in to comment.