-
Notifications
You must be signed in to change notification settings - Fork 257
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
*Real-time* Kilosort + Neuropixels #296
Comments
You would need an all new implementation of trackAndSort which does not rely on the CUDA kernels, since those need a large batch of data. There's a lot of code in there, so you'd need to work out a "lite" version of it that can run in real-time. |
FYI @AtMostafa we have a semi-realtime approach running, where: (1) we do a few-minute-long recording is done via OpenEphys & a Neuropixel, (2) we run Kilosort on that recording, (3) we "approximate" the fancy Kilosort sorting with a threshold-crossing & PCA sorting step, i.e. for each unit from a subset of units that we want realtime sorted, we find their "best channel", find an appropriate threshold-crossing threshold & PCA transform & PC-space template, and (4) use OpenEphys' SpikeSorter + a range of additions we had to make in our fork (https://github.com/carmenalab/plugin-GUI) to real-time spike sort. It turns out for our application, this approximation is "good enough": we end up computing firing rates with smoothing. Finally, everything is streamed out to a host of other processes & computers via a streaming library River https://github.com/pbotros/river. Ideally we will merge a lot of the changes to OpenEphys to master since they're written to be generally applicable, but unfortunately all of it is in our fork at the moment: https://github.com/carmenalab/plugin-GUI. Some more information on our changes we made were open-ephys/plugin-GUI#372. Feel free to reach out via email ([email protected]) if you have further questions. |
I'll have to dive deeper into (hopefully python implementation of) Kilosort's trackAndSort to see how big a problem that is. But your solution @pbotros sounds like a very good compromise. Thanks for the input :) |
Is anyone trying this?
Other than this issue on real-time access to neuropixels data, I couldn't find any other resource.
How much work would it be to run (PY)kilosort in real-time, based on the templates of a few-minute-long recording just before the task starts? Has anyone tried?
Thanks for the great work,
Mostafa
The text was updated successfully, but these errors were encountered: