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

incompatible annotations with provided labeling schema #5773

Open
OverFitted opened this issue Apr 23, 2024 · 0 comments
Open

incompatible annotations with provided labeling schema #5773

OverFitted opened this issue Apr 23, 2024 · 0 comments

Comments

@OverFitted
Copy link

OverFitted commented Apr 23, 2024

Describe the bug
Labeling scheme is giving "Created annotations are incompatible with provided labeling schema, we found: 12101 with ..." which is impossible as I only have:
Tasks: 10436
Annotations: 1186
Predictions: 1497

The project's labeling schema was working perfectly fine at least one month ago (I'm not sure, if label studio was updated during this time period)

To Reproduce
Steps to reproduce the behavior:

  1. Go to project
  2. Click on "Settings"
  3. Click on "Labeling Interface"
  4. See error

Expected behavior
Labeling scheme rendering properly

Screenshots
Screenshot 2024-04-23 at 22 14 47

Environment (please complete the following information):

  • OS: Ubuntu 20.04
  • Label Studio Version 1.12.0

Additional information:
Label scheme:

<View>
  <Image name="image" value="$ocr" zoom="true" zoomControl="false"
         rotateControl="true" width="100%" height="100%"
         maxHeight="auto" maxWidth="auto"/>

  <RectangleLabels name="bbox" toName="image" strokeWidth="1" smart="true">
    <Label value="First name" background="#FFA39E"/>
    <Label value="Last name" background="#D4380D"/>
    ...
  </RectangleLabels>

  <TextArea name="transcription" toName="image" 
            editable="true" perRegion="true" required="false" 
            maxSubmissions="1" rows="5" placeholder="Recognized Text" 
            displayMode="region-list"/>
</View>

Annotation format:

...
box_annotations = {
    "id": id_gen,
    "original_width": img_width,
    "original_height": img_height,
    "image_rotation": 0,
    "score": conf.item(),
    "value": {
        "x": bbox[0] / img_width * 100,
        "y": bbox[1] / img_height * 100,
        "width": (bbox[2] - bbox[0]) / img_width * 100,
        "height": (bbox[3] - bbox[1]) / img_height * 100,
        "rotation": 0,
        "rectanglelabels": [self.labels[box_cls]],
    },
    "from_name": "bbox",
    "to_name": "image",
    "type": "rectangle",
    "origin": "manual",
}

text_annotations = {
    "id": id_gen,
    "original_width": img_width,
    "original_height": img_height,
    "image_rotation": 0,
    "value": {
        "x": bbox[0] / img_width * 100,
        "y": bbox[1] / img_height * 100,
        "width": (bbox[2] - bbox[0]) / img_width * 100,
        "height": (bbox[3] - bbox[1]) / img_height * 100,
        "rotation": 0,
        "text": txt,
    },
    "from_name": "transcription",
    "to_name": "image",
    "type": "textarea",
    "origin": "manual",
}

results.extend([box_annotations, text_annotations])
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant