_2dfan4

package
v0.0.0-...-0ba849f Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() func() TModel

Types

type FaceLandmark68

type FaceLandmark68 struct {
	Data []gocv.Point2f
}

func (*FaceLandmark68) ToLandmark5

func (f *FaceLandmark68) ToLandmark5() []gocv.Point2f

type Input

type Input struct {
	Img         gocv.Mat
	BoundingBox model.BoundingBox
	// ApplyContrastEnhancement allows toggling this feature on/off.
	// NOTE: Enabling this will slow down processing because it performs extra color conversions and CLAHE.
	ApplyContrastEnhancement bool
	// BrightnessThreshold defines how dark the image can be before we apply contrast enhancement.
	// Suggested value: 30.0 for low-light detection.
	// Typical LAB L-channel values range from 0 to 100.
	BrightnessThreshold float64
	// ClaheClipLimit controls how much CLAHE enhances contrast.
	// Suggested value: 2.0 for a balanced effect without over-enhancement.
	// Higher values = more aggressive contrast stretching. Typical values: 2.0 to 4.0.
	ClaheClipLimit float32
}

type Model

type Model struct {
	// contains filtered or unexported fields
}

func New

func New() *Model

func (*Model) ModelName

func (m *Model) ModelName() string

func (*Model) ModelVersion

func (m *Model) ModelVersion() string

func (*Model) PostProcess

func (m *Model) PostProcess(rawOutputContents [][]byte) (*Output, error)

func (*Model) PreProcess

func (m *Model) PreProcess(i *Input) ([]*protobuf.InferTensorContents, error)

type Output

type Output struct {
	FaceLandmark68      FaceLandmark68
	FaceLandmark68Score float64
}

type TModel

type TModel = model.Model[*Input, *Output]

Jump to

Keyboard shortcuts

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