Skip to content

A simple tool for labeling object bounding boxes in images

License

Notifications You must be signed in to change notification settings

hatobus/BBox-Label-Tool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBox-Label-Tool

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

Updates:

  • 2017.5.21 Check out the multi-class branch for a multi-class version implemented by @jxgu1016

Screenshot: Label Tool

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
| |--rename_resize/ *# rename and resize Image file

Environment

  • python 2.7
  • python PIL (Pillow)

Run

$ python main.py

Usage

  1. The current tool requires that the images to be labeled reside in /Images/001, /Images/002, etc. You will need to modify the code if you want to label images elsewhere.
  2. Input a folder number (e.g, 1, 2, 5...), and click Load. The images in the folder, along with a few example results will be loaded.
  3. 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.
  1. After finishing one image, click Next to advance. Likewise, click Prev to reverse. Or, input an image id and click Go to navigate to the speficied image.
  • Be sure to click Next after finishing a image, or the result won't be saved.

Usage resize_convert

BBox tool's picture ext is "*.JPEG". But some jpeg file's ext is "*.jpg" "*.jpeg" "*.jpe". And, deeplearning framework has image sizes limit.

  1. To check framework's image sizes limit.
  2. Resize class's first argument is width, second argument is height.
  3. Default resize size is 256 * 256. If you need it, you need to change
  4. When you run this python file need 2 argument. 1st argument is path to image file. 2nd argument is path to output folder.

About

A simple tool for labeling object bounding boxes in images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%