Closed emreybroyles closed 2 weeks ago
Please post bugs with a snippet that can be run directly, without referring to outside material
This is the expected outcome for populating a key that has already been run. Please check that your keys are present in the list of unprocessed keys, Table.key_source
Oh okay I see. So in the case of the video population in particular sgp.DLCPosVideo().populate(dlc_key)
that I use to create a video with centroid and orientation overlaid to ensure my model is accurately labeling specific body parts, it looks like I already ran it before (but something wasn't working properly the first time). I wanted to run it again to actually be able to look at the video it created. From the source code it seems like this video isn't actually saved anywhere/I can't find the directory; it usually just outputs the video in the notebook itself after the cell runs. @CBroz1 Do you know how I can view this video then?
This is what determines where your video is saved: https://github.com/LorenFrankLab/spyglass/blob/03e39960e31bb358ba3f112220a5fdbb2e6acc76/src/spyglass/position/v1/position_dlc_selection.py#L399-L407
With the output dir stored in DLCPoseEstimationSelection
https://github.com/LorenFrankLab/spyglass/blob/master/src/spyglass/position/v1/position_dlc_selection.py#L364-L371
If it did not display the video as normal, I'd recommend reverting to version 0.5.1
and rerunning. If that fixes the issue, then this is a bug introduced in #870
Thank you for pointing that code out to me! So I did find thatsgp.DLCPoseEstimationSelection() & dlc_key
gives pose_estimation_output_dir = /nimbus/deeplabcut/output/SC100220231007/SC100220231007_11_model_sideSleep_LED_tutorial_00
and there is no mp4 file in that directory.
Next I will revert spyglass to 0.5.1
to see if the video is created.
Reverted to 0.5.1
and am still getting the same outputs with no video created
It appears that there's an upper limit on the number of digits that the video file name can contain, relevant post. I found this by googling the error I saw in the output: (-215:Assertion failed) number < max_number in function 'cv::icvExtractPattern'
I generated the video with a different name. Please check the folder you mentioned above for TEST_VIDEO.mp4
and let me know if that looks right. If so, I can make some edits to have the video maker save to a temporary directory, and then copy it to the right location afterward
Thanks Chris. TEST_VIDEO.mp4
does not look correct- it doesn't have the centroid or orientation overlaid; it just looks like the video colors were changed- almost inverted
It looks like the correct video can be generated with 0.5.1 and using the matplotlib processor
Future work will ...
Closed with #1174, #1168
Describe the bug Some of the populate calls in the DLC pipeline aren't working and output
{'success_count': 0, 'error_list': []}
after updating spyglass and the spyglass-dlc environment, in attempts to fix the bug in #1146To Reproduce Steps to reproduce the behavior:
dlc_key = {'nwb_file_name': 'SC100220231007_.nwb', 'epoch': 11, 'video_file_num': 16, 'project_name': 'sideSleep_LED', 'dlc_model_name': 'sideSleep_LED_tutorial_00', 'dlc_model_params_name': 'default', 'dlc_centroid_params_name': 'default', 'dlc_si_cohort_centroid': 'green_red_led', 'dlc_si_cohort_orientation': 'green_red_led', 'dlc_orientation_params_name': 'default'}
sgp.DLCPosV1().populate(dlc_key)
sgp.DLCPosVideo().populate(dlc_key)
Expected behavior The populate calls will work
Screenshots