-
Notifications
You must be signed in to change notification settings - Fork 557
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
[FR] FiftyOne Support for Multi-Label Classifications with Label Studio Integration #2946
Comments
Hey @lkaneda, |
Hi @tataganesh 👋 Yes, a contribution for this would be amazing! |
Great, thanks @brimoor ! Would you have any pointers to get started with the support for the |
@tataganesh absolutely!
|
Thank for the clarifications! I had a follow-up question (sorry if I am misunderstanding something) - I am going through labelstudio.py and I noticed that in the fiftyone/fiftyone/utils/labelstudio.py Lines 710 to 711 in c6c4abb
Looking at the fiftyone/fiftyone/utils/labelstudio.py Lines 763 to 768 in c6c4abb
Could you clarify if this means some support for exporting multi-label classifications already exists? |
Hmm that's interesting, looks like there indeed may already be some partial support. Upon a brief glance, it looks like there's at least a couple other changes needed:
return fol.Classifications(
classifications=[fol.Classification(label=l) for l in label_values]
)
Ultimately the way to test that everything is working as expected is to run the basic recipe on a dataset that contains some |
This is great @brimoor, thank you for the breakdown! I will try to submit a PR soon! |
@brimoor fiftyone/fiftyone/utils/labelstudio.py Line 419 in c6c4abb
Error:
I noticed that the Changes made to lines: fiftyone/fiftyone/utils/labelstudio.py Line 677 in c6c4abb
Changed lines: if isinstance(label, fol.Classifications):
for l in label.classifications:
l.id = label_id
else:
label.id = label_id And in results[sample_id] = {l.id: (ln, l) for (ln, l) in labels} to results[sample_id] = {}
for ln, l in labels:
if isinstance(l, fol.Classifications):
label_id = l.classifications[0].id
results[sample_id][label_id] = (ln, l)
else:
results[sample_id][l.id] = (ln, l) But even if with this I get some other error. Any help would be appreciated to resolve this error, thank you! |
@tataganesh looping in @ehofesmann who can help advise on how to proceed here (when he has some bandwidth!) |
Hey @tataganesh! I believe the issue is that for a label list like Classifications, the if isinstance(label, fol.Classifications):
for l in label.classifications:
l.id = label_id Then all of the individual fo.Classification labels have the same ID which would cause issues downstream, likely the error that you're seeing. I believe the |
Proposal Summary
Help us improve the Label Studio integration!
With the Label Studio integration in FiftyOne, add support for multi-label classification by adding support for the Classifications label type.
Motivation
Label Studio supports multi-label classifications on their platform. While FiftyOne can support multi-label classification through the Classifications type, the Label Studio integration does not currently support it. Adding this would provide a richer integration experience between FiftyOne and Label Studio.
What areas of FiftyOne does this feature affect?
fiftyone
Python libraryDetails
Currently, the Label Studio integration supports the Classification type. In order to support multi-label classifications, the integration will need to support the Classifications type.
You can learn more about the Label Studio integration in FiftyOne here.
Looking for Help
FiftyOne is an app centered around our community. To continuously improve the open source solution, we're searching for contributors to help improve (and contribute new!) features. This is one of those that we hope to get community support on. If you'd like to help us out, feel free to pick this up and ask us questions here or in the slack community!
In exchange for your help, you'll get some pretty sweet FiftyOne swag!
The text was updated successfully, but these errors were encountered: