Coder Social home page Coder Social logo

yfukai / laptrack Goto Github PK

View Code? Open in Web Editor NEW
49.0 3.0 4.0 27.67 MB

Particle tracking by solving linear assignment problem.

License: BSD 3-Clause "New" or "Revised" License

Python 99.89% Shell 0.11%
tracking-by-detection microscopy-images python3 linear-assignment-problem

laptrack's Introduction

Hi there ๐Ÿ‘‹

laptrack's People

Contributors

dependabot[bot] avatar yfukai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laptrack's Issues

`calc_scores` assumes overlapping tracks share a `track-id`

Hello, I've been using laptrack to generate tracks for some cell tracking challenge data, and I wanted to compute the TE and TP scores using the calc_scores function. However, I realized the calc_scores function was finding fewer overlapping tracks than expected, and after looking at the implementation and the tests, I think it's because it expects that track-id is the same in ground truth and predicted tracks.

For example, if I change the current pred_tree in test_scores.py by swapping track indices 1 and 2, all the tests fail, even though the graph and the tracks are exactly the same:

    pred_tree = nx.from_edgelist(
        [
            ((0, 0), (1, 0)),
            ((1, 0), (2, 0)),
            ((2, 0), (3, 0)),
            ((4, 0), (5, 0)),
            ((2, 0), (3, 2)), # 1
            ((1, 2), (2, 1)), # 2
            ((2, 2), (3, 1)), # 2
            ((3, 2), (4, 2)), # 1
            ((4, 1), (5, 2)), # 1
        ]
    )

It's possible I'm misunderstanding how to use the function, but I would've expected that as long as the tracks overlap, it wouldn't matter what integer value was assigned to the track-id. Otherwise, it seems like some track id matching is required?

Please let me know if I've misunderstood anything!

Data conversion

Sometimes we represent the data with pd.DataFrame or other formats. Conversion b/w input/output representations should be implemented.

Bug: fails linking exactly same positions

Using a sparse matrix with lap, the value 0 is assumed to be infinite, and thus not connected. One needs to add an offset to the matrix elements corresponding to finite values.

Assertion error with: convert_dataframe_to_coords_frame_index

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
:)

Column name issue in `predict_dataframe`

When using the predict_dataframe, a column named frame_y appears (possibly since I used pd.merge). The column name should be modified and the documentation should be added to let the users understand what it is. Note the values can have different values from those for the frame index when the minimum frame in the dataframe is larger than zero.

Napari-plugin

Hi @yfukai ,

this is just to let you know that I started a napari-laptrack plugin which uses LapTrack as dependency. It has just basic functionality yet. I'm planning to expand it iteratively based on collaborations; implementing what people need. In case you would like to collaborate on this, just let me know. Contributions (issues, PRs) are welcome. I'm also happy to share write-access to github and pypi repositories if that's of interest for you. Otherwise, it's fine, too. I'm happy to maintain it alone. No pressure. May I just ask for one little thing: In case you update LapTrack and break backwards compatibility, consider letting me know by creating an issue.

Big thanks for programming LapTrack! It's awesome.

Best,
Robert

P.S.: Feel free to close this issue; it's just a notification anyway ๐Ÿ™‚

Raise coverage to 100%

Now some of the code is not covered by the test. It will be great if we could raise the coverage to 100% (excluding some special-case part that are hard to cover.)

allow frame with no point

Currently, frames with no point is not allowed. This, annotated by None or an empty array, should be allowed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.