Michigan Traffic Lab, University of Michigan
This repo provides a toolbox for image annotation. It also provides a brief tutorial on how to label fisheye traffic images for traffic object detection. This repo is based on Labelme, an open source graphical image annotation toolbox.
Install Anaconda first, then run below to install Labelme and opencv-python:
conda create --name=labelme python=3.6
conda activate labelme
pip install labelme
pip install opencv-python
Clone this repo:
git clone https://github.com/shengyinshen/fisheye-pedestrian-annotation.git
cd ./fisheye-pedestrian-annotation
Activate anaconda environment and open the Labelme software interface:
cd ./fisheye-pedestrian-annotation
conda activate labelme
labelme --labels labels.txt --nodata --autosave
Please follow the steps below to annotate your images.
-
Select your image folder here. By default, the folder should be
./image_with_label
, which contains those images to be annotated. -
Right-click and then select "Create Circle"
-
Annotate each pedestrian with two points - with the first point marked at the pedestrian's bottom center and the second point marked at the head. Choose a category from the drop-down menu ("pedestrian", "cycler", and "others"). Any pedestrians and cyclers within the red circle should be annotated.
-
When you finish labeling all pedestrians and cyclers within the valid area, click "Next Image" to move on to the next. The annotations will be saved automatically. You can skip those images if they don't have any objects of interests. Finally, all the annotations are saved as JSON files in the same image directory. The following screenshot shows how your image folders will look like after annotating all images. You can reload them to check whether the annotations are correct.
- Any pedestrians and cyclers within the red circle should be annotated. The pedestrians and cyclers located outside the circle should be ignored.
- When labeling the two points, please start from the pedestrain's bottom (usually the feet location) then move the pedestrain's head. Please DO NOT do this in the opposite order.
- You can use "Ctrl + scroll wheel" to zoom-in and zoom-out.
- If you accidentally mislabeled any of the objects, try right-click --> "Edit Polygons" and "Edit Label" to correct them.
- If you have any further questions, please contact Sean ([email protected]) or Zhengxia ([email protected]).