0.11.1 • Published 9 months ago

@zityspace/react-annotate v0.11.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

react-annotate

NPM JavaScript Style Guide

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

  1. run yarn install under root path to install dependencies.
  2. run yarn dev to watch and hot build the library.
  3. run yarn install and yarn start under example folder to hot build the example.
  4. edit library source code and see changes in the example UI.

Documentation

Keyboard shortcuts

  • Backspace / Delete: delete the selected annotation
  • R: toggle drawing mode to Rectangle
  • O: toggle drawing mode to Point
  • L: toggle drawing mode to Line
  • P: toggle drawing mode to Polygon
  • V: toggle annotations' visibility
  • < / : switch to previous image
  • > / : switch to next image

  • Ctrl+R / Cmd+R: toggle annotation alter history between current and origin state

  • Ctrl+Z / Cmd+Z: undo last annotation alter
  • Ctrl+Shift+Z / Cmd+Shift+Z: redo last annotation alter
  • Ctrl+S / Cmd+S: save annotations

Reference

License

Apache 2.0 © ZitySpace

0.12.0-beta.8

9 months ago

0.12.0-beta.7

9 months ago

0.12.0-beta.6

9 months ago

0.12.0-beta.5

10 months ago

0.12.0-beta.4

10 months ago

0.12.0-beta.3

10 months ago

0.12.0-beta.2

10 months ago

0.12.0-beta.1

1 year ago

0.11.1

1 year ago

0.11.1-beta.7

1 year ago

0.11.1-beta.6

1 year ago

0.11.1-beta.5

1 year ago

0.11.1-beta.4

1 year ago

0.11.1-beta.3

1 year ago

0.11.1-beta.2

1 year ago

0.11.1-beta.1

1 year ago

0.11.0

1 year ago

0.11.0-beta.2

1 year ago

0.11.0-beta.1

1 year ago

0.10.3-beta.3

1 year ago

0.10.3-beta.2

2 years ago

0.10.3-beta.1

2 years ago

0.10.2

2 years ago

0.10.2-beta.4

2 years ago

0.10.2-beta.3

2 years ago

0.10.2-beta.2

2 years ago

0.10.2-beta.1

2 years ago

0.10.1

2 years ago

0.10.1-beta.10

2 years ago

0.10.1-beta.9

2 years ago

0.10.1-beta.8

2 years ago

0.1.0

2 years ago