-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is there an existing issue for this?
- I have searched the existing issues
Operating System
MacOS Tahoe
DeepLabCut version
3.0.0rc13
What engine are you using?
pytorch
DeepLabCut mode
multi animal
Device type
M2 Max
Bug description 🐛
I am using multi-animal, with 18 shared body parts (2 animals) and 4 unique parts.
After analyzing a video, I run "extract outlier frames" with "fitting" option (tracking method: ellipse. model used: resnet50_gn).
Afer warnings:
/Users/mike/.conda/envs/dlc3/lib/python3.12/site-packages/statsmodels/tsa/statespace/sarimax.py:966: UserWarning: Non-stationary starting autoregressive parameters found. Using zeros as starting parameters.
warn('Non-stationary starting autoregressive parameters'
/Users/mike/.conda/envs/dlc3/lib/python3.12/site-packages/statsmodels/tsa/statespace/sarimax.py:978: UserWarning: Non-invertible starting MA parameters found. Using zeros as starting parameters.
warn('Non-invertible starting MA parameters found.'
and multiple warnings:
/Users/mike/.conda/envs/dlc3/lib/python3.12/site-packages/statsmodels/base/model.py:607: ConvergenceWarning: Maximum Likelihood optimization failed to converge. Check mle_retvals
warnings.warn("Maximum Likelihood optimization failed to "
I get this error:
Traceback (most recent call last):
File "?url=https%3A%2F%2Fgithub.com%2FUsers%2Fmike%2F.conda%2Fenvs%2Fdlc3%2Flib%2Fpython3.12%2Fsite-packages%2Fdeeplabcut%2Fgui%2Ftabs%2Fextract_outlier_frames.py", line 153, in extract_outlier_frames
deeplabcut.extract_outlier_frames(
File "?url=https%3A%2F%2Fgithub.com%2FUsers%2Fmike%2F.conda%2Fenvs%2Fdlc3%2Flib%2Fpython3.12%2Fsite-packages%2Fdeeplabcut%2Frefine_training_dataset%2Foutlier_frames.py", line 429, in extract_outlier_frames
d, o = compute_deviations(
^^^^^^^^^^^^^^^^^^^
File "?url=https%3A%2F%2Fgithub.com%2FUsers%2Fmike%2F.conda%2Fenvs%2Fdlc3%2Flib%2Fpython3.12%2Fsite-packages%2Fdeeplabcut%2Frefine_training_dataset%2Foutlier_frames.py", line 633, in compute_deviations
data = pd.DataFrame(np.concatenate(preds, axis=1), columns=pdindex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "?url=https%3A%2F%2Fgithub.com%2FUsers%2Fmike%2F.local%2Flib%2Fpython3.12%2Fsite-packages%2Fpandas%2Fcore%2Fframe.py", line 827, in init
mgr = ndarray_to_mgr(
^^^^^^^^^^^^^^^
File "?url=https%3A%2F%2Fgithub.com%2FUsers%2Fmike%2F.local%2Flib%2Fpython3.12%2Fsite-packages%2Fpandas%2Fcore%2Finternals%2Fconstruction.py", line 336, in ndarray_to_mgr
_check_values_indices_shape_match(values, index, columns)
File "?url=https%3A%2F%2Fgithub.com%2FUsers%2Fmike%2F.local%2Flib%2Fpython3.12%2Fsite-packages%2Fpandas%2Fcore%2Finternals%2Fconstruction.py", line 420, in _check_values_indices_shape_match
raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}")
ValueError: Shape of passed values is (37802, 320), indices imply (37802, 528)
INFO:console:Fitting state-space models with parameters:
INFO:console:
INFO:console:3
INFO:console:
INFO:console:1
I searched the issues on the DLC page and it seems that the problem stems from the mismatch between the number of parts/animals declared in config.yaml and the number of parts/animals detected in a video after analyzing it (and saved in .csv/pickle file).
here is the first lines from my .csv file:
Here, the two rats are not present it the beginning of the video and the unique parts are not present for the entire video (in this case). So, the model picks up random points with low probability, or no points at all.
So, the question is, is this setup: mismatch between declared and detected body parts, indeed the reason for failure to fit ARIMA/SARIMAX?
If yes, could this be fixed? This is probably a very common case of missing body part detection data for part or whole video.
regards,
Mikhail.
Steps To Reproduce
Not sure
Relevant log output
See aboveAnything else?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct