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

Allow coloring embeddings plots by list fields #3230

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

brimoor
Copy link
Contributor

@brimoor brimoor commented Jun 27, 2023

Allows embeddings plots to be colored by list fields, eg sample or label tags.

This is useful, for example, in situations where each sample contains only one tag. IE train/test/val split. If there are multiple tags, the first one is used.

import fiftyone as fo
import fiftyone.brain as fob
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")
dataset.untag_samples("validation")

fob.compute_visualization(dataset, brain_key="img_sim")
fob.compute_visualization(dataset, patches_field="ground_truth", brain_key="gt_sim")

for tag in "abcd":
    dataset.take(100).tag_samples(tag)
    dataset.take(100).tag_labels(tag, label_fields="ground_truth")

session = fo.launch_app(dataset)
color-by-lists.mov

@brimoor brimoor added the enhancement Code enhancement label Jun 27, 2023
@brimoor brimoor self-assigned this Jun 27, 2023
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c0e9610) 15.15% compared to head (089e3fc) 15.15%.

Additional details and impacted files
@@               Coverage Diff                @@
##           release/v0.21.1    #3230   +/-   ##
================================================
  Coverage            15.15%   15.15%           
================================================
  Files                  563      563           
  Lines                68971    68971           
  Branches               600      600           
================================================
  Hits                 10455    10455           
  Misses               58516    58516           
Flag Coverage Δ
app 15.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@brimoor brimoor requested review from manivoxel51 and removed request for sashankaryal June 27, 2023 01:10
Copy link
Contributor

@lanzhenw lanzhenw 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

@manivoxel51 manivoxel51 left a comment

Choose a reason for hiding this comment

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

cool! 🍨

@brimoor brimoor merged commit 0049286 into release/v0.21.1 Jun 28, 2023
@brimoor brimoor deleted the color-by-lists branch June 28, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Code enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants