HumanSignal / HumanSignal/label-studio
Multiple bounding boxes on exporting rectanglelabels
- Dominant language
- TypeScript
- Stars
- 28.3k
- Forks
- 3.7k
- Avg merge
- 14h
- Merged PRs (30d)
- 15
Description
**Describe the bug**
Object detection tasks outputs multiple labels for every edit
**To Reproduce**
Steps to reproduce the behavior:
I have a custom label.xml file for an ocr with object detection which makes use of `labels` for ocr and `RectangleLabels` for detection.
1. Annotate a rectanglelabel block
2. Modify the created block
3. export as json
The resultant json has multiple entries for the annotated block.
**Expected behavior**
Only the last version of the modified entity should be present in the exported json
**Environment (please complete the following information):**
- Label Studio Version - 1.4.1
**Additional context**
Label.xml
```xml
<RectangleLabels name="label" toName="image">
<Label value="doc1," background="#3bf18f"/>
<Label value="doc2" background="#D4380D"/>
</RectangleLabels>
</View>
```
The objects from exported json that correspond to the `rectanglelabels`:
```json
[
{
"original_width": 960,
"original_height": 1280,
"image_rotation": 0,
"value": {
"x": 19.270833333333332,
"y": 90.703125,
"width": 4.0625,
"height": 1.640625,
"rotation": 0,
"rectanglelabels": [
"doc1"
]
},
"id": "70ed5c40-b",
"from_name": "label",
"to_name": "image",
"type": "rectanglelabels",
"origin": "prediction-changed"
},
{
"original_width": 960,
"original_height": 1280,
"image_rotation": 0,
"value": {
"x": 23.854166666666668,
"y": 90.859375,
"width": 4.166666666666667,
"height": 1.640625,
"rotation": 0,
"rectanglelabels": [
"doc1"
]
},
"id": "2022b726-1",
"from_name": "label",
"to_name": "image",
"type": "rectanglelabels",
"origin": "prediction-changed"
},
{
"original_width": 960,
"original_height": 1280,
"image_rotation": 0,
"value": {
"x": 28.645833333333332,
"y": 91.09375,
"width": 4.270833333333333,
"height": 1.5625,
"rotation": 0,
"rectanglelabels": [
"doc1"
]
},
"id": "863a8cec-9",
"from_name": "label",
"to_name": "image",
"type": "rectanglelabels",
"origin": "prediction-changed"
},
{
"original_width": 960,
"original_height": 1280,
"image_rotation": 0,
"value": {
"x": 88.53333333333333,
"y": 35.9,
"width": 4.8,
"height": 3.2,
"rotation": 0,
"rectanglelabels": [
"doc1"
]
},
"id": "HTPgv-942p",
"from_name": "label",
"to_name": "image",
"type": "rectanglelabels",
"origin": "manual"
},
{
"original_width": 960,
"original_height": 1280,
"image_rotation": 0,
"value": {
"x": 92,
"y": 54.500000000000014,
"width": 3.066666666666667,
"height": 2.1,
"rotation": 0,
"rectanglelabels": [
"doc1"
]
},
"id": "58UJvqfg3G",
"from_name": "label",
"to_name": "image",
"type": "rectanglelabels",
"origin": "manual"
},
{
"original_width": 960,
"original_height": 1280,
"image_rotation": 0,
"value": {
"x": 12.133333333333333,
"y": 81.39999999999999,
"width": 3.466666666666666,
"height": 3,
"rotation": 0,
"rectanglelabels": [
"doc1"
]
},
"id": "SHbPphXRPu",
"from_name": "label",
"to_name": "image",
"type": "rectanglelabels",
"origin": "manual"
},
{
"original_width": 960,
"original_height": 1280,
"image_rotation": 0,
"value": {
"x": 52.39999999999999,
"y": 20.4,
"width": 47.59999999999995,
"height": 23.09999999999994,
"rotation": 0,
"rectanglelabels": [
"doc2"
]
},
"id": "3sCtg_iO_N",
"from_name": "label",
"to_name": "image",
"type": "rectanglelabels",
"origin": "manual"
},
]
```
Contributor guide
Assessment
This issue has not been assessed yet.