pub struct RlxTextDetector { /* private fields */ }Expand description
Text detector using a compiled native RLX U-Net graph.
Implementations§
Source§impl RlxTextDetector
impl RlxTextDetector
pub fn from_path( path: impl AsRef<Path>, params: DetectionParams, device: Device, ) -> Result<RlxTextDetector, Error>
pub fn from_safetensors( path: &Path, params: DetectionParams, device: Device, ) -> Result<RlxTextDetector, Error>
pub fn from_safetensors_sized( path: &Path, params: DetectionParams, cfg: DetectionGraphConfig, device: Device, ) -> Result<RlxTextDetector, Error>
pub fn from_model_dir( dir: &Path, params: DetectionParams, device: Device, ) -> Result<RlxTextDetector, Error>
pub fn fixed_input_hw(&self) -> Option<(usize, usize)>
pub fn detect_words( &self, image: TensorBase<ViewData<'_, f32>, NdLayout<3>>, ) -> Result<Vec<RotatedRect>, Error>
pub fn detect_text_pixels( &self, image: TensorBase<ViewData<'_, f32>, NdLayout<3>>, ) -> Result<TensorBase<Vec<f32>, NdLayout<2>>, Error>
Auto Trait Implementations§
impl !Freeze for RlxTextDetector
impl RefUnwindSafe for RlxTextDetector
impl Send for RlxTextDetector
impl Sync for RlxTextDetector
impl Unpin for RlxTextDetector
impl UnsafeUnpin for RlxTextDetector
impl UnwindSafe for RlxTextDetector
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> 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