Versions in this module Expand all Collapse all v1 v1.0.0 Jun 30, 2026 Changes in this version + const DefaultThreshold + const DeploymentThreshold + const F5T + const NCoeffs + const SingleModelThreshold + var ErrEmptyInput = errors.New("gate: empty JPEG input") + var ErrInvalidInput = errors.New("gate: invalid JPEG input") + var ErrModelOutput = errors.New("gate: model produced no detect / beta output") + var ErrTooFewCoefficients = errors.New("gate: too few usable coefficients") + var ErrWeightFileMissing = errors.New("gate: weight file not found") + type Bundle struct + func LoadBundle(dir string) (*Bundle, error) + func LoadBundleFromBytes(files map[string][]byte) (*Bundle, error) + func (b *Bundle) Close() error + func (b *Bundle) NumDetectModels() int + func (b *Bundle) NumGateModels() int + func (b *Bundle) Scan(jpegData []byte) (ScanResult, error) + func (b *Bundle) Tier() string + type Detector struct + func NewDetector(onnxPath string, opts ...Option) (*Detector, error) + func NewDetectorFromBytes(onnxBytes []byte, opts ...Option) (*Detector, error) + func (d *Detector) BuildCalTensor(stego, cover []int16) (*tensor.Tensor, error) + func (d *Detector) BuildInputTensor(coeffs []int16) (*tensor.Tensor, error) + func (d *Detector) Close() error + func (d *Detector) DetectCoeffs(coeffs []int16) (Result, error) + func (d *Detector) DetectCoeffsCal(stego, cover []int16) (Result, error) + func (d *Detector) DetectJPEG(data []byte) (Result, error) + func (d *Detector) InferShared(inT *tensor.Tensor, wire string) (res Result, ok bool, err error) + func (d *Detector) NeedsCover() bool + func (d *Detector) Wire() string + type EnsembleDetector struct + Available bool + func NewEnsembleDetectorFromBytes(members [][]byte, opts ...Option) (*EnsembleDetector, error) + func NewEnsembleDetectorFromDir(dir string, opts ...Option) (*EnsembleDetector, error) + func (e *EnsembleDetector) Close() error + func (e *EnsembleDetector) DetectJPEG(data []byte) (EnsembleResult, error) + func (e *EnsembleDetector) NumMembers() int + type EnsembleResult struct + Available bool + BetaEst float32 + IsStego bool + MemberCount int + PStego float32 + Threshold float32 + type NamedScore struct + Fired bool + Kind string + Name string + Score float64 + Threshold float64 + type Option func(*Detector) + func WithThreshold(thr float32) Option + type Result struct + BetaEst float32 + IsStego bool + PStego float32 + Threshold float32 + func (r Result) Verdict() Verdict + type ScanResult struct + BetaEst float64 + DetectModels []NamedScore + Detected bool + GateModels []NamedScore + GateScore float64 + Gated bool + Members int + PStego float64 + Reason string + Verdict Verdict + type Verdict string + const VerdictArtifact + const VerdictClean + const VerdictF5Detected + const VerdictSkip