Status Update 10/27/2018

Aayush:

  • Used Prof. Low’s suggestion to do some pre-processing on the image before feeding it into the eye detection algorithm. In particular, I made sure the algorithm can work well with image of resolution less than the max resolution of the camera that we are planning to use. I did some testing to ensure that it works. I also did basic timing analysis using the specs of my laptop’s processor and that of the raspberry pi to figure out how the algorithm would scale as we move from laptop to raspberry pi. My rough estimations suggest that each image would take about 1.5 seconds.
  • Looked into how to receive data over Wifi in android app. Started thinking about various screens for the android app.
  • Going forward, I plan to develop the app and plot graphs using dummy data.

Angela:

  • I gathered more samples of accelerometer data. Some samples included rocking motions, regular daily motions (of an adult not a baby), and some different gestures. I also tried to include different types of jerk movements to see how my current algorithm can tolerate those motions.
  • I discovered that the accelerometer data gathered from my phone has inconsistent sampling rates, which can affect the results of the convolution and thresholding algorithm. I have been trying different ways of interpolating and also downsampling the data because my data is currently sampled at a very high frequency, which does not seem practical to use FFT’s.
  • The current time that it takes to determine if a sample is during sleep or wake is less than 1 second with a sample that has 20,000 data points.
  • I have tinkered with my parameters for convolution box sizes and
  • This week I plan on trying different time periods and sampling rates to see how well they perform at detecting sleep of my current data samples.

 

Priyanka:

  • I tried to get the Bluetooth module to work with the teensy-board and send data to the computer
  • However, I’m having trouble getting the HC-06 to pair with the computer for longer than 9-10 seconds. In that time, only one message is send and echoed back. I’m trying to diagnose the issue by playing with baud rate, USB connections etc but none seem to be working so far.
  • Also, the accelorometer is able to connect to the teensy but is not always registering changes in direction and velocity.  I need to diagnose this too but this is secondary to the bluetooth situation.

 

Status Update 10/20/2018

Priyanka:

  • set up MCU 6050 accelerometer and tried to set up MAX3050 for getting readings.
  • the MAX3050 component we have is not working so we are going to have to wait for a new one to come in.

Angela:

  • converted code to python
  • recorded accelerometer data from my sleep
  • updated version of open CV
  • updated the design doc
  • planned demo components
  • updated parameters in sleep wake algo

Aayush:

  • Worked on android app to gather accelerometer data for testing purposes. Later, realized that it is faster to just download an app from the play store and stopped working on the app
  • Tweaked the eye detection algorithm to make it work in dimly lit conditions. Used a couple of filters along with gamma detection.

Status Update 10/13/18

Aayush

  • Worked on the design review presentation and the design document
  • Came across a paper on “Real-time eye blinking detection using facial landmarks” and used that idea along with OpenCV and dlib to implement eye open/close detection algorithm. The algorithm maps 68 facial landmarks onto the input image.

Eye markers for open and closed eyes look like:

 

 

 

The algorithm then computes distances between the features for each of the eyes and averages them out to give a number. I trained it on various baby images and it seems to work really well. (only 1 out of 100 was incorrectly classified).

Correctly detecting open eyes:

Correctly detecting closed eyes:

  • I also developed a simple android application to save accelerometer data into a file on the phone so that we can use it to test sleep detection algorithm. The app currently saves acceleration along 3 x-axis, y-axis and z-axis.

Angela

  • Worked on the design review presentation and the design document
  • Identified important types of patterns that distinguish sleep and wake accelerometer data for the use cases that we were interested in
    • Sleep with short bursts of movement around once per minute
    • Regular activity, irregular acceleration
    • Regular activity, sinusoidal acceleration for motion artifact
  • Ran different simulations on simulated accelerometer data to measure accuracy
    • Got an accuracy of 99%
  • Ran simulations on simulated heart rate data with motion artifact and noise
    • Got an accuracy of 98%
    • BPM of 120 to 150
  • Reevaluated some testing data sets
  • Read papers on sensor fusion for computer vision
    • Goals for next week are to see how to apply this to our problem

Status update 10/6/18

Angela :
I implemented simple signal processing algos to identify sleep wake cycles, I tried to find different data sets to do sleep wake training on, I downloaded open CV.

Priyanka:

I set up the teensy board and set up arduino IDE to program the teensyboard. I also got all the parts and am trying to figure out how to program the different sensors.

Aayush:
I downloaded openCV, implemented basic face detection algorithm and sort of working eye open/close detection