UNPKG

react-visual-annotator

Version:

Powerful React image and video annotation tool for machine learning, computer vision, and AI training data creation. Features rotatable bounding boxes, polygons, keypoints, segmentation with TypeScript support and Material-UI components.

53 lines (51 loc) 2.3 kB
import { AutosegOptions } from 'autoseg/webworker'; import { KeypointsDefinition } from '../types/region-tools.ts'; import { ComponentType, FunctionComponent } from 'react'; import { AnnotatorToolEnum, Image, MainLayoutState, RegionAllowedActions } from '../MainLayout/types'; export type AnnotatorProps = { taskDescription?: string; allowedArea?: { x: number; y: number; w: number; h: number; }; regionTagList?: Array<string>; regionTagSingleSelection?: boolean; regionAllowedActions?: Partial<RegionAllowedActions>; regionClsList?: Array<string | { id: string; label: string; }>; imageTagList?: Array<string>; imageClsList?: Array<string>; enabledTools?: Array<AnnotatorToolEnum>; selectedTool?: String; showTags?: boolean; selectedImage?: string | number; images?: Array<Image>; showPointDistances?: boolean; pointDistancePrecision?: number; RegionEditLabel?: ComponentType<any> | FunctionComponent<any> | null; onExit: (state: MainLayoutState) => void; videoTime?: number; videoSrc?: string; keyframes?: Object; videoName?: string; keypointDefinitions?: KeypointsDefinition; fullImageSegmentationMode?: boolean; autoSegmentationOptions?: AutosegOptions; hideHeader?: boolean; hideHeaderText?: boolean; hideNext?: boolean; hidePrev?: boolean; hideClone?: boolean; hideSettings?: boolean; hideFullScreen?: boolean; hideSave?: boolean; allowComments?: boolean; onNextImage?: (state: MainLayoutState) => void; onPrevImage?: (state: MainLayoutState) => void; }; export declare const Annotator: ({ images, allowedArea, selectedImage, showPointDistances, pointDistancePrecision, showTags, enabledTools, selectedTool, regionTagSingleSelection, regionTagList, regionClsList, regionAllowedActions, imageTagList, imageClsList, keyframes, taskDescription, fullImageSegmentationMode, RegionEditLabel, videoSrc, videoTime, videoName, onExit, onNextImage, onPrevImage, keypointDefinitions, autoSegmentationOptions, hideHeader, hideHeaderText, hideNext, hidePrev, hideClone, hideSettings, hideFullScreen, hideSave, allowComments, }: AnnotatorProps) => import("react/jsx-runtime").JSX.Element; export default Annotator;