pub struct YOLOXModel { /* private fields */ }
Expand description
A YOLOX
-based model.
Implementations§
Source§impl YOLOXModel
impl YOLOXModel
Sourcepub const REQUIRED_WIDTH: u32 = 768u32
pub const REQUIRED_WIDTH: u32 = 768u32
Required input image width.
Sourcepub const REQUIRED_HEIGHT: u32 = 1_024u32
pub const REQUIRED_HEIGHT: u32 = 1_024u32
Required input image height.
Sourcepub fn pretrained(p_model: YOLOXPretrainedModels) -> Result<Self>
pub fn pretrained(p_model: YOLOXPretrainedModels) -> Result<Self>
Construct a YOLOXModel
with a pretrained model downloaded from Hugging Face.
Sourcepub fn configure_pretrained(
p_model: YOLOXPretrainedModels,
session_builder: SessionBuilder,
) -> Result<Self>
pub fn configure_pretrained( p_model: YOLOXPretrainedModels, session_builder: SessionBuilder, ) -> Result<Self>
Construct a configured YOLOXModel
with a pretrained model downloaded from Hugging Face.
Sourcepub fn new_from_file(
file_path: &str,
model_name: &str,
label_map: &[(i64, &str)],
is_quantized: bool,
session_builder: SessionBuilder,
) -> Result<Self>
pub fn new_from_file( file_path: &str, model_name: &str, label_map: &[(i64, &str)], is_quantized: bool, session_builder: SessionBuilder, ) -> Result<Self>
Construct a YOLOXModel
from a model file.
Sourcepub fn predict(&self, img: &DynamicImage) -> Result<Vec<LayoutElement>>
pub fn predict(&self, img: &DynamicImage) -> Result<Vec<LayoutElement>>
Predict LayoutElement
s from the image provided.
Auto Trait Implementations§
impl Freeze for YOLOXModel
impl !RefUnwindSafe for YOLOXModel
impl Send for YOLOXModel
impl Sync for YOLOXModel
impl Unpin for YOLOXModel
impl !UnwindSafe for YOLOXModel
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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