This is an annotation tool that helps you label the pupil area in your pictures. The tool works by fitting an ellipse by clicking on at least 5 points along the pupil boundary.
- Download annotation_tool.py and ellipses.py into the same directory.
- Run
$ python annotation_tool.py ./path/to/folder_of_your_pupil_pictures
- Left click to identify at least 5 points on the pupil boundary
The current annotation_tool.py only looks for pictures with extension names of .png and .jpg. However, it can be easily extended.
The annotation_tool.py was written by our colleague Taha Emre. It is based on an ellipse fitting method published by Radim Hal oy and Jan Flusser, and its python implementation (ellipses.py) by Ben Hammel and Nick Sullivan-Monlina. The latest implementation of the ellipse fitting method can be found in their Github repository.
oy, Radim Hal and Jan Flusser. “NUMERICALLY STABLE DIRECT LEAST SQUARES FITTING OF ELLIPSES.” (1998).
Ben Hammel, & Nick Sullivan-Molina. (2020, March 21). bdhammel/least-squares-ellipse-fitting: v2.0.0 (Version v2.0.0). Zenodo. http://doi.org/10.5281/zenodo.3723294