8000 GitHub - kznovo/rectangle-annotation: Annotates images with multiclass bounding boxes
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kznovo/rectangle-annotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R(ectancle)annotation - Bounding box annotation tool

Rannotation is a tool to annotate images with rectangular bounding boxes of multiple categories.

sample usage description
example1 - Add label with a click.
- Use the markers around the label to resize.
- Drag, or use "hjkl" keys to move the label.
- Double click or press delete/d key to erase the active label
example2 - Active label appears as light green, while inactive label appears dark green.
- You can edit the active label's coordinates and categories
- Switch active label's category with number keys.
- Switch active labels by tab key
example3 - All the changes made will be overwritten to the csv
- The labels will be loaded from the csv from the next time the same image is opened

Installation

pip install rannotation

Usage

  1. Prepare images in a directory.
  2. Create a labelmap in json format. Ex:
[
    {
        "id": 1,
        "label": "Pedestrian"
    },
    {
        "id": 2,
        "label": "Car"
    },
    {
        "id": 3,
        "label": "Truck"
    },
    {
        "id": 4,
        "label": "Stopsign"
    }
]
  1. Prepare a csv file. If it's the first time usage, the tool will create a new csv file for you. If you want to resume from the previous work, prepare the csv output from then.

  2. Start with rannotate command with 3 arguments:

rannotate \
    --img_dir \
    --csv_path \
    --labelmap_path
  • Mouse:

    • Click on image : create new label OR deactivate labels

    • Click on a label : activate the label

    • Drag a label : move the label

    • Drag a marker : resize the label

    • Double click on a label : delete the label

  • Keys:

    • Enter : Save

    • Tab : Activate a label / switch active labels

    • Delete or d : Delete active label

    • h : Move an active label a few steps left

    • j : Move an active label a few steps down

    • k : Move an active label a few steps up

    • l : Move an active label a few steps left

    • b : Go to the previous image OR activate the previous label

    • n : Go to the next image OR activate the next label

    • s : Show/hide labels

    • q : Quit app

    • 1-9 : Label category on the active label

    • i : Predict labels using the prediction model

Sample usage

  1. Clone this repo
  2. Install rannotation
  3. Use ./sample/annotation_tool_sample_sample.csv, ./sample/labelmap.json, and ./*.jpg for sample data

Notes

  • csv should contain the following fields:
    ['filename', 'obj_name', 'xmin', 'ymin', 'xmax', 'ymax']
    If there's no csv file in the path then a new csv file will be created.

  • Currently the tool only supports up to 10 categories.

About

Annotates images with multiclass bounding boxes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0