pub enum LayoutSrc<'a> {
PageImage(&'a RgbImage),
Raw(&'a RgbImage),
}Expand description
What a layout inference call receives per page — which resize kernel packs the 640×640 model input depends on it (docling parity, #58-branch):
docling’s layout stage runs on page.get_image(scale=1.0) — the
point-sized page image (pdfium at 1.5×, PIL-BICUBIC down) — which its
RT-DETR processor then stretches to 640×640 with PIL BILINEAR
(preprocessor_config.json: do_pad: false, resample: 2; no letterbox,
no normalize beyond /255). PageImage is that
image and goes through the byte-exact PIL kernel. Raw
is any other bitmap (the browser path’s canvas render, METS/TIFF page
scans) and keeps the legacy Triangle stretch.
Variants§
PageImage(&'a RgbImage)
The scale-1.0 page image (PdfPage::image_layout), docling-exact.
Raw(&'a RgbImage)
Any other page bitmap — legacy stretch.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LayoutSrc<'a>
impl<'a> RefUnwindSafe for LayoutSrc<'a>
impl<'a> Send for LayoutSrc<'a>
impl<'a> Sync for LayoutSrc<'a>
impl<'a> Unpin for LayoutSrc<'a>
impl<'a> UnsafeUnpin for LayoutSrc<'a>
impl<'a> UnwindSafe for LayoutSrc<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more