Documentation
¶
Index ¶
- Variables
- func AggregateStats(list []EpisodeStats) map[string]map[string]any
- func CheckAggregateVisualCoverage(agg map[string]map[string]any, features map[string]FeatureDesc) error
- func CheckStatsFileVisualCoverage(path string, features map[string]FeatureDesc) error
- func MissingDeclaredVisualKeys(statsKeys map[string]any, features map[string]FeatureDesc) []string
- func MissingVisualKeys(ep EpisodeStats, required map[string]string) []string
- func ToJSONSerializable(stats map[string]map[string]any) map[string]map[string]any
- type EpisodeInput
- type EpisodeStats
- func ComputeEpisodeStats(in EpisodeInput, features map[string]FeatureDesc, opts Options) EpisodeStats
- func ComputeEpisodeStatsErr(in EpisodeInput, features map[string]FeatureDesc, opts Options) (EpisodeStats, error)
- func OverlayFromVideos(existing EpisodeStats, files map[string]string, length int, ...) (EpisodeStats, error)
- func SanitizeEpisodeStats(ep EpisodeStats) EpisodeStats
- type FeatureDesc
- type FeatureStats
- type ImageStat311
- type Mode
- type Options
Constants ¶
This section is empty.
Variables ¶
var DefaultQuantiles = []float64{0.01, 0.10, 0.50, 0.90, 0.99}
Functions ¶
func AggregateStats ¶
func AggregateStats(list []EpisodeStats) map[string]map[string]any
func CheckAggregateVisualCoverage ¶ added in v1.2.4
func CheckAggregateVisualCoverage(agg map[string]map[string]any, features map[string]FeatureDesc) error
CheckAggregateVisualCoverage reports when aggregated stats omit declared image/video keys.
func CheckStatsFileVisualCoverage ¶ added in v1.2.4
func CheckStatsFileVisualCoverage(path string, features map[string]FeatureDesc) error
CheckStatsFileVisualCoverage reports when stats.json omits declared image/video keys.
func MissingDeclaredVisualKeys ¶ added in v1.2.4
func MissingDeclaredVisualKeys(statsKeys map[string]any, features map[string]FeatureDesc) []string
MissingDeclaredVisualKeys returns image/video feature keys absent from stats.
func MissingVisualKeys ¶ added in v1.2.4
func MissingVisualKeys(ep EpisodeStats, required map[string]string) []string
MissingVisualKeys returns feature keys in required that have no stats entry.
Types ¶
type EpisodeInput ¶
type EpisodeInput struct {
Columns map[string]any
FramePaths map[string][]string
FrameBytes map[string][][]byte
// VideoFiles maps image/video feature keys to MP4 paths. Used when
// FramePaths/FrameBytes are empty (ExternalVideos / H264Remux / encode).
VideoFiles map[string]string
// Length is the episode frame count, used to sample VideoFiles.
Length int
// Locator resolves ffmpeg/ffprobe. Optional; PATH/bundled binaries are used when nil.
Locator video.Locator
// Ctx cancels ffmpeg sampling. Optional.
Ctx context.Context
}
type EpisodeStats ¶
type EpisodeStats map[string]FeatureStats
func ComputeEpisodeStats ¶
func ComputeEpisodeStats(in EpisodeInput, features map[string]FeatureDesc, opts Options) EpisodeStats
func ComputeEpisodeStatsErr ¶ added in v1.2.4
func ComputeEpisodeStatsErr(in EpisodeInput, features map[string]FeatureDesc, opts Options) (EpisodeStats, error)
ComputeEpisodeStatsErr is ComputeEpisodeStats but surfaces sampling failures.
func OverlayFromVideos ¶ added in v1.2.4
func OverlayFromVideos(existing EpisodeStats, files map[string]string, length int, features map[string]FeatureDesc, opts Options, extra EpisodeInput) (EpisodeStats, error)
OverlayFromVideos fills missing image/video keys by sampling finalized MP4s.
func SanitizeEpisodeStats ¶ added in v1.1.0
func SanitizeEpisodeStats(ep EpisodeStats) EpisodeStats
SanitizeEpisodeStats replaces non-finite floats so JSON encoding succeeds.
type FeatureDesc ¶
type FeatureStats ¶
type ImageStat311 ¶
type ImageStat311 [][][]float64
ImageStat311 is the (3,1,1) nested layout used by LeRobot image/video stats.
func AsImageStat311 ¶ added in v1.2.4
func AsImageStat311(v any) (ImageStat311, bool)
AsImageStat311 coerces in-memory or JSON-decoded (C,1,1) stats.
func ImageStat311FromChannels ¶
func ImageStat311FromChannels(ch []float64) ImageStat311
func (ImageStat311) Channels ¶
func (s ImageStat311) Channels() []float64