Saturday 22 July 2017

GSoC 2017: Second Evaluations

As laid out in my previous post, development of the Tango Device Server for the Biometric Signal Sensor's Interface and the Graphical User Interface (GUI) for the hexoskin smart shirt data collection and anomaly detection were the next milestones in line for the completion of this project.

The Tango control system is a free open source device-oriented controls toolkit for controlling any kind of hardware or software. The Tango Device server for the project is the heart of the project that integrates all the modules/components of the system. It provides various endpoints that is used for the monitoring of the astronauts.

The Tango Device Server is built by defining a server class that inherits from the Device class, using PyTango. The class definition consists of mainly two items:
  • Attributes
  • Commands
The attributes are certain variables that characterize the class and it's instances. The Biometric Device server has the following attributes.
  • username
    Username of the astronaut | Read-only | string
  • recordID
    Record ID of the current live session. Hexoskin records all the sessions of activities using record IDs | Read-only | integer
  • userinfo
    Astronaut account information as a JSON string. This is consumed by the GUI to display these details | Read-only | string
 The commands are the endpoints that is opened for the clients to call, to perform actions.
  • af_to_gui
    Atrial Fibrillation anomalies are retrieved from the database and provided to the client as a JSON string. This is consumed by the Flask GUI server that is the client.
  • vt_to_gui
    Ventricular Tachycardia anomalies are retrieved from the database and provided to the client as a JSON string. This is consumed by the Flask GUI server that is the client.
     
  • apc_to_gui
    APC/PVC and PVC-hamilton anomalies are retrieved from the database and provided to the client as a JSON string. This is consumed by the Flask GUI server that is the client.
     
  • start_monitoring
    This is the command used to start the biometric monitoring. It starts all the three anomaly detection algorithms developed till now - Atrial Fibrillation,
    Ventricular Tachycardia and APC/PVC and PVC-hamilton - in the background. 
This created Tango Device server is then added into the database using a small register_monitor.py script. Once the device server starts running, it is available to the client. In this case, the client is the GUI.

The graphical user interface has been developed using Python Flask, and the front-end is neatened up using Materializecss. The GUI is split up into web pages:
  1. The landing page :- This consists of the generic details of the astronaut such as the name, email ID, username, height, weight, etc. It also showcases basic biometrics such as Resting heart rate, BMI, VO2 max, respiration coefficient and much more.
    The major element in the landing page is the Astronaut status box. This box shows the condition of the astronaut. The box - when green - means that there has not been any detection of anomaly in the past X (say, 7) days. A red box (as shown in the picture below) depicts the state where there was an anomaly detected in the past 7 days.



  2. The anomalies page :- The anomalies detected - using Dipankar's anomaly detection modules - are displayed in this page. They are displayed graphically using interactive plots, using plot.ly. But instead of having the plot made online and embedding the plots inside website using the URL, the plots are made in the Flask Server using code, and displaying it on the front-end end using Plotly.js.


No comments:

Post a Comment