@zityspace/react-annotate v0.11.1
react-annotate
React library for annotating computer vision dataset. Currently it supports annotating points, lines, boxes, segmentation masks.
Status
Still in development.
Install
For production: yarn add @ZitySpace/react-annotate
, or npm install @ZitySpace/react-annotate --save
. For development: yarn link @ZitySpace/react-annotate
.
Simple Example
// import the component and css
import { Annotator } from '@ZitySpace/react-annotate';
import '@ZitySpace/react-annotate/dist/index.css';
...
const App = () => {
...
return (
<div className='h-screen w-screen'>
<Annotator imagesList={imagesList} /> // use
</div>
);
};
For specific example, visit here
Annotator
Props
- ⚠️ imagesList: required
- type: ImageData[]
- description: all the image and annotation data required
- initIndex: optional
- type: number
- description: first image's index
- onSave: optional
- type: (curImageData: ImageData, curIndex: number, imagesList: ImageData[]) => void
- description: will be invoked when the save button was clicked
- onSwitch: optional
- type: (curImageData: ImageData, curIndex: number, imagesList: ImageData[], type: "prev" | "next") => void
- description: will be invoked when the prev/next button was clicked
Development in the repo
- run
yarn install
under root path to install dependencies. - run
yarn dev
to watch and hot build the library. - run
yarn install
andyarn start
under example folder to hot build the example. - edit library source code and see changes in the example UI.
Documentation
Keyboard shortcuts
Backspace
/Delete
: delete the selected annotationR
: toggle drawing mode to RectangleO
: toggle drawing mode to PointL
: toggle drawing mode to LineP
: toggle drawing mode to PolygonV
: toggle annotations' visibility<
/←
: switch to previous image>
/→
: switch to next imageCtrl
+R
/Cmd
+R
: toggle annotation alter history between current and origin stateCtrl
+Z
/Cmd
+Z
: undo last annotation alterCtrl
+Shift
+Z
/Cmd
+Shift
+Z
: redo last annotation alterCtrl
+S
/Cmd
+S
: save annotations
Reference
License
Apache 2.0 © ZitySpace
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago