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

Show Annotation Segment Counts in Dashboard #7548

Merged
merged 28 commits into from
Jan 22, 2024
Merged

Show Annotation Segment Counts in Dashboard #7548

merged 28 commits into from
Jan 22, 2024

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Jan 12, 2024

URL of deployed dev instance (used for testing):

Steps to test:

  • Create annotation, annotate some, dashboard should show tree + segment count

TODOs:

  • Frontend
    • When saving volume layer updates, send stats object with current segmentCount
    • Adapt dashboard to aggregate stats for annotation from annotation layers
      • How to display segment count? new icon? do we need more space?
      • [ ] Show infos for all layers in tooltip? Philipp: Not important for now
  • Backend
    • Store stats per annotation layer
    • SQL migration
    • Include stats in annotation layer json
    • How to encode unknown status? empty object?
    • Initialize stats
      • as unknown ({} after merge, create from task, upload)
      • as zeroed when creating empty annotation layer

Issues:


@philippotto
Copy link
Member

@fm3 The frontend should send the segmentCount now. The dashboard receives stats: {} for the annotations now, but I guess the backend needs to be adapted.

@fm3
Copy link
Member Author

fm3 commented Jan 15, 2024

Great, thanks! Yes, I moved the stats to the annotation layers inside of the annotation json. They should ™️ already be filled, but I did not test this end-to-end yet.

@fm3
Copy link
Member Author

fm3 commented Jan 15, 2024

Yeah, seems to work :)

image

Note that the stats in the layers may also still be {} for “unknown” (I plan to initialize it with zeroes but I think it’s not easy to get the real values after upload or merge, so I probably won’t do those in this PR).

Do you think the dashboard frontend code can work with this new format?

@fm3 fm3 changed the title WIP: Save Annotation Stats per Layer, Include SegmentCount WIP: Show Annotation Segment Counts in Dashboard Jan 15, 2024
@philippotto
Copy link
Member

Cool, I adapted the dashboard now. What's up with the old stats property in the actual annotation? Is that always empty now? Should we remove it?

@fm3
Copy link
Member Author

fm3 commented Jan 15, 2024

Yes, it’s always empty now. Removing it completely may break old libs clients. Feel free to remove it from the frontend types. I plan to remove it from the json in a later version.

@fm3 fm3 changed the title WIP: Show Annotation Segment Counts in Dashboard Show Annotation Segment Counts in Dashboard Jan 16, 2024
@fm3 fm3 marked this pull request as ready for review January 16, 2024 09:05
@fm3
Copy link
Member Author

fm3 commented Jan 16, 2024

@philippotto thanks for taking care of the frontend!

Do you think it would be possible to hide the segments if the annotation has no volume layer, and hide the tree count if the annotation has no skeleton layer? This way the user could notice at a glance what kind of annotation they have? (I’m also thinking that we might want to remove the skeleton/volume/hybrid tag from the dashboard in the future, because especially “hybrid” is explained nowhere)

I think the backend is ready for review, feel free to request reviews when you think this is done :)

@philippotto
Copy link
Member

Do you think it would be possible to hide the segments if the annotation has no volume layer, and hide the tree count if the annotation has no skeleton layer? This way the user could notice at a glance what kind of annotation they have? (I’m also thinking that we might want to remove the skeleton/volume/hybrid tag from the dashboard in the future, because especially “hybrid” is explained nowhere)

Yes, good points 👍 It's done now.

Copy link
Contributor

@MichaelBuessemeyer MichaelBuessemeyer left a comment

Choose a reason for hiding this comment

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

The frontend code looks very good 👍. I came up with one suggestion to make the code DRYer.
My testing also showed that the feature seems to work seamlessly.
I'd say, the frontend is merge ready 🚢

@frcroth Could you please approve this PR once everything looks good in the backend part?

Copy link
Member

@frcroth frcroth left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@MichaelBuessemeyer MichaelBuessemeyer left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@fm3 fm3 merged commit d8a2931 into master Jan 22, 2024
2 checks passed
@fm3 fm3 deleted the save-segment-stats branch January 22, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add segment counts to dashboard
4 participants