/** * Copyright 2017-2022, Voxel51, Inc. */ import { REGRESSION, TEMPORAL_DETECTION } from "@fiftyone/utilities"; import { getColor } from "../color"; import { INFO_COLOR, MOMENT_CLASSIFICATIONS } from "../constants"; import { BaseState, BoundingBox, Coordinates, NONFINITE, VideoState, } from "../state"; import { CONTAINS, isShown, Overlay, PointInfo, RegularLabel, SelectData, } from "./base"; import { sizeBytes } from "./util"; export interface Classification extends RegularLabel {} export interface Regression { confidence?: number | NONFINITE; value?: number | NONFINITE; } type ClassificationLabel = Classification & Regression; export type Labels = [string, T[]][]; export class ClassificationsOverlay< State extends BaseState, Label extends Classification = ClassificationLabel > implements Overlay { private labelBoundingBoxes: { [key: string]: BoundingBox }; protected readonly labels: Labels