@@ -173,7 +173,8 @@ class OnnxModel(DocLayoutModel):
specified in (img1_shape) to the shape of a different image (img0_shape).
Args:
- img1_shape (tuple): The shape of the image that the bounding boxes are for, in the format of (height, width).
+ img1_shape (tuple): The shape of the image that the bounding boxes are for,
+ in the format of (height, width).
boxes (torch.Tensor): the bounding boxes of the objects in the image, in the format of (x1, y1, x2, y2)
img0_shape (tuple): the shape of the target image, in the format of (height, width).
@@ -14,7 +14,6 @@ from pathlib import Path
from typing import TYPE_CHECKING, Any, Container, Iterable, List, Optional
import pymupdf
-from pathlib import Path
from pdf2zh import __version__
from pdf2zh.pdfexceptions import PDFValueError