Spaces:
Sleeping
Sleeping
Update doors_fasterrcnn.py
Browse files- doors_fasterrcnn.py +1 -1
doors_fasterrcnn.py
CHANGED
|
@@ -293,7 +293,7 @@ def add_annotations_to_pdf(image, pdf_name, lines, sanda, char_width, line_midpo
|
|
| 293 |
annot.update()
|
| 294 |
for i in range(len(doubleD_bbox)):
|
| 295 |
# rect_coords should be a tuple: (x1, y1, x2, y2)
|
| 296 |
-
coordinates = [
|
| 297 |
rect = fitz.Rect(coordinates)
|
| 298 |
rect_annot = page.add_rect_annot(rect)
|
| 299 |
rect_annot.set_border(width=2) # Adjust border width
|
|
|
|
| 293 |
annot.update()
|
| 294 |
for i in range(len(doubleD_bbox)):
|
| 295 |
# rect_coords should be a tuple: (x1, y1, x2, y2)
|
| 296 |
+
coordinates = [doubleD_bbox[i][0] * derotationMatrix, doubleD_bbox[i][1] * derotationMatrix, doubleD_bbox[i][2] * derotationMatrix, doubleD_bbox[i][3]* derotationMatrix]
|
| 297 |
rect = fitz.Rect(coordinates)
|
| 298 |
rect_annot = page.add_rect_annot(rect)
|
| 299 |
rect_annot.set_border(width=2) # Adjust border width
|