Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building a lightweight classifier for detecting clenching #1

Open
machow opened this issue Jan 7, 2016 · 5 comments
Open

Building a lightweight classifier for detecting clenching #1

machow opened this issue Jan 7, 2016 · 5 comments

Comments

@machow
Copy link

machow commented Jan 7, 2016

Hey, I'm building a grinding control device with a photon and similar components. I was thinking of trying initially to run it using the code here (it looks like you already have working firmware, server, and an extremely well fleshed out angular frontend!).

I couldn't find in the code where you detect clenches. Is that done on the server, or on the device? I was planning on building a lightweight classifier to detect clenching and thought it could be useful to join forces. If you have data (raw or smoothed) and timestamps for when you are clenching, then I'd be happy to try a few different classifiers. It seems like good training data could be made by mixing up some blocks where every N seconds you either clench briefly or relax. So it might look like,

0 seconds (relaxed)
10 seconds (clench briefly)
20 seconds (clench briefly)
30 seconds (relaxed)
etc..

Data that would be useful as a next step wouldn't have events at set intervals, but I'm happy to work on whatever is available. I'll fit classifiers initially in R or python, but can write a working version in javascript or c++ if it's useful.

Edit: Oh, I noticed on the arduino you do it on the device using a threshold--does that work pretty well?

@luc-vocab
Copy link
Owner

Hey first off, please join the [email protected] mailing list, we discuss stuff like that on there.

My plan is to build a device that logs to an influx DB instance initially. This will allow us to visualize EMG activity using the Grafana front-end. At this point I haven't yet tackled detection or alarms. This will come later. I did add something called "bruxism score" to the front end but that's about it for now.

In terms of hardware, I have a pretty good idea of what the final solution looks like. I hired a PCB designer and we submitted version 1 for manufacturing. What hardware do you use? This is what my solution is going to look like: https://github.com/lucwastiaux/gc/blob/dev/gc2_specs/SPECS.md

All of this is going to be open source so you could just reuse it, or I could sell you a board.

I'll have data as soon as I can wear my prototype. It all hinges on whether the PCB works correctly. The data's going to be in Influx DB, so we can use the querying language there, but eventually the device itself will have to start detecting clenching, to implement a biofeedback mechanism.

Ultimately my goal is to build a hackable platform so that people like you could experiment with their own algo and see what works.

Let's have a call if you're interested in discussing more.

On January 7, 2016 11:31:16 AM EST, Michael Chow [email protected] wrote:

Hey, I'm building a grinding control device with a photon and similar
components. I was thinking of trying initially to run it using the code
here (it looks like you already have working firmware, server, and an
extremely well fleshed out angular frontend!).

I couldn't find in the code where you detect clenches. Is that done on
the server, or on the device? I was planning on building a lightweight
classifier to detect clenching and thought it could be useful to join
forces. If you have data (raw or smoothed) and timestamps for when you
are clenching, then I'd be happy to try a few different classifiers. It
seems like good training data could be made by mixing up some blocks
where every N seconds you either clench briefly or relax. So it might
look like,

0 seconds (relaxed)
10 seconds (clench briefly)
20 seconds (clench briefly)
30 seconds (relaxed)
etc..

Data that would be useful after this wouldn't have events at set
intervals, but I'm happy to work on whatever is available. I'll fit
classifiers initially in R or python, but can write a working version
in javascript or c++ if it's useful.


Reply to this email directly or view it on GitHub:
#1

Luc - +852 9384 3042

@machow
Copy link
Author

machow commented Jan 7, 2016

Great! Applied to the group.

I saw that the server looked like it was built for multiple users, and wondered what was going on there. That you're planning on manufacturing something and have a website (sleeptrack.io?) makes a lot more sense to me!

I'm using the version of the photon with headers, with the battery shield, and have ordered the most recent myoware muscle sensor (it's on backorder for another week or two). My hardware skills are lamentable, so I was planning to flag down some electrical engineering grad student friends to sanity check things.

I'm much more familiar with the software / statistical side of things, though, so was hoping to set up the server in the meantime. My gmail is on my github profile, and I'm happy to pass along my phone number or skype info if you get in touch there.

@luc-vocab
Copy link
Owner

Approved your request to join the ML, if you don't mind can you send an intro email describing your project? Also the archives might be interesting to read.

On January 7, 2016 11:31:16 AM EST, Michael Chow [email protected] wrote:

Hey, I'm building a grinding control device with a photon and similar
components. I was thinking of trying initially to run it using the code
here (it looks like you already have working firmware, server, and an
extremely well fleshed out angular frontend!).

I couldn't find in the code where you detect clenches. Is that done on
the server, or on the device? I was planning on building a lightweight
classifier to detect clenching and thought it could be useful to join
forces. If you have data (raw or smoothed) and timestamps for when you
are clenching, then I'd be happy to try a few different classifiers. It
seems like good training data could be made by mixing up some blocks
where every N seconds you either clench briefly or relax. So it might
look like,

0 seconds (relaxed)
10 seconds (clench briefly)
20 seconds (clench briefly)
30 seconds (relaxed)
etc..

Data that would be useful after this wouldn't have events at set
intervals, but I'm happy to work on whatever is available. I'll fit
classifiers initially in R or python, but can write a working version
in javascript or c++ if it's useful.


Reply to this email directly or view it on GitHub:
#1

Luc - +852 9384 3042

@luc-vocab
Copy link
Owner

Do you have a bit of time now? If so send over your Skype ID and I can give you a brief call.

On January 7, 2016 1:18:57 PM EST, Michael Chow [email protected] wrote:

Great! Applied to the group.

I saw that the server looked like it was built for multiple users, and
wondered what was going on there. That you're planning on manufacturing
something and have a website (sleeptrack.io?) makes a lot more sense to
me!

I'm using the version of the photon with headers, with the battery
shield, and have ordered the most recent myoware muscle sensor (it's on
backorder for another week or two). My hardware skills are lamentable,
so I was planning to flag down some electrical engineering grad student
friends to sanity check things.

I'm much more familiar with the software / statistical side of things,
though, so was hoping to set up the server in the meantime. My gmail is
on my github profile, and I'm happy to pass along my phone number or
skype info if you get in touch there.


Reply to this email directly or view it on GitHub:
#1 (comment)

Luc - +852 9384 3042

@machow
Copy link
Author

machow commented Jan 7, 2016

I'm free in a couple hours and sent my Skype ID to your ML email. I'll send a quick message to the mailing list!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants