Skip to content
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

Assertion error with: convert_dataframe_to_coords_frame_index #405

Closed
piango opened this issue Mar 19, 2024 · 3 comments
Closed

Assertion error with: convert_dataframe_to_coords_frame_index #405

piango opened this issue Mar 19, 2024 · 3 comments

Comments

@piango
Copy link

piango commented Mar 19, 2024

Hello

I am new to your cool work here.

I am doing some 3D tracking (in time) of some labeled images.

I am trying some preliminary runs with your example @ laptrack/docs/examples
/3D_tracking.ipynb

And I get an AssertionError at:

track_df, split_df, merge_df = lt.predict_dataframe(

File ~.conda\envs\tracking\Lib\site-packages\laptrack_tracking.py:763 in predict_dataframe
coords, frame_index = convert_dataframe_to_coords_frame_index(

File ~.conda\envs\tracking\Lib\site-packages\laptrack\data_conversion.py:81 in convert_dataframe_to_coords_frame_index
coords = convert_dataframe_to_coords(

File ~.conda\envs\tracking\Lib\site-packages\laptrack\data_conversion.py:45 in convert_dataframe_to_coords
assert np.array_equal(np.arange(df[frame_col].max() + 1), [g[0] for g in grps])

I am not an expert here. But i would like to get some idea on where this could be going wrong.
In the labels are not always continuous, meaning that in some frames some labels are not present and so on. so there is not a good trajectory like you have your example.

Hope this is enough information.

Thanks
:)

@yfukai
Copy link
Owner

yfukai commented Mar 20, 2024

Hi @piango, thanks for the report! Unfortunately the error message is not clear, but I suspect that this is because there's a frame without any points in the input dataframe. Let me try to see if there's a way to make it possible to track points even with this condition.

@piango
Copy link
Author

piango commented Mar 21, 2024

Hi
I just checked.
I removed the frames without any labels. and the workflow example you posted (that I am testing) works well.
So it is the issue.
It would be great if I can still use your pipeline, even if some frames are missing labels.
But its not a priority, and I can understand if you are busy.

:)

@yfukai
Copy link
Owner

yfukai commented Apr 2, 2024

Now it should work with a frame without points! @piango

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants