Skip to content

Commit

Permalink
DLCPosVideo: Use provided epoch, multithread matplotlib (#1168)
Browse files Browse the repository at this point in the history
* Use provided epoch

* Save video to temp dir

* Remove open-cv support

* WIP: Multithread, RAM hungry

* Limit number of workers

* Save file images in batches

* Reduce RAM cost, remove cv2 dep

* Update changelog

* Get debug arg from params

* Revert merge error #870, #975

* Adjust for final frame. Resume from existing

* Resume from fail

* except IndexError for final frame

* Delay delete temp files until complete

* Explicit error messages

* Return video object for debugging
  • Loading branch information
CBroz1 authored Oct 29, 2024
1 parent 97f1a21 commit 6b4ff10
Show file tree
Hide file tree
Showing 5 changed files with 351 additions and 378 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ spyglass.code-workspace
mountainsort4_output/
.idea/
mysql_config
memray*

# Notebooks
*.ipynb
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ dj.FreeTable(dj.conn(), "common_session.session_group").drop()
- Fix video directory bug in `DLCPoseEstimationSelection` #1103
- Restore #973, allow DLC without position tracking #1100
- Minor fix to `DLCCentroid` make function order #1112, #1148
- Pass output path as string to `cv2.VideoWriter` #1150
- Video creator tools:
- Pass output path as string to `cv2.VideoWriter` #1150
- Set `DLCPosVideo` default processor to `matplotlib`, remove support
for `open-cv` #1168
- `VideoMaker` class to process frames in multithreaded batches #1168

- Spike Sorting

Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/common/common_behav.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def _no_transaction_make(self, key):

# Skip populating if no pos interval list names
if len(pos_intervals) == 0:
logger.error(f"NO POS INTERVALS FOR {key}; {no_pop_msg}")
logger.error(f"NO POS INTERVALS FOR {key};\n{no_pop_msg}")
self.insert1(null_key, **insert_opts)
return

Expand Down
Loading

0 comments on commit 6b4ff10

Please sign in to comment.