Added support of skeletons (#1)
parent
5f58a0f7be
commit
7e20b279af
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,450 +1,425 @@
|
||||
// Copyright (C) 2019-2022 Intel Corporation
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
// SPDX-License-Identifier = MIT
|
||||
|
||||
(() => {
|
||||
/**
|
||||
* Share files types
|
||||
* @enum {string}
|
||||
* @name ShareFileType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} DIR 'DIR'
|
||||
* @property {string} REG 'REG'
|
||||
* @readonly
|
||||
*/
|
||||
const ShareFileType = Object.freeze({
|
||||
DIR: 'DIR',
|
||||
REG: 'REG',
|
||||
});
|
||||
/**
|
||||
* Share files types
|
||||
* @enum {string}
|
||||
* @name ShareFileType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} DIR 'DIR'
|
||||
* @property {string} REG 'REG'
|
||||
* @readonly
|
||||
*/
|
||||
export enum ShareFileType {
|
||||
DIR = 'DIR',
|
||||
REG = 'REG',
|
||||
}
|
||||
|
||||
/**
|
||||
* Task statuses
|
||||
* @enum {string}
|
||||
* @name TaskStatus
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} ANNOTATION 'annotation'
|
||||
* @property {string} VALIDATION 'validation'
|
||||
* @property {string} COMPLETED 'completed'
|
||||
* @readonly
|
||||
*/
|
||||
const TaskStatus = Object.freeze({
|
||||
ANNOTATION: 'annotation',
|
||||
VALIDATION: 'validation',
|
||||
COMPLETED: 'completed',
|
||||
});
|
||||
/**
|
||||
* Task statuses
|
||||
* @enum {string}
|
||||
* @name TaskStatus
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} ANNOTATION 'annotation'
|
||||
* @property {string} VALIDATION 'validation'
|
||||
* @property {string} COMPLETED 'completed'
|
||||
* @readonly
|
||||
*/
|
||||
export enum TaskStatus {
|
||||
ANNOTATION = 'annotation',
|
||||
VALIDATION = 'validation',
|
||||
COMPLETED = 'completed',
|
||||
}
|
||||
|
||||
/**
|
||||
* Job stages
|
||||
* @enum {string}
|
||||
* @name JobStage
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} ANNOTATION 'annotation'
|
||||
* @property {string} VALIDATION 'validation'
|
||||
* @property {string} ACCEPTANCE 'acceptance'
|
||||
* @readonly
|
||||
*/
|
||||
const JobStage = Object.freeze({
|
||||
ANNOTATION: 'annotation',
|
||||
VALIDATION: 'validation',
|
||||
ACCEPTANCE: 'acceptance',
|
||||
});
|
||||
/**
|
||||
* Job stages
|
||||
* @enum {string}
|
||||
* @name JobStage
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} ANNOTATION 'annotation'
|
||||
* @property {string} VALIDATION 'validation'
|
||||
* @property {string} ACCEPTANCE 'acceptance'
|
||||
* @readonly
|
||||
*/
|
||||
export enum JobStage {
|
||||
ANNOTATION = 'annotation',
|
||||
VALIDATION = 'validation',
|
||||
ACCEPTANCE = 'acceptance',
|
||||
}
|
||||
|
||||
/**
|
||||
* Job states
|
||||
* @enum {string}
|
||||
* @name JobState
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} NEW 'new'
|
||||
* @property {string} IN_PROGRESS 'in progress'
|
||||
* @property {string} COMPLETED 'completed'
|
||||
* @property {string} REJECTED 'rejected'
|
||||
* @readonly
|
||||
*/
|
||||
const JobState = Object.freeze({
|
||||
NEW: 'new',
|
||||
IN_PROGRESS: 'in progress',
|
||||
COMPLETED: 'completed',
|
||||
REJECTED: 'rejected',
|
||||
});
|
||||
/**
|
||||
* Job states
|
||||
* @enum {string}
|
||||
* @name JobState
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} NEW 'new'
|
||||
* @property {string} IN_PROGRESS 'in progress'
|
||||
* @property {string} COMPLETED 'completed'
|
||||
* @property {string} REJECTED 'rejected'
|
||||
* @readonly
|
||||
*/
|
||||
export enum JobState {
|
||||
NEW = 'new',
|
||||
IN_PROGRESS = 'in progress',
|
||||
COMPLETED = 'completed',
|
||||
REJECTED = 'rejected',
|
||||
}
|
||||
|
||||
/**
|
||||
* Task dimension
|
||||
* @enum
|
||||
* @name DimensionType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} DIMENSION_2D '2d'
|
||||
* @property {string} DIMENSION_3D '3d'
|
||||
* @readonly
|
||||
*/
|
||||
const DimensionType = Object.freeze({
|
||||
DIMENSION_2D: '2d',
|
||||
DIMENSION_3D: '3d',
|
||||
});
|
||||
/**
|
||||
* Task dimension
|
||||
* @enum
|
||||
* @name DimensionType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} DIMENSION_2D '2d'
|
||||
* @property {string} DIMENSION_3D '3d'
|
||||
* @readonly
|
||||
*/
|
||||
export enum DimensionType {
|
||||
DIMENSION_2D = '2d',
|
||||
DIMENSION_3D = '3d',
|
||||
}
|
||||
|
||||
/**
|
||||
* List of RQ statuses
|
||||
* @enum {string}
|
||||
* @name RQStatus
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} QUEUED 'queued'
|
||||
* @property {string} STARTED 'started'
|
||||
* @property {string} FINISHED 'finished'
|
||||
* @property {string} FAILED 'failed'
|
||||
* @property {string} UNKNOWN 'unknown'
|
||||
* @readonly
|
||||
*/
|
||||
const RQStatus = Object.freeze({
|
||||
QUEUED: 'queued',
|
||||
STARTED: 'started',
|
||||
FINISHED: 'finished',
|
||||
FAILED: 'failed',
|
||||
UNKNOWN: 'unknown',
|
||||
});
|
||||
/**
|
||||
* List of RQ statuses
|
||||
* @enum {string}
|
||||
* @name RQStatus
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} QUEUED 'queued'
|
||||
* @property {string} STARTED 'started'
|
||||
* @property {string} FINISHED 'finished'
|
||||
* @property {string} FAILED 'failed'
|
||||
* @property {string} UNKNOWN 'unknown'
|
||||
* @readonly
|
||||
*/
|
||||
export enum RQStatus {
|
||||
QUEUED = 'queued',
|
||||
STARTED = 'started',
|
||||
FINISHED = 'finished',
|
||||
FAILED = 'failed',
|
||||
UNKNOWN = 'unknown',
|
||||
}
|
||||
|
||||
/**
|
||||
* Task modes
|
||||
* @enum {string}
|
||||
* @name TaskMode
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} ANNOTATION 'annotation'
|
||||
* @property {string} INTERPOLATION 'interpolation'
|
||||
* @readonly
|
||||
*/
|
||||
const TaskMode = Object.freeze({
|
||||
ANNOTATION: 'annotation',
|
||||
INTERPOLATION: 'interpolation',
|
||||
});
|
||||
/**
|
||||
* Task modes
|
||||
* @enum {string}
|
||||
* @name TaskMode
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} ANNOTATION 'annotation'
|
||||
* @property {string} INTERPOLATION 'interpolation'
|
||||
* @readonly
|
||||
*/
|
||||
export enum TaskMode {
|
||||
ANNOTATION = 'annotation',
|
||||
INTERPOLATION = 'interpolation',
|
||||
}
|
||||
|
||||
/**
|
||||
* Attribute types
|
||||
* @enum {string}
|
||||
* @name AttributeType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} CHECKBOX 'checkbox'
|
||||
* @property {string} SELECT 'select'
|
||||
* @property {string} RADIO 'radio'
|
||||
* @property {string} NUMBER 'number'
|
||||
* @property {string} TEXT 'text'
|
||||
* @readonly
|
||||
*/
|
||||
const AttributeType = Object.freeze({
|
||||
CHECKBOX: 'checkbox',
|
||||
RADIO: 'radio',
|
||||
SELECT: 'select',
|
||||
NUMBER: 'number',
|
||||
TEXT: 'text',
|
||||
});
|
||||
/**
|
||||
* Attribute types
|
||||
* @enum {string}
|
||||
* @name AttributeType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} CHECKBOX 'checkbox'
|
||||
* @property {string} SELECT 'select'
|
||||
* @property {string} RADIO 'radio'
|
||||
* @property {string} NUMBER 'number'
|
||||
* @property {string} TEXT 'text'
|
||||
* @readonly
|
||||
*/
|
||||
export enum AttributeType {
|
||||
CHECKBOX = 'checkbox',
|
||||
RADIO = 'radio',
|
||||
SELECT = 'select',
|
||||
NUMBER = 'number',
|
||||
TEXT = 'text',
|
||||
}
|
||||
|
||||
/**
|
||||
* Object types
|
||||
* @enum {string}
|
||||
* @name ObjectType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} TAG 'tag'
|
||||
* @property {string} SHAPE 'shape'
|
||||
* @property {string} TRACK 'track'
|
||||
* @readonly
|
||||
*/
|
||||
const ObjectType = Object.freeze({
|
||||
TAG: 'tag',
|
||||
SHAPE: 'shape',
|
||||
TRACK: 'track',
|
||||
});
|
||||
/**
|
||||
* Object types
|
||||
* @enum {string}
|
||||
* @name ObjectType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} TAG 'tag'
|
||||
* @property {string} SHAPE 'shape'
|
||||
* @property {string} TRACK 'track'
|
||||
* @readonly
|
||||
*/
|
||||
export enum ObjectType {
|
||||
TAG = 'tag',
|
||||
SHAPE = 'shape',
|
||||
TRACK = 'track',
|
||||
}
|
||||
|
||||
/**
|
||||
* Object shapes
|
||||
* @enum {string}
|
||||
* @name ObjectShape
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} RECTANGLE 'rectangle'
|
||||
* @property {string} POLYGON 'polygon'
|
||||
* @property {string} POLYLINE 'polyline'
|
||||
* @property {string} POINTS 'points'
|
||||
* @property {string} CUBOID 'cuboid'
|
||||
* @readonly
|
||||
*/
|
||||
const ObjectShape = Object.freeze({
|
||||
RECTANGLE: 'rectangle',
|
||||
POLYGON: 'polygon',
|
||||
POLYLINE: 'polyline',
|
||||
POINTS: 'points',
|
||||
ELLIPSE: 'ellipse',
|
||||
CUBOID: 'cuboid',
|
||||
});
|
||||
/**
|
||||
* Object shapes
|
||||
* @enum {string}
|
||||
* @name ShapeType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} RECTANGLE 'rectangle'
|
||||
* @property {string} POLYGON 'polygon'
|
||||
* @property {string} POLYLINE 'polyline'
|
||||
* @property {string} POINTS 'points'
|
||||
* @property {string} CUBOID 'cuboid'
|
||||
* @property {string} SKELETON 'skeleton'
|
||||
* @readonly
|
||||
*/
|
||||
export enum ShapeType {
|
||||
RECTANGLE = 'rectangle',
|
||||
POLYGON = 'polygon',
|
||||
POLYLINE = 'polyline',
|
||||
POINTS = 'points',
|
||||
ELLIPSE = 'ellipse',
|
||||
CUBOID = 'cuboid',
|
||||
SKELETON = 'skeleton',
|
||||
}
|
||||
|
||||
/**
|
||||
* Annotation type
|
||||
* @enum {string}
|
||||
* @name Source
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} MANUAL 'manual'
|
||||
* @property {string} AUTO 'auto'
|
||||
* @readonly
|
||||
*/
|
||||
const Source = Object.freeze({
|
||||
MANUAL: 'manual',
|
||||
AUTO: 'auto',
|
||||
});
|
||||
/**
|
||||
* Annotation type
|
||||
* @enum {string}
|
||||
* @name Source
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} MANUAL 'manual'
|
||||
* @property {string} AUTO 'auto'
|
||||
* @readonly
|
||||
*/
|
||||
export enum Source {
|
||||
MANUAL = 'manual',
|
||||
AUTO = 'auto',
|
||||
}
|
||||
|
||||
/**
|
||||
* Logger event types
|
||||
* @enum {string}
|
||||
* @name LogType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} loadJob Load job
|
||||
* @property {string} saveJob Save job
|
||||
* @property {string} restoreJob Restore job
|
||||
* @property {string} uploadAnnotations Upload annotations
|
||||
* @property {string} sendUserActivity Send user activity
|
||||
* @property {string} sendException Send exception
|
||||
* @property {string} sendTaskInfo Send task info
|
||||
/**
|
||||
* Logger event types
|
||||
* @enum {string}
|
||||
* @name LogType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} loadJob Load job
|
||||
* @property {string} saveJob Save job
|
||||
* @property {string} restoreJob Restore job
|
||||
* @property {string} uploadAnnotations Upload annotations
|
||||
* @property {string} sendUserActivity Send user activity
|
||||
* @property {string} sendException Send exception
|
||||
* @property {string} sendTaskInfo Send task info
|
||||
* @property {string} drawObject Draw object
|
||||
* @property {string} pasteObject Paste object
|
||||
* @property {string} copyObject Copy object
|
||||
* @property {string} propagateObject Propagate object
|
||||
* @property {string} dragObject Drag object
|
||||
* @property {string} resizeObject Resize object
|
||||
* @property {string} deleteObject Delete object
|
||||
* @property {string} lockObject Lock object
|
||||
* @property {string} mergeObjects Merge objects
|
||||
* @property {string} changeAttribute Change attribute
|
||||
* @property {string} changeLabel Change label
|
||||
* @property {string} changeFrame Change frame
|
||||
* @property {string} moveImage Move image
|
||||
* @property {string} zoomImage Zoom image
|
||||
* @property {string} fitImage Fit image
|
||||
* @property {string} rotateImage Rotate image
|
||||
* @property {string} undoAction Undo action
|
||||
* @property {string} redoAction Redo action
|
||||
* @property {string} pressShortcut Press shortcut
|
||||
* @property {string} debugInfo Debug info
|
||||
* @readonly
|
||||
*/
|
||||
export enum LogType {
|
||||
loadJob = 'Load job',
|
||||
saveJob = 'Save job',
|
||||
restoreJob = 'Restore job',
|
||||
uploadAnnotations = 'Upload annotations',
|
||||
sendUserActivity = 'Send user activity',
|
||||
sendException = 'Send exception',
|
||||
sendTaskInfo = 'Send task info',
|
||||
|
||||
* @property {string} drawObject Draw object
|
||||
* @property {string} pasteObject Paste object
|
||||
* @property {string} copyObject Copy object
|
||||
* @property {string} propagateObject Propagate object
|
||||
* @property {string} dragObject Drag object
|
||||
* @property {string} resizeObject Resize object
|
||||
* @property {string} deleteObject Delete object
|
||||
* @property {string} lockObject Lock object
|
||||
* @property {string} mergeObjects Merge objects
|
||||
* @property {string} changeAttribute Change attribute
|
||||
* @property {string} changeLabel Change label
|
||||
drawObject = 'Draw object',
|
||||
pasteObject = 'Paste object',
|
||||
copyObject = 'Copy object',
|
||||
propagateObject = 'Propagate object',
|
||||
dragObject = 'Drag object',
|
||||
resizeObject = 'Resize object',
|
||||
deleteObject = 'Delete object',
|
||||
lockObject = 'Lock object',
|
||||
mergeObjects = 'Merge objects',
|
||||
changeAttribute = 'Change attribute',
|
||||
changeLabel = 'Change label',
|
||||
|
||||
* @property {string} changeFrame Change frame
|
||||
* @property {string} moveImage Move image
|
||||
* @property {string} zoomImage Zoom image
|
||||
* @property {string} fitImage Fit image
|
||||
* @property {string} rotateImage Rotate image
|
||||
changeFrame = 'Change frame',
|
||||
moveImage = 'Move image',
|
||||
zoomImage = 'Zoom image',
|
||||
fitImage = 'Fit image',
|
||||
rotateImage = 'Rotate image',
|
||||
|
||||
* @property {string} undoAction Undo action
|
||||
* @property {string} redoAction Redo action
|
||||
undoAction = 'Undo action',
|
||||
redoAction = 'Redo action',
|
||||
|
||||
* @property {string} pressShortcut Press shortcut
|
||||
* @property {string} debugInfo Debug info
|
||||
* @readonly
|
||||
*/
|
||||
const LogType = Object.freeze({
|
||||
loadJob: 'Load job',
|
||||
saveJob: 'Save job',
|
||||
restoreJob: 'Restore job',
|
||||
uploadAnnotations: 'Upload annotations',
|
||||
sendUserActivity: 'Send user activity',
|
||||
sendException: 'Send exception',
|
||||
sendTaskInfo: 'Send task info',
|
||||
pressShortcut = 'Press shortcut',
|
||||
debugInfo = 'Debug info',
|
||||
}
|
||||
|
||||
drawObject: 'Draw object',
|
||||
pasteObject: 'Paste object',
|
||||
copyObject: 'Copy object',
|
||||
propagateObject: 'Propagate object',
|
||||
dragObject: 'Drag object',
|
||||
resizeObject: 'Resize object',
|
||||
deleteObject: 'Delete object',
|
||||
lockObject: 'Lock object',
|
||||
mergeObjects: 'Merge objects',
|
||||
changeAttribute: 'Change attribute',
|
||||
changeLabel: 'Change label',
|
||||
/**
|
||||
* Types of actions with annotations
|
||||
* @enum {string}
|
||||
* @name HistoryActions
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} CHANGED_LABEL Changed label
|
||||
* @property {string} CHANGED_ATTRIBUTES Changed attributes
|
||||
* @property {string} CHANGED_POINTS Changed points
|
||||
* @property {string} CHANGED_OUTSIDE Changed outside
|
||||
* @property {string} CHANGED_OCCLUDED Changed occluded
|
||||
* @property {string} CHANGED_ZORDER Changed z-order
|
||||
* @property {string} CHANGED_LOCK Changed lock
|
||||
* @property {string} CHANGED_COLOR Changed color
|
||||
* @property {string} CHANGED_HIDDEN Changed hidden
|
||||
* @property {string} CHANGED_SOURCE Changed source
|
||||
* @property {string} MERGED_OBJECTS Merged objects
|
||||
* @property {string} SPLITTED_TRACK Splitted track
|
||||
* @property {string} GROUPED_OBJECTS Grouped objects
|
||||
* @property {string} CREATED_OBJECTS Created objects
|
||||
* @property {string} REMOVED_OBJECT Removed object
|
||||
* @property {string} REMOVED_FRAME Removed frame
|
||||
* @property {string} RESTORED_FRAME Restored frame
|
||||
* @readonly
|
||||
*/
|
||||
export enum HistoryActions {
|
||||
CHANGED_LABEL = 'Changed label',
|
||||
CHANGED_ATTRIBUTES = 'Changed attributes',
|
||||
CHANGED_POINTS = 'Changed points',
|
||||
CHANGED_ROTATION = 'Object rotated',
|
||||
CHANGED_OUTSIDE = 'Changed outside',
|
||||
CHANGED_OCCLUDED = 'Changed occluded',
|
||||
CHANGED_ZORDER = 'Changed z-order',
|
||||
CHANGED_KEYFRAME = 'Changed keyframe',
|
||||
CHANGED_LOCK = 'Changed lock',
|
||||
CHANGED_PINNED = 'Changed pinned',
|
||||
CHANGED_COLOR = 'Changed color',
|
||||
CHANGED_HIDDEN = 'Changed hidden',
|
||||
CHANGED_SOURCE = 'Changed source',
|
||||
MERGED_OBJECTS = 'Merged objects',
|
||||
SPLITTED_TRACK = 'Splitted track',
|
||||
GROUPED_OBJECTS = 'Grouped objects',
|
||||
CREATED_OBJECTS = 'Created objects',
|
||||
REMOVED_OBJECT = 'Removed object',
|
||||
REMOVED_FRAME = 'Removed frame',
|
||||
RESTORED_FRAME = 'Restored frame',
|
||||
}
|
||||
|
||||
changeFrame: 'Change frame',
|
||||
moveImage: 'Move image',
|
||||
zoomImage: 'Zoom image',
|
||||
fitImage: 'Fit image',
|
||||
rotateImage: 'Rotate image',
|
||||
/**
|
||||
* Enum string values.
|
||||
* @name ModelType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum ModelType {
|
||||
DETECTOR = 'detector',
|
||||
INTERACTOR = 'interactor',
|
||||
TRACKER = 'tracker',
|
||||
}
|
||||
|
||||
undoAction: 'Undo action',
|
||||
redoAction: 'Redo action',
|
||||
/**
|
||||
* Array of hex colors
|
||||
* @name colors
|
||||
* @memberof module:API.cvat.enums
|
||||
* @type {string[]}
|
||||
* @readonly
|
||||
*/
|
||||
export const colors = [
|
||||
'#33ddff',
|
||||
'#fa3253',
|
||||
'#34d1b7',
|
||||
'#ff007c',
|
||||
'#ff6037',
|
||||
'#ddff33',
|
||||
'#24b353',
|
||||
'#b83df5',
|
||||
'#66ff66',
|
||||
'#32b7fa',
|
||||
'#ffcc33',
|
||||
'#83e070',
|
||||
'#fafa37',
|
||||
'#5986b3',
|
||||
'#8c78f0',
|
||||
'#ff6a4d',
|
||||
'#f078f0',
|
||||
'#2a7dd1',
|
||||
'#b25050',
|
||||
'#cc3366',
|
||||
'#cc9933',
|
||||
'#aaf0d1',
|
||||
'#ff00cc',
|
||||
'#3df53d',
|
||||
'#fa32b7',
|
||||
'#fa7dbb',
|
||||
'#ff355e',
|
||||
'#f59331',
|
||||
'#3d3df5',
|
||||
'#733380',
|
||||
];
|
||||
|
||||
pressShortcut: 'Press shortcut',
|
||||
debugInfo: 'Debug info',
|
||||
});
|
||||
/**
|
||||
* Types of cloud storage providers
|
||||
* @enum {string}
|
||||
* @name CloudStorageProviderType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} AWS_S3 'AWS_S3_BUCKET'
|
||||
* @property {string} AZURE 'AZURE_CONTAINER'
|
||||
* @property {string} GOOGLE_CLOUD_STORAGE 'GOOGLE_CLOUD_STORAGE'
|
||||
* @readonly
|
||||
*/
|
||||
export enum CloudStorageProviderType {
|
||||
AWS_S3_BUCKET = 'AWS_S3_BUCKET',
|
||||
AZURE_CONTAINER = 'AZURE_CONTAINER',
|
||||
GOOGLE_CLOUD_STORAGE = 'GOOGLE_CLOUD_STORAGE',
|
||||
}
|
||||
|
||||
/**
|
||||
* Types of actions with annotations
|
||||
* @enum {string}
|
||||
* @name HistoryActions
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} CHANGED_LABEL Changed label
|
||||
* @property {string} CHANGED_ATTRIBUTES Changed attributes
|
||||
* @property {string} CHANGED_POINTS Changed points
|
||||
* @property {string} CHANGED_OUTSIDE Changed outside
|
||||
* @property {string} CHANGED_OCCLUDED Changed occluded
|
||||
* @property {string} CHANGED_ZORDER Changed z-order
|
||||
* @property {string} CHANGED_LOCK Changed lock
|
||||
* @property {string} CHANGED_COLOR Changed color
|
||||
* @property {string} CHANGED_HIDDEN Changed hidden
|
||||
* @property {string} CHANGED_SOURCE Changed source
|
||||
* @property {string} MERGED_OBJECTS Merged objects
|
||||
* @property {string} SPLITTED_TRACK Splitted track
|
||||
* @property {string} GROUPED_OBJECTS Grouped objects
|
||||
* @property {string} CREATED_OBJECTS Created objects
|
||||
* @property {string} REMOVED_OBJECT Removed object
|
||||
* @property {string} REMOVED_FRAME Removed frame
|
||||
* @property {string} RESTORED_FRAME Restored frame
|
||||
* @readonly
|
||||
*/
|
||||
const HistoryActions = Object.freeze({
|
||||
CHANGED_LABEL: 'Changed label',
|
||||
CHANGED_ATTRIBUTES: 'Changed attributes',
|
||||
CHANGED_POINTS: 'Changed points',
|
||||
CHANGED_OUTSIDE: 'Changed outside',
|
||||
CHANGED_OCCLUDED: 'Changed occluded',
|
||||
CHANGED_ZORDER: 'Changed z-order',
|
||||
CHANGED_KEYFRAME: 'Changed keyframe',
|
||||
CHANGED_LOCK: 'Changed lock',
|
||||
CHANGED_PINNED: 'Changed pinned',
|
||||
CHANGED_COLOR: 'Changed color',
|
||||
CHANGED_HIDDEN: 'Changed hidden',
|
||||
CHANGED_SOURCE: 'Changed source',
|
||||
MERGED_OBJECTS: 'Merged objects',
|
||||
SPLITTED_TRACK: 'Splitted track',
|
||||
GROUPED_OBJECTS: 'Grouped objects',
|
||||
CREATED_OBJECTS: 'Created objects',
|
||||
REMOVED_OBJECT: 'Removed object',
|
||||
REMOVED_FRAME: 'Removed frame',
|
||||
RESTORED_FRAME: 'Restored frame',
|
||||
});
|
||||
/**
|
||||
* Types of cloud storage credentials
|
||||
* @enum {string}
|
||||
* @name CloudStorageCredentialsType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} KEY_SECRET_KEY_PAIR 'KEY_SECRET_KEY_PAIR'
|
||||
* @property {string} ACCOUNT_NAME_TOKEN_PAIR 'ACCOUNT_NAME_TOKEN_PAIR'
|
||||
* @property {string} ANONYMOUS_ACCESS 'ANONYMOUS_ACCESS'
|
||||
* @property {string} KEY_FILE_PATH 'KEY_FILE_PATH'
|
||||
* @readonly
|
||||
*/
|
||||
export enum CloudStorageCredentialsType {
|
||||
KEY_SECRET_KEY_PAIR = 'KEY_SECRET_KEY_PAIR',
|
||||
ACCOUNT_NAME_TOKEN_PAIR = 'ACCOUNT_NAME_TOKEN_PAIR',
|
||||
ANONYMOUS_ACCESS = 'ANONYMOUS_ACCESS',
|
||||
KEY_FILE_PATH = 'KEY_FILE_PATH',
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum string values.
|
||||
* @name ModelType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @enum {string}
|
||||
*/
|
||||
const ModelType = {
|
||||
DETECTOR: 'detector',
|
||||
INTERACTOR: 'interactor',
|
||||
TRACKER: 'tracker',
|
||||
};
|
||||
/**
|
||||
* Task statuses
|
||||
* @enum {string}
|
||||
* @name MembershipRole
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} WORKER 'worker'
|
||||
* @property {string} SUPERVISOR 'supervisor'
|
||||
* @property {string} MAINTAINER 'maintainer'
|
||||
* @property {string} OWNER 'owner'
|
||||
* @readonly
|
||||
*/
|
||||
export enum MembershipRole {
|
||||
WORKER = 'worker',
|
||||
SUPERVISOR = 'supervisor',
|
||||
MAINTAINER = 'maintainer',
|
||||
OWNER = 'owner',
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of hex colors
|
||||
* @name colors
|
||||
* @memberof module:API.cvat.enums
|
||||
* @type {string[]}
|
||||
* @readonly
|
||||
*/
|
||||
const colors = [
|
||||
'#33ddff',
|
||||
'#fa3253',
|
||||
'#34d1b7',
|
||||
'#ff007c',
|
||||
'#ff6037',
|
||||
'#ddff33',
|
||||
'#24b353',
|
||||
'#b83df5',
|
||||
'#66ff66',
|
||||
'#32b7fa',
|
||||
'#ffcc33',
|
||||
'#83e070',
|
||||
'#fafa37',
|
||||
'#5986b3',
|
||||
'#8c78f0',
|
||||
'#ff6a4d',
|
||||
'#f078f0',
|
||||
'#2a7dd1',
|
||||
'#b25050',
|
||||
'#cc3366',
|
||||
'#cc9933',
|
||||
'#aaf0d1',
|
||||
'#ff00cc',
|
||||
'#3df53d',
|
||||
'#fa32b7',
|
||||
'#fa7dbb',
|
||||
'#ff355e',
|
||||
'#f59331',
|
||||
'#3d3df5',
|
||||
'#733380',
|
||||
];
|
||||
|
||||
/**
|
||||
* Types of cloud storage providers
|
||||
* @enum {string}
|
||||
* @name CloudStorageProviderType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} AWS_S3 'AWS_S3_BUCKET'
|
||||
* @property {string} AZURE 'AZURE_CONTAINER'
|
||||
* @property {string} GOOGLE_CLOUD_STORAGE 'GOOGLE_CLOUD_STORAGE'
|
||||
* @readonly
|
||||
*/
|
||||
const CloudStorageProviderType = Object.freeze({
|
||||
AWS_S3_BUCKET: 'AWS_S3_BUCKET',
|
||||
AZURE_CONTAINER: 'AZURE_CONTAINER',
|
||||
GOOGLE_CLOUD_STORAGE: 'GOOGLE_CLOUD_STORAGE',
|
||||
});
|
||||
|
||||
/**
|
||||
* Types of cloud storage credentials
|
||||
* @enum {string}
|
||||
* @name CloudStorageCredentialsType
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} KEY_SECRET_KEY_PAIR 'KEY_SECRET_KEY_PAIR'
|
||||
* @property {string} ACCOUNT_NAME_TOKEN_PAIR 'ACCOUNT_NAME_TOKEN_PAIR'
|
||||
* @property {string} ANONYMOUS_ACCESS 'ANONYMOUS_ACCESS'
|
||||
* @property {string} KEY_FILE_PATH 'KEY_FILE_PATH'
|
||||
* @readonly
|
||||
*/
|
||||
const CloudStorageCredentialsType = Object.freeze({
|
||||
KEY_SECRET_KEY_PAIR: 'KEY_SECRET_KEY_PAIR',
|
||||
ACCOUNT_NAME_TOKEN_PAIR: 'ACCOUNT_NAME_TOKEN_PAIR',
|
||||
ANONYMOUS_ACCESS: 'ANONYMOUS_ACCESS',
|
||||
KEY_FILE_PATH: 'KEY_FILE_PATH',
|
||||
});
|
||||
|
||||
/**
|
||||
* Task statuses
|
||||
* @enum {string}
|
||||
* @name MembershipRole
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} WORKER 'worker'
|
||||
* @property {string} SUPERVISOR 'supervisor'
|
||||
* @property {string} MAINTAINER 'maintainer'
|
||||
* @property {string} OWNER 'owner'
|
||||
* @readonly
|
||||
*/
|
||||
const MembershipRole = Object.freeze({
|
||||
WORKER: 'worker',
|
||||
SUPERVISOR: 'supervisor',
|
||||
MAINTAINER: 'maintainer',
|
||||
OWNER: 'owner',
|
||||
});
|
||||
|
||||
/**
|
||||
* Sorting methods
|
||||
* @enum {string}
|
||||
* @name SortingMethod
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} LEXICOGRAPHICAL 'lexicographical'
|
||||
* @property {string} NATURAL 'natural'
|
||||
* @property {string} PREDEFINED 'predefined'
|
||||
* @property {string} RANDOM 'random'
|
||||
* @readonly
|
||||
*/
|
||||
const SortingMethod = Object.freeze({
|
||||
LEXICOGRAPHICAL: 'lexicographical',
|
||||
NATURAL: 'natural',
|
||||
PREDEFINED: 'predefined',
|
||||
RANDOM: 'random',
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
ShareFileType,
|
||||
TaskStatus,
|
||||
JobStage,
|
||||
JobState,
|
||||
TaskMode,
|
||||
AttributeType,
|
||||
ObjectType,
|
||||
ObjectShape,
|
||||
LogType,
|
||||
ModelType,
|
||||
HistoryActions,
|
||||
RQStatus,
|
||||
colors,
|
||||
Source,
|
||||
DimensionType,
|
||||
CloudStorageProviderType,
|
||||
CloudStorageCredentialsType,
|
||||
MembershipRole,
|
||||
SortingMethod,
|
||||
};
|
||||
})();
|
||||
/**
|
||||
* Sorting methods
|
||||
* @enum {string}
|
||||
* @name SortingMethod
|
||||
* @memberof module:API.cvat.enums
|
||||
* @property {string} LEXICOGRAPHICAL 'lexicographical'
|
||||
* @property {string} NATURAL 'natural'
|
||||
* @property {string} PREDEFINED 'predefined'
|
||||
* @property {string} RANDOM 'random'
|
||||
* @readonly
|
||||
*/
|
||||
export enum SortingMethod {
|
||||
LEXICOGRAPHICAL = 'lexicographical',
|
||||
NATURAL = 'natural',
|
||||
PREDEFINED = 'predefined',
|
||||
RANDOM = 'random',
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1 +1,8 @@
|
||||
<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><circle stroke="#000" stroke-width="2" cx="20" cy="20" r="17"/><circle fill="#000" cx="20" cy="20" r="7.5"/></g></svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg viewBox="0 0 1024 1024" width="40" height="40" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="122.622" y="199.29" width="141.579" height="141.579" style="stroke: rgb(0, 0, 0); stroke-linejoin: round; stroke-linecap: round; fill-rule: evenodd; fill: none; stroke-width: 36px;"/>
|
||||
<rect x="712.768" y="203.339" width="141.579" height="141.579" style="stroke: rgb(0, 0, 0); stroke-linejoin: round; stroke-linecap: round; fill-rule: evenodd; fill: none; stroke-width: 36px;"/>
|
||||
<rect x="397.369" y="457.061" width="141.579" height="141.579" style="stroke: rgb(0, 0, 0); stroke-linejoin: round; stroke-linecap: round; fill-rule: evenodd; fill: none; stroke-width: 36px; paint-order: fill markers;"/>
|
||||
<rect x="110.006" y="778.065" width="141.579" height="141.579" style="stroke: rgb(0, 0, 0); stroke-linejoin: round; stroke-linecap: round; fill-rule: evenodd; fill: none; stroke-width: 36px;"/>
|
||||
<rect x="728.188" y="658.916" width="141.579" height="141.579" style="stroke: rgb(0, 0, 0); stroke-linejoin: round; stroke-linecap: round; fill-rule: evenodd; fill: none; stroke-width: 36px;"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<g xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 40 40">
|
||||
<ellipse style="fill: rgb(216, 216, 216);" cx="20" cy="20" ry="11" rx="11"></ellipse>
|
||||
<path d="M 39.462 2.335 C 39.134 2.204 38.755 2.278 38.507 2.518 L 34.866 6.053 C 30.955 2.151 25.733 0 20.162 0 C 18.985 0 17.795 0.098 16.63 0.298 C 8.691 1.637 2.262 7.4 0.248 14.988 C 0.181 15.241 0.24 15.514 0.404 15.722 C 0.572 15.931 0.824 16.053 1.097 16.053 L 6.677 16.053 C 7.043 16.053 7.375 15.829 7.501 15.494 C 9.133 11.155 13.19 7.849 17.837 7.065 C 18.602 6.935 19.38 6.869 20.153 6.869 C 23.845 6.869 27.293 8.302 29.862 10.91 L 26.162 14.502 C 25.914 14.747 25.838 15.11 25.973 15.429 C 26.107 15.747 26.427 15.955 26.78 15.955 L 39.125 15.955 C 39.609 15.955 40 15.576 40 15.106 L 40 3.118 C 40.004 2.776 39.79 2.465 39.462 2.335 Z" data-bx-origin="-0.660719 -0.618451"></path><path d="M 38.907 23.951 L 33.327 23.951 C 32.961 23.951 32.629 24.176 32.503 24.51 C 30.871 28.845 26.814 32.151 22.168 32.935 C 21.402 33.065 20.624 33.131 19.851 33.131 C 16.159 33.131 12.711 31.698 10.142 29.09 L 13.842 25.498 C 14.094 25.253 14.166 24.89 14.031 24.571 C 13.897 24.253 13.577 24.045 13.224 24.045 L 0.875 24.045 C 0.391 24.045 0 24.424 0 24.894 L 0 36.878 C 0 37.22 0.214 37.531 0.542 37.665 C 0.87 37.796 1.245 37.722 1.497 37.482 L 5.138 33.947 C 9.044 37.849 14.267 40 19.842 40 C 21.024 40 22.21 39.898 23.378 39.702 C 31.313 38.367 37.738 32.6 39.752 25.012 C 39.819 24.759 39.76 24.486 39.596 24.278 C 39.432 24.073 39.176 23.951 38.907 23.951 Z" data-bx-origin="-0.655168 -2.110973"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Downloaded from https://www.svgrepo.com/svg/109131/molecule -->
|
||||
<!-- LICENSE: CC0 License -->
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg width="40" height="40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 299.804 299.804" style="enable-background:new 0 0 299.804 299.804;" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M230.816,221.246l-46.06-29.289c8.208-17.846,5.962-38.875-6.195-54.673l52.241-52.896
|
||||
c26.33,17.897,62.197-1.061,62.197-32.979c0-21.974-17.878-39.851-39.852-39.851c-32.101,0-51.072,36.267-32.692,62.601
|
||||
l-52.238,52.893c-18.971-14.23-45.044-14.211-64.003,0.091L56.2,78.794c12.273-20.103-2.286-46.056-25.888-46.056
|
||||
C13.597,32.738,0,46.336,0,63.048c0,23.553,25.813,38.053,45.874,25.997l48.02,48.354c-26.674,34.86-1.796,85.694,42.378,85.694
|
||||
c16.278,0,30.867-7.337,40.659-18.868l46.061,29.29c-10.578,26.177,8.847,54.731,36.959,54.731
|
||||
c21.973,0,39.851-17.877,39.851-39.851C299.804,212.29,255.403,194.877,230.816,221.246z M253.147,26.108
|
||||
c13.951,0,25.301,11.35,25.301,25.301c0,13.952-11.35,25.302-25.301,25.302c-13.952,0-25.302-11.35-25.302-25.302
|
||||
S239.195,26.108,253.147,26.108z M30.311,78.808c-8.69,0.001-15.761-7.069-15.761-15.76s7.07-15.76,15.761-15.76
|
||||
c8.69,0,15.76,7.07,15.76,15.76C46.07,71.738,39.001,78.808,30.311,78.808z M136.272,208.543
|
||||
c-21.392,0-38.795-17.403-38.795-38.795c0-21.391,17.403-38.795,38.795-38.795c21.391,0,38.794,17.404,38.794,38.795
|
||||
C175.068,191.14,157.664,208.543,136.272,208.543z M259.952,273.696c-13.951,0-25.301-11.35-25.301-25.301
|
||||
c0-13.952,11.35-25.302,25.301-25.302c13.952,0,25.301,11.35,25.301,25.302C285.254,262.346,273.904,273.696,259.952,273.696z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,52 @@
|
||||
import React from 'react';
|
||||
import Popover from 'antd/lib/popover';
|
||||
import Icon from '@ant-design/icons';
|
||||
|
||||
import { Canvas } from 'cvat-canvas-wrapper';
|
||||
import { Canvas3d } from 'cvat-canvas3d-wrapper';
|
||||
import { ShapeType } from 'reducers';
|
||||
|
||||
import { SkeletonIcon } from 'icons';
|
||||
|
||||
import DrawShapePopoverContainer from 'containers/annotation-page/standard-workspace/controls-side-bar/draw-shape-popover';
|
||||
import withVisibilityHandling from './handle-popover-visibility';
|
||||
|
||||
export interface Props {
|
||||
canvasInstance: Canvas | Canvas3d;
|
||||
isDrawing: boolean;
|
||||
disabled: boolean;
|
||||
}
|
||||
|
||||
const CustomPopover = withVisibilityHandling(Popover, 'draw-skeleton');
|
||||
function DrawSkeletonControl(props: Props): JSX.Element {
|
||||
const { canvasInstance, isDrawing, disabled } = props;
|
||||
const dynamicPopoverProps = isDrawing ? {
|
||||
overlayStyle: {
|
||||
display: 'none',
|
||||
},
|
||||
} : {};
|
||||
|
||||
const dynamicIconProps = isDrawing ? {
|
||||
className: 'cvat-draw-skeleton-control cvat-active-canvas-control',
|
||||
onClick: (): void => {
|
||||
canvasInstance.draw({ enabled: false });
|
||||
},
|
||||
} : {
|
||||
className: 'cvat-draw-skeleton-control',
|
||||
};
|
||||
|
||||
return disabled ? (
|
||||
<Icon className='cvat-draw-skeleton-control cvat-disabled-canvas-control' component={SkeletonIcon} />
|
||||
) : (
|
||||
<CustomPopover
|
||||
{...dynamicPopoverProps}
|
||||
overlayClassName='cvat-draw-shape-popover'
|
||||
placement='right'
|
||||
content={<DrawShapePopoverContainer shapeType={ShapeType.SKELETON} />}
|
||||
>
|
||||
<Icon {...dynamicIconProps} component={SkeletonIcon} />
|
||||
</CustomPopover>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(DrawSkeletonControl);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue