Giter Club home page Giter Club logo

label-tool's Introduction

Image Labeling Tool

This web app allows you to label images, draw bounding boxes, shapes, collect information in forms with dropdowns, checkboxes and inputs.

The labeling UI provides a lot of features for drawing polygon shapes, editing them with assisted tracing with auto-tracing based on edges or an external ML model.

Use it when you need to segment and label multiple images, either yourself or by a group. This tool makes it easy to gather and later export the data in a format compatible with LabelMe. You can use this tool as an alternative to self-hosted tools like LabelMe, js-segment-annotator, etc or hosted services like LabelBox.

Demo of the labeling interface with all data served statically (no persistence, reverts on refresh).

Screenshots

Bounding box labeling:

Segmentation with polygons:

Automatic tracing:

Assisted segmentation with Tensor Flow Serving:

Project configuration and custom labeling UI:

Development

Install npm packages for client, server and the top-level folder:

yarn install
cd server && yarn install && cd ..
cd client && yarn install && cd ..

The server will run migrations on the first run if the database file doesn't exist already.

Run in the development mode:

env PORT=3000 API_PORT=3001 yarn start

Build For Production

Build the client app:

cd client && yarn run build && cd ..

Now you can run the server app in prod mode serving the client build:

env PORT=80 NODE_ENV=production node server/src/index.js

Config

The following environment variables can be tweaked:

  • PORT - the part the app is served on (dev, prod)
  • API_PORT - to differentiate the port for the API to run on (should be only used in dev)
  • UPLOADS_PATH - absolute path where the app stores uploaded images, defaults to server's folder 'uploads'
  • DATABASE_FILE_PATH - absolute path of the file where the app stores the SQLite data. Defaults to database.sqlite in the server folder
  • ADMIN_PASSWORD - sets a simple password on all non-labeler actions (stored in a hased form).

Run in Docker

The default Dockerfile points to /uploads and /db/db.sqlite for persisted data, make sure to prepare those in advance to be mounted over. Here is an example mounting a local host directory:

mkdir ~/containersmnt/
mkdir ~/containersmnt/db/
mkdir ~/containersmnt/uploads/

Now build the container:

docker build -t imslavko/image-labeling-tool .

Run attaching the mounts:

docker run -p 5000:3000 -u $(id -u):$(id -g) -v ~/containersmnt/uploads:/uploads -v ~/containersmnt/db:/db -d imslavko/image-labeling-tool

Access the site at localhost:5000.

Run with docker-compose

  • Checkout the docker-compose.yml for detailed configuration.
  • Need to set & export environment variable CURRENT_UID before running.
# if it needs to build the docker image,
CURRENT_UID=$(id -u):$(id -g) docker-compose up -d --build

# if it only needs to run,
CURRENT_UID=$(id -u):$(id -g) docker-compose up -d

Project Support and Development

This project has been developed as part of my internship at the NCSOFT Vision AI Lab in the beginning of 2019.

label-tool's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

label-tool's Issues

Export another file

Hi , besides .json file , I want to export .xml file , binary image . What should I do in this project ?
Thanks !

Export

hi. nice tool.
about the export.. y tryed to open the exported data with labelme or labelimage, and it didnt work.
any other tool that might open this files?
thanks

how to use it?

yarn run build
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'run'

I am new to frontend, how to using this yarn tool anyway?

AMT connector

Hi Slava,

can this tool be connected to AMT, like getting the AMT-images and sending back the labels?

Regards

Auto-Tracing

Hello,
I am unable to export the data if I add another label to an already existing project. Could you please help me fix that?
Does it update the polygon co-ordinates if the auto-tracing is enabled after making the polygon?
It would be helpful if the tool could show the auto-tracing as the polygon is being made.
And do you plan to provide an option to download the segmentation masks directly?
Thanks!

Export json files error

Here is the msg:
This site can’t be reachedThe webpage at http://172.27.148.3:3000/api/projects/26/export might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE

Actually I have checked two times one by one, so I think maybe we should not cause error when someone was chosen while it was not labeled.

Export another file

Hi , besides .json file , I want to export .xml file , binary image . What should I do in this project ?
Thanks !

upload data error

Hi, I upload 5000 image for segmentatio task, it happen:

Error: Failed to fetch
image

what is wrong?

how do i install the tool?

dose it mean that i run command directly it will be ok to use the tool?
command :
yarn install
cd server && yarn install && cd ..
cd client && yarn install && cd ..

while it goes wrong:
Error: Could not find or load main class install

what is wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.