LorenFrankLab / spyglass

Neuroscience data analysis framework for reproducible research built by Loren Frank Lab at UCSF
https://lorenfranklab.github.io/spyglass/
MIT License
94 stars 43 forks source link

`DLCPosVideo`: Use provided epoch, multithread matplotlib #1168

Closed CBroz1 closed 3 weeks ago

CBroz1 commented 1 month ago

Description

This PR addresses #1160 by allowing the make_video process to continue without a PosIntervalMap entry.

This PR is also a partial address of #1157 by reverting to matplotlib as the default video processor, and saves the output as temp files. OpenCV as a tool for reading frames was very memory hungry (300gb for 10k frames) during testing of batch processing, and was probably memory leaking somewhere. Switching to a two step process that saves each frame to disk, RAM usage hovered ~7gb over baseline with the current batch size. More work could be done to dial in these defaults to optimize video creation time based on available resources

Checklist:

CBroz1 commented 1 month ago

Draft pending resolution of bug report from user