Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added BBox_with_angle-Label-Tool.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 49 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,63 @@
BBox-Label-Tool
BBox\_with\_angle-Label-Tool
===============

A simple tool for labeling object bounding boxes in images, implemented with Python Tkinter.

Data Organization
-----------------
LabelTool
|
|--main.py *# source code for the tool*
|
|--Images/ *# direcotry containing the images to be labeled*
|
|--Labels/ *# direcotry for the labeling results*
|
|--Examples/ *# direcotry for the example bboxes*
>LabelTool
>|
>|--main.py *# source code for the tool*
>|
>|--Images/ *# direcotry containing the images to be labeled*
>|
>|--Labels/ *# direcotry for the labeling results*

Dependency
----------
python 2.7 win 32bit
PIL-1.1.7.win32-py2.7
- python 2.7
- PIL-1.1.7.win32-py2.7

Startup
-------
```
$ python main.py
```

Usage
-----
1. Input a number (e.g, 1, 2, 5...), and click 'Load'. The images along with a few example results will be loaded.
2. To create a new bounding box, left-click to select the first vertex. Moving the mouse to draw a rectangle, and left-click again to select the second vertex.
- To cancel the bounding box while drawing, just press <Esc>.
- To delete a existing bounding box, select it from the listbox, and click 'Delete'.
- To delete all existing bounding boxes in the image, simply click 'ClearAll'.
3. After finishing one image, click 'Next' to advance. Likewise, click 'Prev' to reverse. Or, input the index and click 'Go' to navigate to an arbitrary image.
- The labeling result will be saved if and only if the 'Next' button is clicked.
Usages
------
* Input a **`[dir path]`** in **Image/**, and click 'Load'. The images will be loaded.
* To create a new bounding box, follow three steps:
1. First, left-click to select the first vertex. Moving the mouse to draw a rectangle.
2. Second, left-click again to select the second vertex. Moving the mouse to rotate the rectangle.
3. Last, left-click again to fix the rectangle.
* To cancel the bounding box while drawing, just press <kbd>Esc</kbd>.
* To delete a existing bounding box, select it from the listbox, and click 'Delete' or press <kbd>Del</kbd>.
* To delete all existing bounding boxes in the image, simply click 'ClearAll'.
* After finishing one image, click 'Next' or press <kbd>PgDn</kbd> to advance.
* Likewise, click 'Prev' or press <kbd>PgUp</kbd> to reverse.
* Or, input the index and click 'Go' to navigate to an arbitrary image.
* The labeling result will be saved if and only if the 'Next' button is clicked.

![BBoxToolGIF](BBox_with_angle-Label-Tool.gif)

Label Format
------------
- `BBox_num`:number of bounding box
- `xc`:rectangle center `x`
- `yc`:rectangle center `y`
- `w`:`width` of the rectangle
- `h`:`height` of the rectangle
- `theta`:`angle` of the rectangle

```
BBox_num
xc yc w h theta
.
.
.
```

Reference
---------
This original Tool is fork from [puzzledqs/BBox-Label-Tool](https://github.com/puzzledqs/BBox-Label-Tool)