Depth learning training needs to mark the location and category of images, used before is called Bbox-label-tool-master, the encounter of large images is not complete, there is no adaptive scaling, this is the improved Python script.
Directory structure: Picture directory name images, label directory name labels, image directory under various categories of directory name to 001,002,003,... The format name.
This is the screenshot when the Labeltool (Python main.py) is running, and the image frame records the proportional value,
Shortcut key a,d before and after the image, ESC cancel the current box
Python script main.py:
[Python] View Plain copy # -*- coding:utf-8 -*- #----------------------------- -------------------------------------------------- # name: Object bounding box label tool # purpose: Label object bboxes for ImageNet Detection data # author: qiushi # created: 06/ 06/2014 # #----------------------------------------------------------------- -------------- from __future__ import division from tkinter import * import tkmessagebox from pil import image, imagetk import os import glob import random & nbsp; w0 = 1; #图片原始宽度 h0 = 1; #图片原始高度 # colors for the bboxes colors = [' red ', ' blue ', ' yellow ', ' pink ', ' cyan ', ' green ', ' black '] # image sizes for the examples size = 256, 256 #指定缩放后的图像大小 dest_size = 500, 500 class labeltool (): def __init__ (self, master): # set up the main frame self.parent = master self.parent.title ("Labeltool") self.frame = frame (self.parent)   self.frame.pack (fill=both, expand=1) self.parent.resizable (width = true, height = true ) # initialize global state