Google Summer of Code Final Report!
This is a summary of the entire work done on ‘Biometric Signals Sensor’s Interface’ for the Italian Mars Society (a sub-org under the Python Software Foundation) during GSoC 2017.

As Google Summer of Code 2017 draws to a close, I’d like to summarize my work for the IMS on the project ‘Biometric Signals Sensor’s Interface’. It was an amazing experience to work with four amazing people — Antonio Del Mastro, Mario Tambos, Ambar Mehrotra (they were the mentors) and Abhijith (a fellow GSoC student whose project and mine were pretty closely coupled) (link to my GitHub profile)
This post aims at linking and listing out all the work done during my project and the relevant commits, along with the possible work to be done in the future. I will also touch upon my experiences.
To put it concisely, my project was all about researching and implementing Anomaly Detection algorithms for the collected biometric data. The first task in the Community Bonding Period was to search the market for biomedical devices which fit our use case. I was lucky enough to stumble upon the Hexoskin vest. The device itself was state of the art. Moreover, the dedicated support and APIs that the guys at Hexoskin provide to developers like us was just great. Also, throughout the summer, they were there to provide help and support with any technical matter concerning the device and its software (a big shout out to you guys!) The mentors approved of this device and Abhijith and I got our vests for testing and development.
The next thing for me was to come up with a plan on what algorithms to implement, given that we now had our biometric data from the vest. After a lot of hard work, I decided on implementing Atrial Fibrillation AD, Ventricular Tachycardia AD, APC & PVC AD, Respiratory AD and Sleep AD. I’m glad to say that all of the deliverables have been implemented and integrated. It was tough to read the research papers at first, since they involved a lot of biological terms and electronics/electrical related terms (which I was not quite familiar with), but over time I grew fairly comfortable with reading and understanding the algorithms in those papers — the learning curve was pretty steep. It was completely open ended. I had to come up with what data features (of the Hexoskin) to use, what AD algorithms to implement, etc. There was also this requirement that the AD algorithms were looking at finding out space-related anomalies and not the average everyday health monitoring system anomalies. They also needed to be fast as data processing was in real-time. The project had a Data Science flavor to it as the modeling was as important as the code written. This blog post has more details.
When the coding period began, for the first month, I just slogged away real hard as it was pretty tough to get a hang of things initially. In the period before the first evals, I was done with Atrial Fibrillation and Ventricular Tachycardia. VT was my first really tough algorithm. This blog post has more details. One more thing that I would like to add here is that Abhijith was working on the Front-End of things (okay, a bit of Back-End too as he had to get the real time data for my algorithms through the Tango device server) to display all of the anomalies through a web dashboard. He’s done some kickass work and the display looks great. More info on his work can be found through his blog. We got to learn a lot from each other. Sometimes I would make mistakes and he would sniff them out and other times I would spend sleepless nights debugging his code for the integration (between the front-end and the AD algorithms) We learned a lot of debugging and working as a team (along with the mentors) to commit code in a timely phased manner, so that the deliverables were available on time.
The second period involved implementing APC & PVC AD as well as starting work on the Respiration AD. APC & PVC was a huge task and involved a lot of learning. This blog post has more details. By the time I got to Respiration though, I was fairly comfortable with the workflow, the structure of code to be written and on what is to be done. This blog post has more details. I had to complete most of the work by the second period as a new college semester would start in August and there would be a lot less time available for this.
In the third period, I got around to completing the Respiratory AD — this AD algorithm was more of experimentation to see what rules work and yield the best results. This blog post has more details. Finally, it was time for the last deliverable — the Sleep AD — for the first time, the work was rather short and easier than expected! This blog post has more details. The rest of August was spent on scrubbing the code, finishing the integration and writing the docs. Then it was time for this final blog post!
LINKS
The links to individual merged GSoC PRs:
- Added Atrial Fibrillation anomaly detection
- Ventricular tachycardia
- APC_PVC
- Respiratory AD
- Some tweaks in parsing
- Respiratory AD
- Respiratory AD integration
- Sleep AD
- Removed unused imports and added logging
To sum it up, I was responsible for all the work in this directory.
These are some of the videos I’d made for the evaluations (except the first one of course!)
Work that might be done after GSoC —
- The Hexoskin device had a small limitation that only one of the heart or the breathing related data could be got in real time at given time. Maybe we could seek help from their team in overcoming this small limitation.
- The other thing that could be done is to verify the correctness of implementation of all of the AD algorithms with the help of a Biometrics expert.
- Yet another possibility is to set this up on an EC2 instance. In that way, anyone who’s interested could demo it themselves.
On a side note, one of the points that I would like to mention to Google’s GSoC program admins is that sometimes it gets really depressing to work all alone (fortunately I had Abhijith to work with and derive motivation from) We see some of our friends interning at various companies posting pictures of team outings/lunches/dinners and it feels lonely sometimes. It would be great if there were get-togethers of fellow GSoCers and mentors at local Google offices (the ones that happened were very few and very far in between — maybe a couple of them?) This would make the program a lot more enjoyable. As is Purchase Power Parity guidelines have been implemented and the stipend is pretty low for the amount of work that’s done.
To conclude, it’s been a real pleasure to work for the IMS and the Python Software Foundation on this GSoC project. I’ve learned a lot from this. Special thanks to Antonio, Mario, Ambar, Abhijith, the Hexoskin team and the other open source hackers whose code I’ve used as a part of this project (please refer to the readme here for more details) The idea of Open Source rocks. A summer well spent!