The PyEyeTrack Diaries: Code to Library





Commonly used functionality is typically bundled in a library so that it can be used by multiple people without the need for re-implementation. It is fairly straightforward to understand the mechanics of creating a library; python requires a particular directory structure that includes classes and functions and an init file to run the library. However, this is only part of the story. In this talk, we focus on the design and mindset needed to create and release a library. We discuss issues around how to encapsulate the implementation while exposing a useful API to the end-user.

Our discussion is based on our experiences with building and releasing PyEyeTrack (the Python eYe Tracking library). We initially implemented eye-tracking as part of a larger project. This was then used in other unrelated projects, and at each iteration, we modified the code, added a new interface, and extended the functionality, for example, to include blink-detection and support for debugging and development. A natural next step was to bundle this into a library so that we can focus on the application, and other developers can use it as well.

This was not as easy as we anticipated! There were implicit assumptions of how the code was to be used, knowledge of the data structure and organization was needed to use our implementation, and there was no uniformity of design or philosophy. We had to take a step back, think about how a user would leverage our library strictly through an API, and how to provide a robust implementation that is used in unanticipated ways. This talk generalizes the lessons we learned into principles that are applicable to library design and will be useful to anyone thinking about building and releasing their own.

Outline of the talk:

  1. Motivation to build PyEyeTrack - The Python Eye Tracking Library - 2 mins
  2. Mechanism and guides for building a library - 1 min
  3. Our approach and learnings - 20 mins

    a. User perspective
    b. Stages of abstraction
    c. Levels of Reusability
    d. Applications
    e. Other things to keep in mind

  4. Outcome/result - 2 mins

  5. QnA - 5 mins

Contributors: Kanchan Sarolkar, Kimaya Badhe, Neha Chaudhari and Shrirang Karandikar.


Basics of python

Video URL:

Speaker Info:

Hi! I'm Kanchan Sarolkar. I should have completed my BTech in Computer Engineering from Cummins College, Pune, but am currently in limbo due to the pandemic shutdown. My technical interests are in the areas of machine learning and data science, for which I use Python extensively. I have been a part of the AICVS(Artificial Intelligence & Computer Vision Society) research team at Cummins College. I have also had the honor of being a global ambassador at WomenTech Network. I am specifically interested in developing solutions that have a practical impact on society, which is what led me to work on eye-tracking. During my internship at AlgoAsylum, I explored various applications of eye-tracking with my team. My team(Kimaya, Neha, Shrirang) has filed patents related to improving reading performance and document security, and we have developed solutions that can detect dyslexia. On a lighter note, I enjoy playing our version of a slots machine, which is controlled by eye blinks.

Section: Core Python
Type: Talks
Target Audience: Intermediate
Last Updated: