Giter VIP home page Giter VIP logo

dataset_labeling's Introduction

Dataset labeling

TODO

  • Hide boxes

Start the annotation service using docker

Specify the following environment variables:

  • IMAGES_PATH the folder containing the images to label
  • HUMAN_ANNOTATIONS_PATH the folder to store the (future) human annotations
  • MODEL_ANNOTATIONS_PATH optional, the folder containing pre-annotations (typically, generated by a model, for humans to check and correct).
  • CLASS_NAMES a non-empty list of class names (can be just one class).
  • CLASS_COLORS optional, sets the color of each class' bounding box. Must be of the same length as CLASS_NAMES .

Then start the server with docker-compose up. It will build the docker image if needed. For instance, for testing purposes:

export IMAGES_PATH=$(pwd)/assets/images
export HUMAN_ANNOTATIONS_PATH=$(pwd)/assets/human_annotations
export MODEL_ANNOTATIONS_PATH=$(pwd)/assets/model_annotations
export CLASS_NAMES=truck,red,orange,black
export CLASS_COLORS=#e5ff00,#ff0000,#ff7f00,#000000

mkdir -p $HUMAN_ANNOTATIONS_PATH # otherwise it would be created by docker/root and be unwritable
docker-compose up

You may define those env variable in the file .env, which is read by docker-compose. See sample.env for an example.

Please note that a file "class_names.txt" will be created in MODEL_ANNOTATIONS_PATH with the list of the class names. This file is useful for the next step: generating the tfrecord files.

Start the annotation service without docker

If everything is installed on your host computer, you can start the annotation service by running:

python3 app.py --images_path= \
               --human_annotations_path= \
               --model_annotations_path=

the images need to be in the static/ folder to be served with flask

Check the annotations

The annotation server can be hacked to check the annotations:

  • copy the human annotations to the model preannotations folder
  • launch a new server (different name and port) with docker-compose_check-annotation.yml .

Optional: preannotate images with a frozen model

Run cd tools/machine_annotation && python3 app.py . This script can be run from a docker container built with tools/machine_annotation/(cpu/gpu)-Dockerfile .

Optional : extract frame from a video

Run cd tools && python3 burst_video.py

To know the different options you can use, you can use the '--help' argument. You can provide these option using the command line, environment variables or by populate the config_video_bust.yml file created the first time you run the script

Contributing: code architecture

  • app.py contains the Flask backend code
  • front/src/App.vue contains the frontend template. To draw the rectangles on an image, it uses the custom rectangle component, defined below.
  • front/src/components/Rectangle.vue defines the rectangle component.

dataset_labeling's People

Stargazers

 avatar

Watchers

 avatar  avatar

dataset_labeling's Issues

Manage the zoom

Actually, we manage the zoom with mouse wheel and the browser zoom.

  • add an hotkey ("Z"?) to magnify unmagnify the picture

add a screen wide crosshair

  • Change the mouse shape from the arrow to a crossair
  • Display horizontal and vertical lines following the mouse

Block selection without releasing the mouse button.

Actually, to select a block we should click the mark the first corner, move the mouse then click to mark the last corner.

We want to use this sequence, press the mouse button to mark the first corner, move the mouse the release the mouse button to mark the second corner.

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.