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

feat: floe labeling #347

Merged
merged 3 commits into from
Oct 16, 2023
Merged

feat: floe labeling #347

merged 3 commits into from
Oct 16, 2023

Conversation

cpaniaguam
Copy link
Member

@danielmwatkins @ellenbuckley See notebooks/track-floes/track-floes.ipynb for a complete sample workflow with test data.

TODO: Update track in https://github.com/WilhelmusLab/ice-floe-tracker-pipeline/blob/main/src/tracker.jl so it does floe labeling.

#339

- Update notebook
@cpaniaguam cpaniaguam added the enhancement New feature or request label Oct 6, 2023
@cpaniaguam cpaniaguam self-assigned this Oct 6, 2023
@cpaniaguam cpaniaguam linked an issue Oct 6, 2023 that may be closed by this pull request
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (0946979) 91.84% compared to head (221a4c0) 90.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
- Coverage   91.84%   90.46%   -1.39%     
==========================================
  Files          29       29              
  Lines         871      902      +31     
==========================================
+ Hits          800      816      +16     
- Misses         71       86      +15     
Files Coverage Δ
src/tracker/tracker.jl 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Tag floes in the `data.props` by assigning a unique `Floe_ID`` to each floe in each image using pair data in `pairs`. The ID is stored in the `Floe_ID` column of the `props` DataFrame in `data`.

# Arguments
- `data::Data`: the data structure containing the images and properties of the floes (output of `IFTPipeline.extractfeatures`). The `props` field of `data` is modified in-place.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `data::Data`: the data structure containing the images and properties of the floes (output of `IFTPipeline.extractfeatures`). The `props` field of `data` is modified in-place.
- `floedata::Data`: the data structure containing the images and properties of the floes (output of `IFTPipeline.extractfeatures`). The `props` field of `data` is modified in-place.

"""
tagfloes!(floedata, pairs)

Tag floes in the `data.props` by assigning a unique `Floe_ID`` to each floe in each image using pair data in `pairs`. The ID is stored in the `Floe_ID` column of the `props` DataFrame in `data`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Tag floes in the `data.props` by assigning a unique `Floe_ID`` to each floe in each image using pair data in `pairs`. The ID is stored in the `Floe_ID` column of the `props` DataFrame in `data`.
Tag floes in the `data.props` by assigning a unique `Floe_ID` to each floe in each image using pair data in `pairs`. The ID is stored in the `Floe_ID` column of the `props` DataFrame in `data`.

tdivoll
tdivoll previously approved these changes Oct 11, 2023
Copy link
Collaborator

@tdivoll tdivoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good so far. I just added a comment about updating the docstring so that the arguments match the names used in function itself.

- `data::Data`: the data structure containing the images and properties of the floes (output of `IFTPipeline.extractfeatures`). The `props` field of `data` is modified in-place.
- `pairs`: the output of `pairfloes`.
"""
function tagfloes!(props, pairs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the first arg is props, but in the docstring it is floedata. Maybe update the docstring so it is consistent?

@cpaniaguam
Copy link
Member Author

Using a different implementation using early tagging and mappings for relabeling.

@cpaniaguam cpaniaguam requested a review from tdivoll October 13, 2023 17:57
Copy link
Collaborator

@tdivoll tdivoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good, reviewed in person during weekly sync meeting.

@cpaniaguam cpaniaguam merged commit c611594 into main Oct 16, 2023
3 of 4 checks passed
@cpaniaguam cpaniaguam deleted the 339-floe-labeling branch October 16, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Floe labeling
2 participants