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

[DOCS] Encounter ValueError When Following User Guide Annotation Label Schema #5278

Open
1 of 3 tasks
Yuxuan1998 opened this issue Dec 16, 2024 · 0 comments
Open
1 of 3 tasks
Labels
documentation Documentation work

Comments

@Yuxuan1998
Copy link

URL(s) with the issue

User Guide: annotation label schema

Description of proposal (what needs changing)

Description of Error
I encountered following error when I use the schema provided in user guide
ValueError: Attribute 'attr3' of type 'text' requires a list of values

Potential Fix
I resolved the error by adding in "values":[] after line 24. But I'm not sure if this is the best approach to address this problem.

The code example would be look like:

anno_key = "..."

label_schema = {
    "new_field": {
        "type": "classifications",
        "classes": ["class1", "class2"],
        "attributes": {
            "attr1": {
                "type": "select",
                "values": ["val1", "val2"],
                "default": "val1",
            },
            "attr2": {
                "type": "radio",
                "values": [True, False],
                "default": False,
            }
        },
    },
    "existing_field": {
        "classes": ["class3", "class4"],
        "attributes": {
            "attr3": {
                "type": "text",
                "values":[]
            }
        }
    },
}

dataset.annotate(anno_key, label_schema=label_schema)

Other questions
I'm using label schema to construct annotation task in CVAT. My understanding is that by including existing_field, I could modify existing annotation on CVAT. However, when I do so I got:
A field with label type 'detections' is already being annotated. Ignoring field 'ground_truth'...
(ground_truth here is my existing_field)
and the existing_field is not loaded to CVAT. Can someone enlighten me where I made a mistake or direct me to relevant docs. Thanks in advance

Willingness to contribute

The FiftyOne Community encourages documentation contributions. Would you or another member of your organization be willing to contribute a fix for this documentation issue to the FiftyOne codebase?

  • Yes. I can contribute a documentation fix independently
  • Yes. I would be willing to contribute a documentation fix with guidance from the FiftyOne community
  • No. I cannot contribute a documentation fix at this time
@Yuxuan1998 Yuxuan1998 added the documentation Documentation work label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation work
Projects
None yet
Development

No branches or pull requests

1 participant