This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from HumanSignal/fb-LEAP-608/support-Repeater…
…-in-lsc feat: LEAP-608: Support Repeater in JSON-MIN exports
- Loading branch information
Showing
12 changed files
with
476 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""All tests for label-studio-converter should be written using pytest""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
[ | ||
{ | ||
"id": 87, | ||
"annotations": [ | ||
{ | ||
"id": 22, | ||
"completed_by": 1, | ||
"result": [ | ||
{ | ||
"id": "qd1jIVAq1h", | ||
"type": "polygonlabels", | ||
"value": { | ||
"closed": true, | ||
"points": [ | ||
[ | ||
44.44444444444444, | ||
48.25396825396825 | ||
], | ||
[ | ||
42.53968253968254, | ||
60.317460317460316 | ||
], | ||
[ | ||
56.19047619047619, | ||
50.79365079365079 | ||
] | ||
], | ||
"polygonlabels": [ | ||
"Airplane" | ||
] | ||
}, | ||
"origin": "manual", | ||
"to_name": "image", | ||
"from_name": "label", | ||
"image_rotation": 0, | ||
"original_width": 128, | ||
"original_height": 128 | ||
} | ||
], | ||
"was_cancelled": false, | ||
"ground_truth": false, | ||
"created_at": "2024-01-30T02:40:43.893565Z", | ||
"updated_at": "2024-01-30T02:40:43.893578Z", | ||
"draft_created_at": "2024-01-30T02:40:42.917892Z", | ||
"lead_time": 8.65, | ||
"prediction": {}, | ||
"result_count": 0, | ||
"unique_id": "3bc9da85-967f-47a1-bfa8-410206e54cf9", | ||
"import_id": null, | ||
"last_action": null, | ||
"task": 87, | ||
"project": 29, | ||
"updated_by": 1, | ||
"parent_prediction": null, | ||
"parent_annotation": null, | ||
"last_created_by": null | ||
} | ||
], | ||
"file_upload": "example.png", | ||
"drafts": [], | ||
"predictions": [], | ||
"data": { | ||
"image": "/data/upload/29/example.png" | ||
}, | ||
"meta": {}, | ||
"created_at": "2024-01-30T02:40:33.867975Z", | ||
"updated_at": "2024-01-30T02:40:43.923985Z", | ||
"inner_id": 1, | ||
"total_annotations": 1, | ||
"cancelled_annotations": 0, | ||
"total_predictions": 0, | ||
"comment_count": 0, | ||
"unresolved_comment_count": 0, | ||
"last_comment_updated_at": null, | ||
"project": 29, | ||
"updated_by": 1, | ||
"comment_authors": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
[ | ||
{ | ||
"id": 86, | ||
"annotations": [ | ||
{ | ||
"id": 21, | ||
"completed_by": 1, | ||
"result": [ | ||
{ | ||
"id": "FmoGRgYXtw", | ||
"type": "rectanglelabels", | ||
"value": { | ||
"x": 19.466292134831463, | ||
"y": 53.70786516853933, | ||
"width": 20.35112359550562, | ||
"height": 20.224719101123597, | ||
"rotation": 0, | ||
"rectanglelabels": [ | ||
"Document Title" | ||
] | ||
}, | ||
"origin": "manual", | ||
"to_name": "page_0", | ||
"from_name": "labels_0", | ||
"image_rotation": 0, | ||
"original_width": 1280, | ||
"original_height": 720 | ||
}, | ||
{ | ||
"id": "FmoGRgYXtw", | ||
"type": "taxonomy", | ||
"value": { | ||
"x": 19.466292134831463, | ||
"y": 53.70786516853933, | ||
"width": 20.35112359550562, | ||
"height": 20.224719101123597, | ||
"rotation": 0, | ||
"taxonomy": [ | ||
[ | ||
"Archaea" | ||
] | ||
] | ||
}, | ||
"origin": "manual", | ||
"to_name": "page_0", | ||
"from_name": "categories_0", | ||
"image_rotation": 0, | ||
"original_width": 1280, | ||
"original_height": 720 | ||
} | ||
], | ||
"was_cancelled": false, | ||
"ground_truth": false, | ||
"created_at": "2024-01-25T23:52:15.182319Z", | ||
"updated_at": "2024-01-25T23:52:15.182333Z", | ||
"draft_created_at": "2024-01-25T23:52:13.732002Z", | ||
"lead_time": 13.042, | ||
"prediction": {}, | ||
"result_count": 0, | ||
"unique_id": "5061fcba-4030-45b3-8079-71b7a134c254", | ||
"import_id": null, | ||
"last_action": null, | ||
"task": 86, | ||
"project": 28, | ||
"updated_by": 1, | ||
"parent_prediction": null, | ||
"parent_annotation": null, | ||
"last_created_by": null | ||
} | ||
], | ||
"file_upload": "a5ef7e93-task_copy.json", | ||
"drafts": [], | ||
"predictions": [], | ||
"data": { | ||
"images": [ | ||
{ | ||
"url": "https://example.org/example1.jpeg" | ||
}, | ||
{ | ||
"url": "https://example.org/example2.jpeg" | ||
}, | ||
{ | ||
"url": "https://example.org/example3.jpeg" | ||
} | ||
] | ||
}, | ||
"meta": {}, | ||
"created_at": "2024-01-25T23:52:00.852852Z", | ||
"updated_at": "2024-01-25T23:52:15.207596Z", | ||
"inner_id": 1, | ||
"total_annotations": 1, | ||
"cancelled_annotations": 0, | ||
"total_predictions": 0, | ||
"comment_count": 0, | ||
"unresolved_comment_count": 0, | ||
"last_comment_updated_at": null, | ||
"project": 28, | ||
"updated_by": 1, | ||
"comment_authors": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<View> | ||
|
||
<Header value="Select label and click the image to start"/> | ||
<Image name="image" value="$image" zoom="true"/> | ||
|
||
<PolygonLabels name="label" toName="image" | ||
strokeWidth="3" pointSize="small" | ||
opacity="0.9"> | ||
<Label value="Airplane" background="red"/> | ||
<Label value="Car" background="blue"/> | ||
</PolygonLabels> | ||
|
||
</View> |
72 changes: 72 additions & 0 deletions
72
tests/data/test_export_json_min/label_config_repeater.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"labels_{{idx}}": { | ||
"type": "RectangleLabels", | ||
"regex": { | ||
"{{idx}}": ".*" | ||
}, | ||
"inputs": [ | ||
{ | ||
"type": "Image", | ||
"value": "images[{{idx}}].url" | ||
} | ||
], | ||
"labels": [ | ||
"Document Title", | ||
"Document Date" | ||
], | ||
"to_name": [ | ||
"page_{{idx}}" | ||
], | ||
"labels_attrs": { | ||
"Document Date": { | ||
"value": "Document Date" | ||
}, | ||
"Document Title": { | ||
"value": "Document Title" | ||
} | ||
} | ||
}, | ||
"categories_{{idx}}": { | ||
"type": "Taxonomy", | ||
"regex": { | ||
"{{idx}}": ".*" | ||
}, | ||
"inputs": [ | ||
{ | ||
"type": "Image", | ||
"value": "images[{{idx}}].url" | ||
} | ||
], | ||
"labels": [ | ||
"Archaea", | ||
"Bacteria", | ||
"Eukarya", | ||
"Human", | ||
"Oppossum", | ||
"Extraterrestrial" | ||
], | ||
"to_name": [ | ||
"page_{{idx}}" | ||
], | ||
"labels_attrs": { | ||
"Human": { | ||
"value": "Human" | ||
}, | ||
"Archaea": { | ||
"value": "Archaea" | ||
}, | ||
"Eukarya": { | ||
"value": "Eukarya" | ||
}, | ||
"Bacteria": { | ||
"value": "Bacteria" | ||
}, | ||
"Oppossum": { | ||
"value": "Oppossum" | ||
}, | ||
"Extraterrestrial": { | ||
"value": "Extraterrestrial" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.