Skip to content
/ Emota Public

The Rails backend of Emota, a tool used to aid individuals with autism spectrum disorder, in conversations

Notifications You must be signed in to change notification settings

owlee/Emota

Repository files navigation

Emota is a tool to aid indviduals, with autism spectrum disorder, in conversations. The Emota hardware includes a camera/PCB/rasp pi that takes photos of conversation partner. Emota Rails listens for photos on the server, preprocesses photos with autogamma (imagemagick), sends info to Microsoft Emotion recognition API, receives/logs emotion scores back, and delivers to individuals via SMS or notifications to an Apple smart watch.

ec2-54-218-83-121.us-west-2.compute.amazonaws.com/emota/detected_faces

Emota Rails features the following:

APIs

  • Microsoft Emotion API client

  • Amason SNS client

  • (TBD) APNs – Apple Notifications

Application

  • Logging of all Emotum data

  • The arrival times of different stages to the data

  • Image comparison with processed images (imagemagick)

currently, only autogamma is used for luminance boosting

  • Score comparisons between post-processed images

  • Rails page of all logged data: detected faces, and all pictures

  • (TBD) Emoji of the most dominant emotion

  • (TBD) Conversation separation or picture specific scenarios

  • (TBD) Mood associated with conversations

  • (TBD) Deviations from conversation mood

  • (TBD) Tests!! Rspec!! (Wanted to push out functionality for review first)

  • (TBD) Capistrano

  • (TBD) Pusher API for dynamic feed

  • (TBD) Algorithm/Facial detection (OpenCV) to detect faces before sending to API (reduce latency/ not boggle DB)

  • (TBD) Code cleanup

# >> Running Emota Logger <<

  1. Run the application in production (or dev)

  2. Run rails runner on Emotum.listen to listen for updates on images (Maybe as task later) (TBD)

  3. Create symbolic link the drop folder for images is outside of the rails directory

ln -s #{source folder} #{destination folder}
  1. Drop photos into the folder and log away

tmux: (terminal multiplexer) # — Running in background —

tmux
rails runner Emotum.listen
ctr+d, b # detach from session

# — Open up the runner again —

tmux ls
  //find the open sesion
tmux attach -t 0

# — Closing the connection —

1. attach and close
or
2. tmux kill-session

# >> RESTful functionality << NOTE: could be more generic but these features were requested

/emota/last_n_faces.json?num=params

no params -> defaults to 0 or 404 no faces found
under limit -> 404
within limit -> returns n valid faces
over limit   -> returns all valid faces

/emota/latest.json

no database entry    -> 404
valid database entry -> latest valid face

/conversations.json?date=params

params format %d-%m-%y
valid date

-> all conversations of that date -> 404 no conversations found on that date

invalid date

-> 404 conversations not found on that unknown date

empty params

-> defaults to 01-01-2001 or 404 no convo found on that date

/conversations/params.json

params format is a decimal
valid param      -> returns all emotions of that entry
invalid params -> 404: record is not found

About

The Rails backend of Emota, a tool used to aid individuals with autism spectrum disorder, in conversations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published