pub struct RtmDetConfig {
pub in_chans: usize,
pub img_size: usize,
pub stem_channels: usize,
pub stage_channels: Vec<usize>,
pub n_bottlenecks: usize,
pub dw_kernel: usize,
pub neck_channels: usize,
pub n_classes: usize,
}Expand description
RTMDet hyper-parameters.
Fields§
§in_chans: usizeInput image channels (e.g. 3).
img_size: usizeSquare input spatial size.
stem_channels: usizeStem output channels.
stage_channels: Vec<usize>Output channels of each backbone stage (each value must be even).
n_bottlenecks: usizeBottlenecks per CSP layer.
dw_kernel: usizeLarge depthwise kernel size (odd).
neck_channels: usizeUniform PAFPN / head channel count.
n_classes: usizeNumber of object classes.
Implementations§
Source§impl RtmDetConfig
impl RtmDetConfig
Sourcepub fn new(
in_chans: usize,
img_size: usize,
stem_channels: usize,
stage_channels: Vec<usize>,
n_bottlenecks: usize,
dw_kernel: usize,
neck_channels: usize,
n_classes: usize,
) -> VisionResult<Self>
pub fn new( in_chans: usize, img_size: usize, stem_channels: usize, stage_channels: Vec<usize>, n_bottlenecks: usize, dw_kernel: usize, neck_channels: usize, n_classes: usize, ) -> VisionResult<Self>
Create and validate a configuration.
§Errors
VisionError::InvalidImageSizeifin_chans == 0orimg_size == 0.VisionError::EmptyInputifstage_channelsis empty.VisionError::InvalidNumClassesifn_classes == 0.VisionError::InvalidPatchSizeifdw_kernelis even or zero.VisionError::DimensionMismatchif any stage channel count is odd or zero, orneck_channels/stem_channelsis zero.
Trait Implementations§
Source§impl Clone for RtmDetConfig
impl Clone for RtmDetConfig
Source§fn clone(&self) -> RtmDetConfig
fn clone(&self) -> RtmDetConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RtmDetConfig
impl Debug for RtmDetConfig
Source§impl PartialEq for RtmDetConfig
impl PartialEq for RtmDetConfig
Source§fn eq(&self, other: &RtmDetConfig) -> bool
fn eq(&self, other: &RtmDetConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RtmDetConfig
Auto Trait Implementations§
impl Freeze for RtmDetConfig
impl RefUnwindSafe for RtmDetConfig
impl Send for RtmDetConfig
impl Sync for RtmDetConfig
impl Unpin for RtmDetConfig
impl UnsafeUnpin for RtmDetConfig
impl UnwindSafe for RtmDetConfig
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