Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study...

21
Fall Detection – From Phone to Cloud -Archiving Phone Data on Cloud Server Student: Manvick Paliwal Advisor: Dr. Anne Hee Hiong Ngu

Transcript of Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study...

Page 1: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Fall Detection – From Phone to Cloud

-ArchivingPhoneDataonCloudServer

Student:ManvickPaliwal Advisor:Dr.AnneHeeHiongNgu

Page 2: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

What Fall Detection is all about?

Page 3: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Introduction

•  ThisIndependentStudyisaboutaFallDetectionSensorApplicationwhichwillhelpdetectifsomeonehasfallendown.Thisapplicationisspeciallydesignedforelderlypeople,butanyonecanuseit.Thewaythisworksiswecollectstreamingsensordatafromasmartwatch.Thesensordatacollectedisthemprocessedtoextractkeyfeaturesrelatedtofallingonasmartphone.ThisprocesseddataisthenfedintoaNaiveBayesmachinelearningalgorithmwhichanalyzesandoutputfallornotfallastheoutcome.

Page 4: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Objective

• Archivingofsensordatatothecloudrobustly.•  Improvingtheaccuracyofthefalldetectionmodelbyretrainingusingarchivedfalsepositivedata.

Page 5: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Raw Data

• Rawdataisstreamedfromthesmartwatchatasamplingfrequencyof32milliseconds.• Westorethisdatainsideafoldernamed“RawData”.• Wewriterawdatatoafilenamecur_timestampunder“RawData”folder• Afterevery5minuteswerenamethisfiletoupload_timestampandcreateanewcur_timestampfileandstartwritingtothatfile.• Upload_timestamparethefileswhicharereadytobeuploaded.

Page 6: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

False Positive data

Twowaysinwhichfalsepositivedatacanbestored.•  Storingalltheprocesseddata(Notefficient)•  StoringTimeStamps(MoreEfficient)

Page 7: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone
Page 8: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

False Positive data Continued…

• Westorefalsepositivedatainsideaseparatefoldername“ProcessedData”.•  Filename:TimeStamps.csv•  TimeStampsatthetimefallhappenedislogged

Page 9: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Uploading

• Readingfromalltheupload_timestampfilesandsendingpostrequesttoserver.•  Ifallthedataofaspecificfileisuploadedsuccessfullyasuccesscallbackissentfromtheserver.• Onlyaftersuccesscallbackisreceivedfromtheserverwedeletethespecificfilefromthephone.

Page 10: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Chunking

• Challenges:Ifallsensordataiswrittentosamefileanduploadperiodically,Thefilegetsbiggerandbiggeranditisnotagoodpracticetouploadahugeamountofdataoverhttppostrequest.• AbettersolutionisbasedonuploadingChunks.•  Thesizeofeachchunkisapproximately512kbandeachfilechunkiscreatedevery5minutes(300seconds).

Page 11: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Robustness with 2 phones

• AllthedataisuploadedcorrectlyandinarobustwaywithTwomobilesuploadingdatasimultaneously.•  IfProgramisclosedin-betweenoftheuploadingprocessnoneofthedataislost.•  IftheInternetconnectionislostintheprocessofuploadingofdatathedatawhichisarchivedisdeletedandthedatawhichisnotarchivedissavedsecurelyonclientdevice.•  Eachfileisapproximatelyof512kb.

Page 12: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Processed data

Page 13: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Time Stamp

Page 14: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Processed data script

•  Thisscriptcreatesfalsepositiverawdataonserverusingtimestampsandrawdata•  ThisrawdataisthenpushedtoRscripttocreateprocesseddata.•  Theprocesseddataisthenfinallymergedwithexistingtrainingdatatoretrainthemodel.

Page 15: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Algorithm

•  GetfalsepositiveTimeStamp(byqueryingFalsePositivetable)•  GetSampleIDofeachTimeStampfromSampleMetaDatatable•  Retrieve50sampleIdlessthanthecurrentsampleIdfromSampleMetatData•  Foreachofthe50sampleid,matchthecorrespodingsampleIDtogetalltheaccelermeterdata(Ax,Ay,Az)•  Storethedatainfalse_positive_timestamp.csv•  GobacktoStep2asandrepeatuntillallthefalsepositiveTimeStampisqueried.

Page 16: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Cloud Server

• WehaveaphpserverwithMySQLasthebackend.TherearetwophpscriptswhicharereadytoacceptthedatainJSONformatandinsertitintoMySQLdatabase.•  insertRawData.php•  insertTimeStamps.php

Page 17: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Open Problems

•  SQLite•  TimeStampisnotaccurate.•  Useofclientsidedatabasewillhelpcollectmoreaccuratefalsepositivedata.

•  Systemgetsslow•  Clearprocesseddatafile.•  Circularqueuedatastructurecanbeused.

•  SystemshouldbeRetrainedwithallthetruepositiveandfalsepositivedata• Wehaven’tretrainedthemodelwithsufficientdata•  Ifuserdon’twanttouploadthedatathesystemwillcrasheventually

Page 18: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone
Page 19: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone
Page 20: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Conclusion

• Chunking•  Developedprotocoltouploadandarchivedatasensordatafromphonetocloudrobustly.•  Dataisdividedintochunksandthenuploaded.

•  TimeStamps•  Presentedamethodtoreducetheamountofdatatobeuploaded.•  Insteadofuploadingalltheprocesseddataonlytimestampscanbeuploaded.

Page 21: Fall Detection – From Phone to Cloudhn12/thesis/Manvick.pdfIntroduction • This Independent Study is about a Fall Detection Sensor Application which will help detect if someone

Thank you -Manvick