#[non_exhaustive]pub struct LabelDetectionConfig {
pub label_detection_mode: LabelDetectionMode,
pub stationary_camera: bool,
pub model: String,
pub frame_confidence_threshold: f32,
pub video_confidence_threshold: f32,
/* private fields */
}Expand description
Config for LABEL_DETECTION.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.label_detection_mode: LabelDetectionModeWhat labels should be detected with LABEL_DETECTION, in addition to
video-level labels or segment-level labels.
If unspecified, defaults to SHOT_MODE.
stationary_camera: boolWhether the video has been shot from a stationary (i.e., non-moving)
camera. When set to true, might improve detection accuracy for moving
objects. Should be used with SHOT_AND_FRAME_MODE enabled.
model: StringModel to use for label detection. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.
frame_confidence_threshold: f32The confidence threshold we perform filtering on the labels from frame-level detection. If not set, it is set to 0.4 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.
video_confidence_threshold: f32The confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it’s set to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.
Implementations§
Source§impl LabelDetectionConfig
impl LabelDetectionConfig
Sourcepub fn set_label_detection_mode<T: Into<LabelDetectionMode>>(self, v: T) -> Self
pub fn set_label_detection_mode<T: Into<LabelDetectionMode>>(self, v: T) -> Self
Sets the value of label_detection_mode.
§Example
use google_cloud_videointelligence_v1::model::LabelDetectionMode;
let x0 = LabelDetectionConfig::new().set_label_detection_mode(LabelDetectionMode::ShotMode);
let x1 = LabelDetectionConfig::new().set_label_detection_mode(LabelDetectionMode::FrameMode);
let x2 = LabelDetectionConfig::new().set_label_detection_mode(LabelDetectionMode::ShotAndFrameMode);Sourcepub fn set_stationary_camera<T: Into<bool>>(self, v: T) -> Self
pub fn set_stationary_camera<T: Into<bool>>(self, v: T) -> Self
Sets the value of stationary_camera.
§Example
let x = LabelDetectionConfig::new().set_stationary_camera(true);Sourcepub fn set_frame_confidence_threshold<T: Into<f32>>(self, v: T) -> Self
pub fn set_frame_confidence_threshold<T: Into<f32>>(self, v: T) -> Self
Sets the value of frame_confidence_threshold.
§Example
let x = LabelDetectionConfig::new().set_frame_confidence_threshold(42.0);Sourcepub fn set_video_confidence_threshold<T: Into<f32>>(self, v: T) -> Self
pub fn set_video_confidence_threshold<T: Into<f32>>(self, v: T) -> Self
Sets the value of video_confidence_threshold.
§Example
let x = LabelDetectionConfig::new().set_video_confidence_threshold(42.0);Trait Implementations§
Source§impl Clone for LabelDetectionConfig
impl Clone for LabelDetectionConfig
Source§fn clone(&self) -> LabelDetectionConfig
fn clone(&self) -> LabelDetectionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LabelDetectionConfig
impl Debug for LabelDetectionConfig
Source§impl Default for LabelDetectionConfig
impl Default for LabelDetectionConfig
Source§fn default() -> LabelDetectionConfig
fn default() -> LabelDetectionConfig
Source§impl Message for LabelDetectionConfig
impl Message for LabelDetectionConfig
Source§impl PartialEq for LabelDetectionConfig
impl PartialEq for LabelDetectionConfig
Source§fn eq(&self, other: &LabelDetectionConfig) -> bool
fn eq(&self, other: &LabelDetectionConfig) -> bool
self and other values to be equal, and is used by ==.