A simple annotator for labeling images or repairing labels.
- python 3.x
- cv2 (opencv-python)
- matplotlib
- "a": change to mode [annotate] (a polygon labeling mode);
- left button: draw a polygon, set key points (it will end when a point near the initial one);
- backspace: retract the last stroke of the polygon;
- "b": change to mode [bbox];
- left button: draw a bounding box as label;
- "c": change to mode [change];
- left button: change the label of target instance to set label;
- right button: change the target label of the whole image to set label;
- "x": (x in [0,9]) : set a label (x), 0 can be used as eraser;
- "`": set a label (255);
- "-": auto set a unused label;
- "ctrl+z": revocation;
- "esc": quit;
- "enter": save output in [--out] and quit;
python simple_annotator.py --img img.jpg --out out.png
python simple_annotator.py --img img.jpg --gt gt.png --out out.png
If you have any questions, feel free to contact me via: frazer.linzheng(at)gmail.com
.
For more about interactive segmentation or useful annotation tools, feel free to visit my homepage.