countsensor

package
v0.0.0-...-dc48539 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModelName is the name of the model
	ModelName = "count-sensor"
	// OverflowLabel is the label if the counts exceed what was specified by the user
	OverflowLabel = "Overflow"
	// DefaulMaxFrequency is how often the vision service will poll the camera for a new image
	DefaultPollFrequency = 1.0
)

Variables

View Source
var (
	// Model is the resource
	Model = resource.NewModel("viam", "vision-summary", ModelName)
)

Functions

This section is empty.

Types

type Bin

type Bin struct {
	UpperBound int
	Label      string
}

Bin stores the thresholds that turns counts into labels

func NewThresholds

func NewThresholds(t map[string]int) []Bin

NewThresholds creates a list of thresholds for labeling counts

type Config

type Config struct {
	DetectorName    string             `json:"detector_name"`
	CameraName      string             `json:"camera_name"`
	ChosenLabels    map[string]float64 `json:"chosen_labels"`
	CountThresholds map[string]int     `json:"count_thresholds"`
	PollFrequency   float64            `json:"poll_frequency_hz"`
}

Config contains names for necessary resources

func (*Config) Validate

func (cfg *Config) Validate(path string) ([]string, error)

Validate validates the config and returns implicit dependencies, this Validate checks if the camera and detector exist for the module's vision model.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL