From 4fb83370679408fd0acba097baf205c70ad83e6e Mon Sep 17 00:00:00 2001 From: Vaghinak Basentsyan Date: Wed, 16 Feb 2022 11:47:38 +0400 Subject: [PATCH 1/7] Friday 772 --- src/superannotate/lib/core/usecases/images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/superannotate/lib/core/usecases/images.py b/src/superannotate/lib/core/usecases/images.py index aaae48a1f..13937ce4d 100644 --- a/src/superannotate/lib/core/usecases/images.py +++ b/src/superannotate/lib/core/usecases/images.py @@ -2856,9 +2856,9 @@ def execute(self): created = [] - for i in range(0, len(unique_annotation_classes), self.CHUNK_SIZE): + for i in range(len(unique_annotation_classes) - self.CHUNK_SIZE, 0, self.CHUNK_SIZE): created += self._annotation_classes_repo.bulk_insert( - entities=unique_annotation_classes[i : i + self.CHUNK_SIZE], + entities=unique_annotation_classes[i : i + self.CHUNK_SIZE], # noqa: E203 ) self._response.data = created return self._response From f725e5a70f1e883345e6e8bc5798c3e86c1d7f47 Mon Sep 17 00:00:00 2001 From: Shabin Dilanchian Date: Wed, 16 Feb 2022 11:52:11 +0400 Subject: [PATCH 2/7] update tests --- .../example_image_1.jpg___objects.json | 3100 +---------------- .../annotations/test_annotation_classes.py | 2 +- 2 files changed, 2 insertions(+), 3100 deletions(-) diff --git a/tests/data_set/sample_project_vector/example_image_1.jpg___objects.json b/tests/data_set/sample_project_vector/example_image_1.jpg___objects.json index cb893b5d4..00b2c54f5 100644 --- a/tests/data_set/sample_project_vector/example_image_1.jpg___objects.json +++ b/tests/data_set/sample_project_vector/example_image_1.jpg___objects.json @@ -1,3099 +1 @@ -{ - "metadata": { - "name": "example_image_1.jpg", - "width": 1024, - "height": 683, - "status": "Completed", - "pinned": false, - "isPredicted": null, - "projectId": null, - "annotatorEmail": null, - "qaEmail": null - }, - "instances": [ - { - "type": "bbox", - "classId": 72274, - "probability": 100, - "points": { - "x1": 437.16, - "x2": 465.23, - "y1": 341.5, - "y2": 357.09 - }, - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [ - { - "id": 117845, - "groupId": 28230, - "name": "2", - "groupName": "Num doors" - } - ], - "trackingId": "aaa97f80c9e54a5f2dc2e920fc92e5033d9af45b", - "error": null, - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "bbox", - "classId": 72274, - "probability": 100, - "points": { - "x1": 480.0, - "x2": 490.0, - "y1": 340.0, - "y2": 350.0 - }, - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [ - { - "id": 117845, - "groupId": 28230, - "name": "2", - "groupName": "Num doors" - } - ], - "error": null, - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle1" - }, - { - "type": "bbox", - "classId": 72274, - "probability": 100, - "points": { - "x1": 500.0, - "x2": 510.0, - "y1": 340.0, - "y2": 350.0 - }, - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [ - { - "id": 117845, - "groupId": 28230, - "name": "10", - "groupName": "Num doors" - } - ], - "error": null, - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "bbox", - "classId": 72274, - "probability": 100, - "points": { - "x1": 520.0, - "x2": 530.0, - "y1": 340.0, - "y2": 350.0 - }, - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [ - { - "id": 117845, - "groupId": 28230, - "name": "4", - "groupName": "Num doors1" - } - ], - "error": null, - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "template", - "templateName": "some", - "classId": 72274, - "probability": 100, - "points": [ - { - "id": 1, - "x": 800.8311630011381, - "y": 431.7220764160156 - }, - { - "id": 2, - "x": 834.6965942382812, - "y": 431.8820692877566 - }, - { - "id": 3, - "x": 834.6965942382812, - "y": 480.848388671875 - }, - { - "id": 4, - "x": 801.0125574701838, - "y": 480.848388671875 - }, - { - "id": 5, - "x": 702.6083268971072, - "y": 437.5428573337124 - }, - { - "id": 6, - "x": 702.5221557617188, - "y": 474.8859480851478 - } - ], - "connections": [ - { - "id": 1, - "from": 1, - "to": 2 - }, - { - "id": 2, - "from": 2, - "to": 3 - }, - { - "id": 3, - "from": 3, - "to": 4 - }, - { - "id": 4, - "from": 4, - "to": 1 - }, - { - "id": 5, - "from": 1, - "to": 5 - }, - { - "id": 6, - "from": 5, - "to": 6 - }, - { - "id": 7, - "from": 6, - "to": 4 - } - ], - "groupId": 0, - "pointLabels": { - "4": "top_left", - "5": "bottom_left" - }, - "locked": false, - "visible": false, - "attributes": [ - { - "name": "4", - "groupName": "Num doors", - "groupId": 28230, - "id": 117846 - } - ], - "templateName": "HandPose", - "trackingId": "cbde2787e76c41be77c1079e8d090252ad701ea", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 281.98, - 383.75, - 282.55, - 378.1, - 287.26, - 376.12, - 297.35, - 372.91, - 311.01, - 372.82, - 319.59, - 375.74, - 323.55, - 378.28, - 325.91, - 381.68, - 326.66, - 385.45, - 325.43, - 387.62, - 324.02, - 388.75, - 317.23, - 388.84, - 315.54, - 390.26, - 312.43, - 390.54, - 308.66, - 388.46, - 306.39, - 388.84, - 297.44, - 389.03, - 291.5, - 388.18, - 287.64, - 384.51 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "bf069efee9e65463824466f442a409a137eabaee", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 266.9, - 384.88, - 267.47, - 404.21, - 276.23, - 404.87, - 277.65, - 407.32, - 278.78, - 407.79, - 282.17, - 407.79, - 284.15, - 407.32, - 285.19, - 403.92, - 292.73, - 403.83, - 293.29, - 405.43, - 294.99, - 406.37, - 297.53, - 406.28, - 298.57, - 405.43, - 301.12, - 404.39, - 302.15, - 402.41, - 303.38, - 395.53, - 301.49, - 391.39, - 296.12, - 389.03, - 291.78, - 388.84, - 286.79, - 384.13, - 284.9, - 384.51 - ], - "groupId": 1, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "a520dde722112d1579ff65260166d02ac1c14e2", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 262.94, - 385.54, - 263.88, - 404.68, - 262.47, - 404.96, - 262.19, - 406.66, - 261.34, - 408.07, - 259.74, - 408.54, - 256.53, - 408.64, - 255.59, - 408.16, - 254.84, - 407.13, - 254.08, - 403.92, - 252.76, - 402.79, - 250.69, - 402.32, - 249.75, - 401.19, - 250.5, - 389.03, - 254.18, - 384.51, - 262.56, - 384.32 - ], - "groupId": 1, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "97e8bcc305b69af97b1a51c102c22a03887410bd", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 348.62, - 395.91, - 367.76, - 395.34, - 367, - 384.32, - 364.36, - 378, - 349.09, - 377.81, - 346.55, - 385.54, - 346.55, - 395.82 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "15e2bd2a9bf66c4df00df9fbe6fd6db43abc56", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 325.25, - 402.32, - 321.1, - 410.99, - 321, - 424.47, - 329.21, - 424.75, - 329.49, - 423.06, - 344.57, - 423.15, - 344.85, - 424.85, - 349.94, - 424.38, - 349.09, - 409.2, - 344.57, - 401.47 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "98c3f3a3fdeb809c7a8de125447acce21abda84f", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 114.81, - 432.5, - 149.32, - 430.8, - 169.65, - 442.24, - 187.65, - 446.05, - 192.94, - 453.25, - 192.31, - 462.14, - 189.77, - 467.44, - 183.84, - 470.83, - 177.48, - 472.52, - 169.65, - 480.57, - 163.93, - 481.62, - 160.54, - 477.18, - 159.27, - 472.73, - 159.91, - 468.28, - 159.49, - 458.76, - 156.94, - 450.71, - 136.62, - 437.37, - 119.04, - 436.52 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "de78e5e22b397426228bed63c15ad2f41bfe653", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 120.52, - 437.37, - 135.77, - 437.79, - 156.31, - 450.5, - 158.85, - 459.39, - 159.27, - 468.71, - 158.21, - 474.21, - 152.92, - 480.78, - 147.84, - 483.74, - 142.54, - 484.17, - 139.37, - 482.05, - 140.43, - 477.6, - 144.87, - 475.91, - 146.78, - 471.25, - 144.03, - 457.27 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "7adde574ed24f845d700b0c8371122bfe667751f", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 81.46, - 437.16, - 94.38, - 435.04, - 110.9, - 433.56, - 117.67, - 434.83, - 133.77, - 448.8, - 144.99, - 457.27, - 147.32, - 471.67, - 145.62, - 475.91, - 141.6, - 477.6, - 136.31, - 485.22, - 131.65, - 487.98, - 126.78, - 488.61, - 122.97, - 472.73, - 118.52, - 464.26, - 110.9, - 455.37, - 103.06, - 441.18, - 99.89, - 438.64 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "4a47c34904d5e6bafdab32f9896c4013b1ddd153", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 684.8, - 420.93, - 683.1, - 416.3, - 634.11, - 414.48, - 626.68, - 419.72, - 622.9, - 424.35, - 609.62, - 425.69, - 604.63, - 427.76, - 600.73, - 434.34, - 600.48, - 440.19, - 600.97, - 440.92, - 604.02, - 442.01, - 604.99, - 445.67, - 607.18, - 447.99, - 610.96, - 450.18, - 618.64, - 450.91, - 621.2, - 448.72, - 622.54, - 446.16, - 626.8, - 446.16, - 626.92, - 440.67, - 629.6, - 435.31, - 633.75, - 432.39, - 646.79, - 430.32, - 664.09, - 420.81, - 685.05, - 422.4 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "eb882a5e0012c77a1557c47bf386b21b6f6848", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 674.69, - 421.91, - 664.82, - 421.3, - 646.66, - 430.56, - 634.24, - 432.63, - 629.85, - 435.68, - 627.29, - 440.55, - 627.05, - 444.94, - 628.14, - 447.13, - 628.63, - 447.86, - 631.68, - 448.35, - 633.38, - 451.4, - 634.48, - 452.25, - 634.72, - 446.89, - 636.43, - 437.99, - 645.57, - 434.34, - 656.53, - 431.05 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "56b1a09c67ce96a1719afe9f8c2b50b3dd08cd1c", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 100, - "points": [ - 729.77, - 442.26, - 729.89, - 436.04, - 726.11, - 425.93, - 719.9, - 423.86, - 676.27, - 422.93, - 670.06, - 424.22, - 656.78, - 431.41, - 641.67, - 435.68, - 636.92, - 438.12, - 635.09, - 447.25, - 634.97, - 452.86, - 635.7, - 453.71, - 640.33, - 455.17, - 643.25, - 457.86, - 649.59, - 458.22, - 652.27, - 457.86, - 654.95, - 454.32, - 656.29, - 453.47, - 664.45, - 453.96, - 667.62, - 458.71, - 668.72, - 458.95, - 671.64, - 458.95, - 673.96, - 458.34, - 676.52, - 456.76, - 678.35, - 454.32, - 686.75, - 454.93, - 689.92, - 459.56, - 691.51, - 460.78, - 696.87, - 461.27, - 699.67, - 460.29, - 702.84, - 456.51, - 705.27, - 455.91, - 706.86, - 452.37, - 708.69, - 450.79, - 722.21, - 445.18, - 725.87, - 445.43 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "12a358abc908ad69e8b599ab359e12ecfe1047", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 96, - "points": [ - 703, - 462.81, - 703, - 464.81, - 712, - 472.81, - 712, - 474.81, - 724, - 474.81, - 729, - 471.81, - 741.61, - 472.86, - 745.32, - 476.75, - 753.29, - 476.57, - 756.25, - 473.97, - 770, - 473.81, - 780, - 478.81, - 784, - 478.81, - 792, - 474.81, - 802, - 474.81, - 806, - 478.81, - 812, - 479.81, - 817, - 477.81, - 820, - 473.81, - 832.61, - 472.49, - 834, - 468.81, - 833, - 453.81, - 827, - 448.81, - 805, - 437.81, - 783, - 434.81, - 750, - 434.81, - 739, - 437.81, - 726, - 445.81, - 722, - 445.81, - 709, - 450.81, - 707, - 452.81, - 705.11, - 457.11 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "8f8ef909a683eaf9852b4d9784ec63b471c58d16", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 98, - "points": [ - 1023.86, - 432.09, - 1019, - 434, - 1008, - 440, - 1001, - 447, - 960, - 450, - 952, - 453, - 945, - 460, - 940, - 472, - 942, - 496, - 945, - 500, - 948, - 500, - 954, - 510, - 958, - 514, - 980, - 515, - 992, - 504, - 999, - 506, - 1006, - 513, - 1009, - 514, - 1016.82, - 516.78, - 1023.86, - 515.86 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "d9975dc56b159b1690fbdea7b04dd35f2ba69366", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "polygon", - "classId": 72274, - "probability": 98, - "points": [ - 6, - 447, - 0, - 459, - 0, - 528, - 2, - 531, - 12, - 530, - 20, - 536, - 25, - 536, - 33, - 530, - 61, - 530, - 77, - 528, - 86, - 534, - 94, - 535, - 99, - 532, - 100, - 525, - 102, - 522, - 109.39, - 521.38, - 111.09, - 529.47, - 122.6, - 528.2, - 126.44, - 491.97, - 122, - 474, - 118, - 465, - 110, - 456, - 103, - 442, - 99, - 439, - 47, - 438, - 16, - 442 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "76d42d45e8b0c11a055dff75a405b515bb1dd53f", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Personal vehicle" - }, - { - "type": "bbox", - "classId": 72275, - "probability": 100, - "points": { - "x1": 240.68, - "x2": 304.61, - "y1": 378.93, - "y2": 410.11 - }, - "groupId": 0, - "pointLabels": { - "0": "Top Left", - "4": "Bottom Right" - }, - "locked": false, - "visible": true, - "attributes": [ - { - "id": 117848, - "groupId": 28231, - "name": "no", - "groupName": "swedish" - }, - { - "id": 117850, - "groupId": 28232, - "name": "4", - "groupName": "Num doors" - } - ], - "trackingId": "ac43151b5ac2d511beac8d2ec15695f421b93882", - "error": null, - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Large vehicle" - }, - { - "type": "template", - "templateName": "some", - "classId": 72276, - "probability": 100, - "points": [ - { - "id": 1, - "x": 590.36328125, - "y": 505.471431864795 - }, - { - "id": 2, - "x": 590.2529541686341, - "y": 504.29565523299704 - }, - { - "id": 3, - "x": 590.0863828554258, - "y": 502.0855402722193 - }, - { - "id": 4, - "x": 589.8926669948704, - "y": 500.1575188822054 - }, - { - "id": 5, - "x": 588.2789742606027, - "y": 491.4069519042969 - }, - { - "id": 6, - "x": 591.6578771570227, - "y": 498.7841862403542 - }, - { - "id": 7, - "x": 592.6675015963041, - "y": 497.5725781649412 - }, - { - "id": 8, - "x": 593.4538138253348, - "y": 495.05589353721325 - }, - { - "id": 9, - "x": 591.9352490770948, - "y": 502.2054028345276 - }, - { - "id": 10, - "x": 591.4315175486134, - "y": 504.8054433249257 - }, - { - "id": 11, - "x": 591.0675032060225, - "y": 506.48433274969244 - }, - { - "id": 12, - "x": 593.6178112658826, - "y": 501.4214392039917 - }, - { - "id": 13, - "x": 592.6682424021291, - "y": 504.65690054240156 - }, - { - "id": 14, - "x": 591.8309557568896, - "y": 507.1707458496094 - }, - { - "id": 15, - "x": 594.685306758671, - "y": 499.50420568423283 - }, - { - "id": 16, - "x": 594.4346668956044, - "y": 503.3523914672602 - }, - { - "id": 17, - "x": 593.4855715573489, - "y": 505.4433191217528 - }, - { - "id": 18, - "x": 592.9555204622038, - "y": 507.0652772868338 - }, - { - "id": 19, - "x": 589.5701713142814, - "y": 496.6512277677259 - }, - { - "id": 20, - "x": 590.8887191604782, - "y": 499.291411604618 - }, - { - "id": 21, - "x": 591.1992693890583, - "y": 501.8345208353304 - }, - { - "id": 22, - "x": 591.0341186523438, - "y": 501.9896778816582 - } - ], - "connections": [ - { - "id": 1, - "from": 5, - "to": 4 - }, - { - "id": 2, - "from": 3, - "to": 4 - }, - { - "id": 3, - "from": 3, - "to": 2 - }, - { - "id": 4, - "from": 2, - "to": 1 - }, - { - "id": 5, - "from": 5, - "to": 6 - }, - { - "id": 6, - "from": 6, - "to": 9 - }, - { - "id": 7, - "from": 9, - "to": 10 - }, - { - "id": 8, - "from": 10, - "to": 11 - }, - { - "id": 9, - "from": 5, - "to": 7 - }, - { - "id": 10, - "from": 7, - "to": 12 - }, - { - "id": 11, - "from": 12, - "to": 13 - }, - { - "id": 12, - "from": 13, - "to": 14 - }, - { - "id": 13, - "from": 5, - "to": 8 - }, - { - "id": 14, - "from": 8, - "to": 15 - }, - { - "id": 15, - "from": 15, - "to": 16 - }, - { - "id": 16, - "from": 16, - "to": 17 - }, - { - "id": 17, - "from": 17, - "to": 18 - }, - { - "id": 18, - "from": 5, - "to": 19 - }, - { - "id": 19, - "from": 19, - "to": 20 - }, - { - "id": 20, - "from": 20, - "to": 21 - }, - { - "id": 21, - "from": 21, - "to": 22 - } - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "templateName": "HandPose", - "trackingId": "2c89e809614523cf56c9aeab932e90b87aaf5e4f", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - }, - { - "type": "template", - "templateName": "some", - "classId": 72276, - "probability": 100, - "points": [ - { - "id": 1, - "x": 332.9866027832032, - "y": 526.2959883676228 - }, - { - "id": 2, - "x": 332.8439004919032, - "y": 527.5132367654812 - }, - { - "id": 3, - "x": 334.35612353649776, - "y": 527.3324179308058 - }, - { - "id": 4, - "x": 336.2640990372543, - "y": 524.0976645502819 - }, - { - "id": 5, - "x": 337.51601736886164, - "y": 516.1050720214844 - }, - { - "id": 6, - "x": 339.060296362573, - "y": 524.7754271337591 - }, - { - "id": 7, - "x": 341.64884537916925, - "y": 526.5125154522543 - }, - { - "id": 8, - "x": 344.0771833147321, - "y": 527.3880219566797 - }, - { - "id": 9, - "x": 335.88342117477254, - "y": 527.9910814406194 - }, - { - "id": 10, - "x": 334.6968087835627, - "y": 529.0659044885928 - }, - { - "id": 11, - "x": 333.86405081277377, - "y": 527.8757251825314 - }, - { - "id": 12, - "x": 339.9883503337483, - "y": 529.320022177355 - }, - { - "id": 13, - "x": 338.46802612975404, - "y": 530.370269900207 - }, - { - "id": 14, - "x": 337.1430909712236, - "y": 530.7341613769531 - }, - { - "id": 15, - "x": 341.9785882300073, - "y": 531.0127476105173 - }, - { - "id": 16, - "x": 340.85258785708925, - "y": 532.1869901255352 - }, - { - "id": 17, - "x": 339.1688606346047, - "y": 532.8862634202454 - }, - { - "id": 18, - "x": 339.0958418793731, - "y": 532.8511886128618 - }, - { - "id": 19, - "x": 342.74045026171336, - "y": 523.5337313474565 - }, - { - "id": 20, - "x": 343.0975823874003, - "y": 525.8059083903495 - }, - { - "id": 21, - "x": 341.95265642103254, - "y": 527.6336142573132 - }, - { - "id": 22, - "x": 340.4774169921875, - "y": 527.7661633949826 - } - ], - "connections": [ - { - "id": 1, - "from": 5, - "to": 4 - }, - { - "id": 2, - "from": 3, - "to": 4 - }, - { - "id": 3, - "from": 3, - "to": 2 - }, - { - "id": 4, - "from": 2, - "to": 1 - }, - { - "id": 5, - "from": 5, - "to": 6 - }, - { - "id": 6, - "from": 6, - "to": 9 - }, - { - "id": 7, - "from": 9, - "to": 10 - }, - { - "id": 8, - "from": 10, - "to": 11 - }, - { - "id": 9, - "from": 5, - "to": 7 - }, - { - "id": 10, - "from": 7, - "to": 12 - }, - { - "id": 11, - "from": 12, - "to": 13 - }, - { - "id": 12, - "from": 13, - "to": 14 - }, - { - "id": 13, - "from": 5, - "to": 8 - }, - { - "id": 14, - "from": 8, - "to": 15 - }, - { - "id": 15, - "from": 15, - "to": 16 - }, - { - "id": 16, - "from": 16, - "to": 17 - }, - { - "id": 17, - "from": 17, - "to": 18 - }, - { - "id": 18, - "from": 5, - "to": 19 - }, - { - "id": 19, - "from": 19, - "to": 20 - }, - { - "id": 20, - "from": 20, - "to": 21 - }, - { - "id": 21, - "from": 21, - "to": 22 - } - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "templateName": "HandPose", - "trackingId": "bab62dc810b0cee390f8d5fb5fa62fade3c8da7", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - }, - { - "type": "template", - "templateName": "some", - "classId": 72276, - "probability": 100, - "points": [ - { - "id": 1, - "x": 500.7473449707031, - "y": 512.2212813363728 - }, - { - "id": 2, - "x": 499.83990268916875, - "y": 511.0267255350125 - }, - { - "id": 3, - "x": 499.35212573376333, - "y": 508.78712984486833 - }, - { - "id": 4, - "x": 499.49539176186363, - "y": 505.6112143549695 - }, - { - "id": 5, - "x": 505.1166338239397, - "y": 498.2973327636719 - }, - { - "id": 6, - "x": 501.5269101321042, - "y": 506.7595579931341 - }, - { - "id": 7, - "x": 503.99778336745044, - "y": 506.673098948348 - }, - { - "id": 8, - "x": 506.9555402483259, - "y": 505.9015717613673 - }, - { - "id": 9, - "x": 501.35003494430373, - "y": 510.62224599140063 - }, - { - "id": 10, - "x": 501.986939398797, - "y": 512.5206164026553 - }, - { - "id": 11, - "x": 503.15418142800803, - "y": 512.9774707880001 - }, - { - "id": 12, - "x": 503.6314472575764, - "y": 510.3629298921987 - }, - { - "id": 13, - "x": 503.9346398992853, - "y": 513.4720155056757 - }, - { - "id": 14, - "x": 506.3155763227861, - "y": 514.4830017089844 - }, - { - "id": 15, - "x": 506.32755673586666, - "y": 510.11449321598604 - }, - { - "id": 16, - "x": 506.78978268130794, - "y": 513.0534452036602 - }, - { - "id": 17, - "x": 508.6354744041359, - "y": 513.6350427171204 - }, - { - "id": 18, - "x": 508.56245564890435, - "y": 512.0705489644243 - }, - { - "id": 19, - "x": 509.736452458979, - "y": 503.5178622068315 - }, - { - "id": 20, - "x": 510.1524224752909, - "y": 508.84887714034943 - }, - { - "id": 21, - "x": 509.8898512452513, - "y": 511.676521972157 - }, - { - "id": 22, - "x": 509.7675476074219, - "y": 511.8091321449826 - } - ], - "connections": [ - { - "id": 1, - "from": 5, - "to": 4 - }, - { - "id": 2, - "from": 3, - "to": 4 - }, - { - "id": 3, - "from": 3, - "to": 2 - }, - { - "id": 4, - "from": 2, - "to": 1 - }, - { - "id": 5, - "from": 5, - "to": 6 - }, - { - "id": 6, - "from": 6, - "to": 9 - }, - { - "id": 7, - "from": 9, - "to": 10 - }, - { - "id": 8, - "from": 10, - "to": 11 - }, - { - "id": 9, - "from": 5, - "to": 7 - }, - { - "id": 10, - "from": 7, - "to": 12 - }, - { - "id": 11, - "from": 12, - "to": 13 - }, - { - "id": 12, - "from": 13, - "to": 14 - }, - { - "id": 13, - "from": 5, - "to": 8 - }, - { - "id": 14, - "from": 8, - "to": 15 - }, - { - "id": 15, - "from": 15, - "to": 16 - }, - { - "id": 16, - "from": 16, - "to": 17 - }, - { - "id": 17, - "from": 17, - "to": 18 - }, - { - "id": 18, - "from": 5, - "to": 19 - }, - { - "id": 19, - "from": 19, - "to": 20 - }, - { - "id": 20, - "from": 20, - "to": 21 - }, - { - "id": 21, - "from": 21, - "to": 22 - } - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "templateName": "HandPose", - "trackingId": "f8f542a9e9da918d5d5cb8eed9052713302089", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - }, - { - "type": "template", - "templateName": "some", - "classId": 72276, - "probability": 100, - "points": [ - { - "id": 1, - "x": 460.2714192848242, - "y": 486.08071083487926 - }, - { - "id": 2, - "x": 454.92882596998356, - "y": 481.9066804669699 - }, - { - "id": 3, - "x": 461.0707178220127, - "y": 481.61528130084 - }, - { - "id": 4, - "x": 462.32680898178, - "y": 482.46856689453125 - }, - { - "id": 5, - "x": 444.8684189242054, - "y": 483.808782080494 - }, - { - "id": 6, - "x": 455.8683091235324, - "y": 497.2664014146353 - }, - { - "id": 7, - "x": 439.86159351357213, - "y": 498.91779556832523 - }, - { - "id": 8, - "x": 432.98627658437374, - "y": 519.4614616257791 - }, - { - "id": 9, - "x": 415.8799309258186, - "y": 515.9119205914317 - }, - { - "id": 10, - "x": 467.5532979208077, - "y": 499.0862192385027 - }, - { - "id": 11, - "x": 479.28433580441475, - "y": 514.1935318132136 - }, - { - "id": 12, - "x": 498.51239013671875, - "y": 512.030284394326 - }, - { - "id": 13, - "x": 454.8632612058889, - "y": 546.5478157765722 - }, - { - "id": 14, - "x": 444.0484270284733, - "y": 546.0017547475499 - }, - { - "id": 15, - "x": 464.16791732413037, - "y": 546.2800095783913 - }, - { - "id": 16, - "x": 468.63255127661785, - "y": 573.6905686937465 - }, - { - "id": 17, - "x": 457.1555372435924, - "y": 577.0907707675425 - }, - { - "id": 18, - "x": 432.2792663574219, - "y": 587.0443088500142 - }, - { - "id": 19, - "x": 429.91821938954894, - "y": 606.0040783618011 - }, - { - "id": 20, - "x": 463.69909188680566, - "y": 602.9990721708784 - }, - { - "id": 21, - "x": 484.317011118421, - "y": 607.0152893066406 - } - ], - "connections": [ - { - "id": 1, - "from": 1, - "to": 6 - }, - { - "id": 2, - "from": 6, - "to": 10 - }, - { - "id": 3, - "from": 10, - "to": 11 - }, - { - "id": 4, - "from": 11, - "to": 12 - }, - { - "id": 5, - "from": 7, - "to": 8 - }, - { - "id": 6, - "from": 8, - "to": 9 - }, - { - "id": 7, - "from": 14, - "to": 7 - }, - { - "id": 8, - "from": 14, - "to": 13 - }, - { - "id": 9, - "from": 13, - "to": 15 - }, - { - "id": 10, - "from": 15, - "to": 10 - }, - { - "id": 11, - "from": 7, - "to": 6 - }, - { - "id": 12, - "from": 14, - "to": 16 - }, - { - "id": 13, - "from": 15, - "to": 17 - }, - { - "id": 14, - "from": 16, - "to": 20 - }, - { - "id": 15, - "from": 20, - "to": 21 - }, - { - "id": 16, - "from": 17, - "to": 18 - }, - { - "id": 17, - "from": 18, - "to": 19 - }, - { - "id": 18, - "from": 5, - "to": 2 - }, - { - "id": 19, - "from": 2, - "to": 1 - }, - { - "id": 20, - "from": 1, - "to": 1 - }, - { - "id": 21, - "from": 3, - "to": 1 - }, - { - "id": 22, - "from": 3, - "to": 4 - } - ], - "groupId": 0, - "pointLabels": { - "0": "Nose" - }, - "locked": false, - "visible": false, - "attributes": [], - "templateName": "HandPose", - "trackingId": "4fd95b7d6d95b7b84750e65aa89c70b9c86eb3b8", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - }, - { - "type": "template", - "templateName": "some", - "classId": 72276, - "probability": 100, - "points": [ - { - "id": 1, - "x": 569.4099335784475, - "y": 411.3099511426366 - }, - { - "id": 2, - "x": 565.2798621579027, - "y": 406.3627038525488 - }, - { - "id": 3, - "x": 567.377754831435, - "y": 405.3775634765625 - }, - { - "id": 4, - "x": 562.1341137290701, - "y": 404.67809199715805 - }, - { - "id": 5, - "x": 554.7715578497942, - "y": 408.0821593507321 - }, - { - "id": 6, - "x": 543.3504267346603, - "y": 422.3509408794715 - }, - { - "id": 7, - "x": 530.5325718803996, - "y": 432.4575436529285 - }, - { - "id": 8, - "x": 513.1264329109782, - "y": 468.5712030528786 - }, - { - "id": 9, - "x": 505.0783099316068, - "y": 498.26488325838557 - }, - { - "id": 10, - "x": 564.5019009957019, - "y": 431.59166109918834 - }, - { - "id": 11, - "x": 572.9879904477306, - "y": 466.0899617391194 - }, - { - "id": 12, - "x": 588.320701407949, - "y": 491.39197319472385 - }, - { - "id": 13, - "x": 547.1874731524312, - "y": 499.0241945917735 - }, - { - "id": 14, - "x": 536.2172232162276, - "y": 499.38451563669537 - }, - { - "id": 15, - "x": 558.2200212079587, - "y": 496.61095606638287 - }, - { - "id": 16, - "x": 565.8375729727319, - "y": 546.3956734358432 - }, - { - "id": 17, - "x": 545.4810409910515, - "y": 549.0779244124057 - }, - { - "id": 18, - "x": 502.6168107549702, - "y": 573.1785073042392 - }, - { - "id": 19, - "x": 506.98697907641065, - "y": 599.8044128417969 - }, - { - "id": 20, - "x": 555.6301612734296, - "y": 594.6135561518564 - }, - { - "id": 21, - "x": 585.93212890625, - "y": 602.2106018066406 - } - ], - "connections": [ - { - "id": 1, - "from": 1, - "to": 6 - }, - { - "id": 2, - "from": 6, - "to": 10 - }, - { - "id": 3, - "from": 10, - "to": 11 - }, - { - "id": 4, - "from": 11, - "to": 12 - }, - { - "id": 5, - "from": 7, - "to": 8 - }, - { - "id": 6, - "from": 8, - "to": 9 - }, - { - "id": 7, - "from": 14, - "to": 7 - }, - { - "id": 8, - "from": 14, - "to": 13 - }, - { - "id": 9, - "from": 13, - "to": 15 - }, - { - "id": 10, - "from": 15, - "to": 10 - }, - { - "id": 11, - "from": 7, - "to": 6 - }, - { - "id": 12, - "from": 14, - "to": 16 - }, - { - "id": 13, - "from": 15, - "to": 17 - }, - { - "id": 14, - "from": 16, - "to": 20 - }, - { - "id": 15, - "from": 20, - "to": 21 - }, - { - "id": 16, - "from": 17, - "to": 18 - }, - { - "id": 17, - "from": 18, - "to": 19 - }, - { - "id": 18, - "from": 5, - "to": 2 - }, - { - "id": 19, - "from": 2, - "to": 1 - }, - { - "id": 20, - "from": 1, - "to": 1 - }, - { - "id": 21, - "from": 3, - "to": 1 - }, - { - "id": 22, - "from": 3, - "to": 4 - } - ], - "groupId": 0, - "pointLabels": { - "0": "Nose" - }, - "locked": false, - "visible": false, - "attributes": [], - "templateName": "HandPose", - "trackingId": "8894b2a1727f62631d26e885a5aaf9bc2ac2a578", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - }, - { - "type": "template", - "templateName": "some", - "classId": 72276, - "probability": 100, - "points": [ - { - "id": 1, - "x": 388.9594774956746, - "y": 424.3453820508397 - }, - { - "id": 2, - "x": 383.78257983006284, - "y": 420.2971520947363 - }, - { - "id": 3, - "x": 387.1454388819895, - "y": 419.5367736816406 - }, - { - "id": 4, - "x": 382.7214935156717, - "y": 418.8373022022362 - }, - { - "id": 5, - "x": 369.81775320578504, - "y": 421.3423522218259 - }, - { - "id": 6, - "x": 368.5353785473912, - "y": 441.4006845318153 - }, - { - "id": 7, - "x": 353.1593986570741, - "y": 443.28386811581913 - }, - { - "id": 8, - "x": 340.9145244608405, - "y": 484.88446599233174 - }, - { - "id": 9, - "x": 337.471170384727, - "y": 516.0647184634637 - }, - { - "id": 10, - "x": 380.0734310110131, - "y": 441.19236910700084 - }, - { - "id": 11, - "x": 392.6590966976267, - "y": 481.59771320396317 - }, - { - "id": 12, - "x": 411.22125244140625, - "y": 510.38843315566135 - }, - { - "id": 13, - "x": 368.27931488725477, - "y": 514.5319460566172 - }, - { - "id": 14, - "x": 361.465192188568, - "y": 515.6977785761485 - }, - { - "id": 15, - "x": 378.7043428557912, - "y": 512.1187075312266 - }, - { - "id": 16, - "x": 393.26020935016874, - "y": 556.5333687483432 - }, - { - "id": 17, - "x": 344.09536524138383, - "y": 562.7657295881869 - }, - { - "id": 18, - "x": 321.86363692684523, - "y": 598.4685463667392 - }, - { - "id": 19, - "x": 345.55514438756916, - "y": 610.3072814941406 - }, - { - "id": 20, - "x": 402.05302902711884, - "y": 603.0690004877939 - }, - { - "id": 21, - "x": 426.8170225465453, - "y": 607.0261535644531 - } - ], - "connections": [ - { - "id": 1, - "from": 1, - "to": 6 - }, - { - "id": 2, - "from": 6, - "to": 10 - }, - { - "id": 3, - "from": 10, - "to": 11 - }, - { - "id": 4, - "from": 11, - "to": 12 - }, - { - "id": 5, - "from": 7, - "to": 8 - }, - { - "id": 6, - "from": 8, - "to": 9 - }, - { - "id": 7, - "from": 14, - "to": 7 - }, - { - "id": 8, - "from": 14, - "to": 13 - }, - { - "id": 9, - "from": 13, - "to": 15 - }, - { - "id": 10, - "from": 15, - "to": 10 - }, - { - "id": 11, - "from": 7, - "to": 6 - }, - { - "id": 12, - "from": 14, - "to": 16 - }, - { - "id": 13, - "from": 15, - "to": 17 - }, - { - "id": 14, - "from": 16, - "to": 20 - }, - { - "id": 15, - "from": 20, - "to": 21 - }, - { - "id": 16, - "from": 17, - "to": 18 - }, - { - "id": 17, - "from": 18, - "to": 19 - }, - { - "id": 18, - "from": 5, - "to": 2 - }, - { - "id": 19, - "from": 2, - "to": 1 - }, - { - "id": 20, - "from": 1, - "to": 1 - }, - { - "id": 21, - "from": 3, - "to": 1 - }, - { - "id": 22, - "from": 3, - "to": 4 - } - ], - "groupId": 0, - "pointLabels": { - "0": "Nose" - }, - "locked": false, - "visible": false, - "attributes": [], - "templateName": "HandPose", - "trackingId": "2fe1f0c6c4af879955d6f19cfcf113a6b929b73", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - }, - { - "type": "polygon", - "classId": 72276, - "probability": 100, - "points": [ - 496.93, - 506.95, - 500.11, - 499.6, - 499.38, - 494.21, - 500.85, - 490.53, - 502.81, - 490.04, - 503.79, - 488.32, - 505.02, - 480.97, - 507.22, - 477.3, - 510.16, - 466.51, - 520.21, - 451.32, - 522.42, - 446.41, - 524.38, - 435.63, - 541.78, - 412.84, - 543, - 408.92, - 541.78, - 405.73, - 541.78, - 398.13, - 542.51, - 394.95, - 543.74, - 392.74, - 546.19, - 389.8, - 548.4, - 388.82, - 556.97, - 388.82, - 563.35, - 391.27, - 565.06, - 393.23, - 566.29, - 396.42, - 567.76, - 405.24, - 569.23, - 409.41, - 569.23, - 412.59, - 568.25, - 414.55, - 568, - 419.45, - 565.8, - 422.4, - 562.37, - 423.62, - 561.63, - 425.09, - 561.63, - 427.05, - 566.04, - 429.5, - 568, - 433.42, - 569.72, - 445.68, - 594.96, - 498.62, - 594.96, - 502.78, - 593.98, - 505.48, - 591.53, - 508.18, - 589.82, - 508.42, - 588.35, - 505.97, - 586.88, - 500.58, - 585.4, - 499.6, - 582.46, - 499.35, - 568.98, - 481.71, - 571.19, - 508.18, - 569.96, - 510.63, - 567.76, - 510.87, - 572.66, - 595.43, - 574.87, - 597.63, - 580.01, - 598.61, - 586.39, - 598.61, - 588.84, - 599.35, - 589.33, - 601.31, - 587.86, - 604.01, - 586.88, - 604.5, - 553.3, - 604.99, - 551.09, - 601.8, - 551.09, - 592.49, - 552.81, - 589.55, - 548.15, - 554.25, - 530.51, - 572.39, - 511.88, - 586.85, - 509.67, - 587.09, - 508.69, - 593.22, - 508.69, - 596.9, - 509.92, - 599.84, - 509.67, - 601.8, - 506.49, - 602.04, - 502.57, - 598.86, - 499.87, - 594.45, - 496.93, - 584.64, - 492.52, - 581.21, - 489.58, - 576.56, - 489.82, - 571.41, - 491.05, - 570.18, - 498.15, - 569.45, - 509.67, - 565.04, - 525.11, - 547.64, - 532.22, - 546.16, - 531.98, - 541.26, - 537.12, - 538.57, - 530.51, - 510.14, - 526.34, - 513.32, - 522.42, - 489.55, - 521.19, - 477.05, - 517.76, - 485.38, - 515.31, - 489.06, - 514.57, - 493.72, - 512.61, - 495.68, - 511.39, - 498.86, - 509.43, - 506.71, - 508.94, - 514.55, - 505.51, - 515.28, - 501.83, - 514.55, - 498.15, - 510.87, - 497.91, - 507.93 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "bf7e1885326a2aac18619c30d310c21e8fb89e93", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - }, - { - "type": "polygon", - "classId": 72276, - "probability": 100, - "points": [ - 418.36, - 510.31, - 423.02, - 513.25, - 429.15, - 514.48, - 433.07, - 513.25, - 441.65, - 499.04, - 448.76, - 495.36, - 449.74, - 490.7, - 446.55, - 487.52, - 444.83, - 484.33, - 446.06, - 471.59, - 448.27, - 468.89, - 453.66, - 467.18, - 459.29, - 468.16, - 464.69, - 470.61, - 465.42, - 471.59, - 466.16, - 483.6, - 464.69, - 488.25, - 464.69, - 493.4, - 467.87, - 497.57, - 482.58, - 507.37, - 486.5, - 509.33, - 500.96, - 509.09, - 500.22, - 516.93, - 499.24, - 519.13, - 481.11, - 520.61, - 475.47, - 517.42, - 472.28, - 517.17, - 471.55, - 518.4, - 470.08, - 544.62, - 470.81, - 557.12, - 474.49, - 576, - 473.02, - 599.52, - 482.09, - 602.46, - 488.21, - 605.65, - 488.46, - 608.35, - 487.97, - 609.08, - 464.2, - 610.06, - 463.46, - 603.44, - 461.74, - 600.26, - 461.74, - 597.56, - 463.95, - 595.11, - 463.22, - 591.68, - 463.95, - 580.9, - 452.92, - 587.51, - 442.87, - 590.21, - 443.85, - 591.93, - 443.36, - 592.66, - 441.89, - 591.93, - 439.93, - 592.42, - 439.2, - 593.4, - 438.95, - 597.07, - 435.52, - 601.48, - 434.3, - 608.35, - 433.07, - 609.57, - 431.35, - 603.44, - 429.64, - 602.95, - 427.92, - 584.33, - 437.48, - 582.61, - 456.35, - 572.81, - 454.88, - 567.17, - 453.17, - 563.74, - 453.41, - 559.82, - 450.96, - 556.63, - 447.53, - 554.43, - 445.81, - 551.24, - 442.14, - 550.02, - 438.95, - 522.81, - 423.27, - 523.79, - 417.63, - 521.83, - 413.95, - 516.93, - 413.71, - 515.21 - ], - "groupId": 0, - "pointLabels": { - "0": "Left Hand", - "21": "Right Hand" - }, - "locked": false, - "visible": true, - "attributes": [], - "trackingId": "932bda5b59db89dd68602306c70d8da62e0afdc", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - }, - { - "type": "polygon", - "classId": 72276, - "probability": 100, - "points": [ - 380.35, - 435.63, - 378.64, - 439.31, - 395.79, - 464.55, - 396.28, - 478.03, - 394.57, - 481.22, - 407.56, - 499.11, - 408.05, - 501.07, - 410.74, - 502.05, - 410.99, - 504.99, - 415.15, - 507.93, - 415.15, - 509.4, - 410.25, - 513.32, - 407.8, - 517, - 399.22, - 516.75, - 390.4, - 510.87, - 389.18, - 512.34, - 397.51, - 539.06, - 397.75, - 559.89, - 400.2, - 568.47, - 409.76, - 593.96, - 417.12, - 602.78, - 422.51, - 604.25, - 428.63, - 603.76, - 429.61, - 606.21, - 428.63, - 608.42, - 402.65, - 614.3, - 396.53, - 611.85, - 395.79, - 609.4, - 397.51, - 602.04, - 395.55, - 599.35, - 394.57, - 599.35, - 383.29, - 574.84, - 380.6, - 555.97, - 369.32, - 542, - 350.45, - 561.61, - 334.03, - 598.86, - 335.01, - 600.82, - 340.65, - 606.21, - 343.34, - 607.44, - 348.49, - 607.93, - 349.47, - 608.66, - 349.72, - 610.62, - 348.25, - 612.09, - 346.78, - 612.58, - 319.82, - 610.62, - 315.89, - 608.17, - 318.1, - 599.84, - 319.08, - 590.77, - 329.13, - 566.02, - 339.42, - 549.11, - 342.61, - 541.51, - 341.38, - 529.74, - 339.18, - 533.91, - 333.79, - 524.6, - 333.3, - 521.9, - 325.94, - 519.45, - 339.42, - 477.54, - 339.18, - 467.98, - 336.48, - 463.82, - 359.52, - 408.92, - 366.38, - 404.5, - 379.62, - 404.5, - 380.84, - 404.99, - 385.5, - 411.12, - 387.7, - 416.27, - 387.7, - 420.68, - 389.42, - 424.6, - 388.44, - 428.03, - 386.97, - 429.75, - 386.23, - 434.65 - ], - "groupId": 0, - "pointLabels": {}, - "locked": false, - "visible": false, - "attributes": [], - "trackingId": "b4a35bf808984de199195734dfbb73b1cb5c8b5", - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "className": "Human" - } - ], - "tags": [], - "comments": [ - { - "x": 621.41, - "y": 631.6, - "resolved": true, - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "correspondence": [ - { - "text": "Bordyuri mi mas@ petqa lini parking class-i mej myus mas@ Terrian class-i", - "email": "hovnatan@superannotate.com" - } - ] - }, - { - "x": 521.41, - "y": 531.6, - "resolved": false, - "createdAt": null, - "createdBy": null, - "creationType": null, - "updatedAt": null, - "updatedBy": null, - "correspondence": [ - { - "text": "dd", - "email": "hovnatan@superannotate.com" - } - ] - } - ] -} +{"metadata": {"name": "example_image_1.jpg", "status": "Completed", "width": 1024, "height": 683, "pinned": false, "lastAction": {"email": "shab.prog@gmail.com", "timestamp": 1644997568}}, "comments": [{"creationType": "Preannotation", "x": 621.41, "y": 631.6, "resolved": true, "correspondence": [{"text": "Bordyuri mi mas@ petqa lini parking class-i mej myus mas@ Terrian class-i", "email": "hovnatan@superannotate.com"}]}, {"creationType": "Preannotation", "x": 521.41, "y": 531.6, "resolved": false, "correspondence": [{"text": "dd", "email": "hovnatan@superannotate.com"}]}], "tags": [], "instances": [{"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "bbox", "pointLabels": {}, "trackingId": "aaa97f80c9e54a5f2dc2e920fc92e5033d9af45b", "groupId": 0, "points": {"x1": 437.16, "x2": 465.23, "y1": 341.5, "y2": 357.09}}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle1", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "bbox", "pointLabels": {}, "groupId": 0, "points": {"x1": 480.0, "x2": 490.0, "y1": 340.0, "y2": 350.0}}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [{"id": 117845, "groupId": 28230, "name": "10", "groupName": "Num doors"}], "type": "bbox", "pointLabels": {}, "groupId": 0, "points": {"x1": 500.0, "x2": 510.0, "y1": 340.0, "y2": 350.0}}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [{"id": 117845, "groupId": 28230, "name": "4", "groupName": "Num doors1"}], "type": "bbox", "pointLabels": {}, "groupId": 0, "points": {"x1": 520.0, "x2": 530.0, "y1": 340.0, "y2": 350.0}}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [{"id": 117846, "groupId": 28230, "name": "4", "groupName": "Num doors"}], "type": "template", "pointLabels": {"4": "top_left", "5": "bottom_left"}, "trackingId": "cbde2787e76c41be77c1079e8d090252ad701ea", "groupId": 0, "points": [{"id": 1, "x": 800.8311630011381, "y": 431.7220764160156}, {"id": 2, "x": 834.6965942382812, "y": 431.8820692877566}, {"id": 3, "x": 834.6965942382812, "y": 480.848388671875}, {"id": 4, "x": 801.0125574701838, "y": 480.848388671875}, {"id": 5, "x": 702.6083268971072, "y": 437.5428573337124}, {"id": 6, "x": 702.5221557617188, "y": 474.8859480851478}], "connections": [{"id": 1, "from": 1, "to": 2}, {"id": 2, "from": 2, "to": 3}, {"id": 3, "from": 3, "to": 4}, {"id": 4, "from": 4, "to": 1}, {"id": 5, "from": 1, "to": 5}, {"id": 6, "from": 5, "to": 6}, {"id": 7, "from": 6, "to": 4}], "templateName": "HandPose", "templateId": -1}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "bf069efee9e65463824466f442a409a137eabaee", "groupId": 0, "points": [281.98, 383.75, 282.55, 378.1, 287.26, 376.12, 297.35, 372.91, 311.01, 372.82, 319.59, 375.74, 323.55, 378.28, 325.91, 381.68, 326.66, 385.45, 325.43, 387.62, 324.02, 388.75, 317.23, 388.84, 315.54, 390.26, 312.43, 390.54, 308.66, 388.46, 306.39, 388.84, 297.44, 389.03, 291.5, 388.18, 287.64, 384.51]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "a520dde722112d1579ff65260166d02ac1c14e2", "groupId": 1, "points": [266.9, 384.88, 267.47, 404.21, 276.23, 404.87, 277.65, 407.32, 278.78, 407.79, 282.17, 407.79, 284.15, 407.32, 285.19, 403.92, 292.73, 403.83, 293.29, 405.43, 294.99, 406.37, 297.53, 406.28, 298.57, 405.43, 301.12, 404.39, 302.15, 402.41, 303.38, 395.53, 301.49, 391.39, 296.12, 389.03, 291.78, 388.84, 286.79, 384.13, 284.9, 384.51]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "97e8bcc305b69af97b1a51c102c22a03887410bd", "groupId": 1, "points": [262.94, 385.54, 263.88, 404.68, 262.47, 404.96, 262.19, 406.66, 261.34, 408.07, 259.74, 408.54, 256.53, 408.64, 255.59, 408.16, 254.84, 407.13, 254.08, 403.92, 252.76, 402.79, 250.69, 402.32, 249.75, 401.19, 250.5, 389.03, 254.18, 384.51, 262.56, 384.32]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "15e2bd2a9bf66c4df00df9fbe6fd6db43abc56", "groupId": 0, "points": [348.62, 395.91, 367.76, 395.34, 367, 384.32, 364.36, 378, 349.09, 377.81, 346.55, 385.54, 346.55, 395.82]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "98c3f3a3fdeb809c7a8de125447acce21abda84f", "groupId": 0, "points": [325.25, 402.32, 321.1, 410.99, 321, 424.47, 329.21, 424.75, 329.49, 423.06, 344.57, 423.15, 344.85, 424.85, 349.94, 424.38, 349.09, 409.2, 344.57, 401.47]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "de78e5e22b397426228bed63c15ad2f41bfe653", "groupId": 0, "points": [114.81, 432.5, 149.32, 430.8, 169.65, 442.24, 187.65, 446.05, 192.94, 453.25, 192.31, 462.14, 189.77, 467.44, 183.84, 470.83, 177.48, 472.52, 169.65, 480.57, 163.93, 481.62, 160.54, 477.18, 159.27, 472.73, 159.91, 468.28, 159.49, 458.76, 156.94, 450.71, 136.62, 437.37, 119.04, 436.52]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "7adde574ed24f845d700b0c8371122bfe667751f", "groupId": 0, "points": [120.52, 437.37, 135.77, 437.79, 156.31, 450.5, 158.85, 459.39, 159.27, 468.71, 158.21, 474.21, 152.92, 480.78, 147.84, 483.74, 142.54, 484.17, 139.37, 482.05, 140.43, 477.6, 144.87, 475.91, 146.78, 471.25, 144.03, 457.27]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "4a47c34904d5e6bafdab32f9896c4013b1ddd153", "groupId": 0, "points": [81.46, 437.16, 94.38, 435.04, 110.9, 433.56, 117.67, 434.83, 133.77, 448.8, 144.99, 457.27, 147.32, 471.67, 145.62, 475.91, 141.6, 477.6, 136.31, 485.22, 131.65, 487.98, 126.78, 488.61, 122.97, 472.73, 118.52, 464.26, 110.9, 455.37, 103.06, 441.18, 99.89, 438.64]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "eb882a5e0012c77a1557c47bf386b21b6f6848", "groupId": 0, "points": [684.8, 420.93, 683.1, 416.3, 634.11, 414.48, 626.68, 419.72, 622.9, 424.35, 609.62, 425.69, 604.63, 427.76, 600.73, 434.34, 600.48, 440.19, 600.97, 440.92, 604.02, 442.01, 604.99, 445.67, 607.18, 447.99, 610.96, 450.18, 618.64, 450.91, 621.2, 448.72, 622.54, 446.16, 626.8, 446.16, 626.92, 440.67, 629.6, 435.31, 633.75, 432.39, 646.79, 430.32, 664.09, 420.81, 685.05, 422.4]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "56b1a09c67ce96a1719afe9f8c2b50b3dd08cd1c", "groupId": 0, "points": [674.69, 421.91, 664.82, 421.3, 646.66, 430.56, 634.24, 432.63, 629.85, 435.68, 627.29, 440.55, 627.05, 444.94, 628.14, 447.13, 628.63, 447.86, 631.68, 448.35, 633.38, 451.4, 634.48, 452.25, 634.72, 446.89, 636.43, 437.99, 645.57, 434.34, 656.53, 431.05]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "12a358abc908ad69e8b599ab359e12ecfe1047", "groupId": 0, "points": [729.77, 442.26, 729.89, 436.04, 726.11, 425.93, 719.9, 423.86, 676.27, 422.93, 670.06, 424.22, 656.78, 431.41, 641.67, 435.68, 636.92, 438.12, 635.09, 447.25, 634.97, 452.86, 635.7, 453.71, 640.33, 455.17, 643.25, 457.86, 649.59, 458.22, 652.27, 457.86, 654.95, 454.32, 656.29, 453.47, 664.45, 453.96, 667.62, 458.71, 668.72, 458.95, 671.64, 458.95, 673.96, 458.34, 676.52, 456.76, 678.35, 454.32, 686.75, 454.93, 689.92, 459.56, 691.51, 460.78, 696.87, 461.27, 699.67, 460.29, 702.84, 456.51, 705.27, 455.91, 706.86, 452.37, 708.69, 450.79, 722.21, 445.18, 725.87, 445.43]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 96, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "8f8ef909a683eaf9852b4d9784ec63b471c58d16", "groupId": 0, "points": [703, 462.81, 703, 464.81, 712, 472.81, 712, 474.81, 724, 474.81, 729, 471.81, 741.61, 472.86, 745.32, 476.75, 753.29, 476.57, 756.25, 473.97, 770, 473.81, 780, 478.81, 784, 478.81, 792, 474.81, 802, 474.81, 806, 478.81, 812, 479.81, 817, 477.81, 820, 473.81, 832.61, 472.49, 834, 468.81, 833, 453.81, 827, 448.81, 805, 437.81, 783, 434.81, 750, 434.81, 739, 437.81, 726, 445.81, 722, 445.81, 709, 450.81, 707, 452.81, 705.11, 457.11]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 98, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "d9975dc56b159b1690fbdea7b04dd35f2ba69366", "groupId": 0, "points": [1023.86, 432.09, 1019, 434, 1008, 440, 1001, 447, 960, 450, 952, 453, 945, 460, 940, 472, 942, 496, 945, 500, 948, 500, 954, 510, 958, 514, 980, 515, 992, 504, 999, 506, 1006, 513, 1009, 514, 1016.82, 516.78, 1023.86, 515.86]}, {"creationType": "Preannotation", "classId": -1, "className": "Personal vehicle", "visible": false, "locked": false, "probability": 98, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "76d42d45e8b0c11a055dff75a405b515bb1dd53f", "groupId": 0, "points": [6, 447, 0, 459, 0, 528, 2, 531, 12, 530, 20, 536, 25, 536, 33, 530, 61, 530, 77, 528, 86, 534, 94, 535, 99, 532, 100, 525, 102, 522, 109.39, 521.38, 111.09, 529.47, 122.6, 528.2, 126.44, 491.97, 122, 474, 118, 465, 110, 456, 103, 442, 99, 439, 47, 438, 16, 442]}, {"creationType": "Preannotation", "classId": -1, "className": "Large vehicle", "visible": true, "locked": false, "probability": 100, "attributes": [], "type": "bbox", "pointLabels": {"0": "Top Left", "4": "Bottom Right"}, "trackingId": "ac43151b5ac2d511beac8d2ec15695f421b93882", "groupId": 0, "points": {"x1": 240.68, "x2": 304.61, "y1": 378.93, "y2": 410.11}}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "template", "pointLabels": {}, "trackingId": "2c89e809614523cf56c9aeab932e90b87aaf5e4f", "groupId": 0, "points": [{"id": 1, "x": 590.36328125, "y": 505.471431864795}, {"id": 2, "x": 590.2529541686341, "y": 504.29565523299704}, {"id": 3, "x": 590.0863828554258, "y": 502.0855402722193}, {"id": 4, "x": 589.8926669948704, "y": 500.1575188822054}, {"id": 5, "x": 588.2789742606027, "y": 491.4069519042969}, {"id": 6, "x": 591.6578771570227, "y": 498.7841862403542}, {"id": 7, "x": 592.6675015963041, "y": 497.5725781649412}, {"id": 8, "x": 593.4538138253348, "y": 495.05589353721325}, {"id": 9, "x": 591.9352490770948, "y": 502.2054028345276}, {"id": 10, "x": 591.4315175486134, "y": 504.8054433249257}, {"id": 11, "x": 591.0675032060225, "y": 506.48433274969244}, {"id": 12, "x": 593.6178112658826, "y": 501.4214392039917}, {"id": 13, "x": 592.6682424021291, "y": 504.65690054240156}, {"id": 14, "x": 591.8309557568896, "y": 507.1707458496094}, {"id": 15, "x": 594.685306758671, "y": 499.50420568423283}, {"id": 16, "x": 594.4346668956044, "y": 503.3523914672602}, {"id": 17, "x": 593.4855715573489, "y": 505.4433191217528}, {"id": 18, "x": 592.9555204622038, "y": 507.0652772868338}, {"id": 19, "x": 589.5701713142814, "y": 496.6512277677259}, {"id": 20, "x": 590.8887191604782, "y": 499.291411604618}, {"id": 21, "x": 591.1992693890583, "y": 501.8345208353304}, {"id": 22, "x": 591.0341186523438, "y": 501.9896778816582}], "connections": [{"id": 1, "from": 5, "to": 4}, {"id": 2, "from": 3, "to": 4}, {"id": 3, "from": 3, "to": 2}, {"id": 4, "from": 2, "to": 1}, {"id": 5, "from": 5, "to": 6}, {"id": 6, "from": 6, "to": 9}, {"id": 7, "from": 9, "to": 10}, {"id": 8, "from": 10, "to": 11}, {"id": 9, "from": 5, "to": 7}, {"id": 10, "from": 7, "to": 12}, {"id": 11, "from": 12, "to": 13}, {"id": 12, "from": 13, "to": 14}, {"id": 13, "from": 5, "to": 8}, {"id": 14, "from": 8, "to": 15}, {"id": 15, "from": 15, "to": 16}, {"id": 16, "from": 16, "to": 17}, {"id": 17, "from": 17, "to": 18}, {"id": 18, "from": 5, "to": 19}, {"id": 19, "from": 19, "to": 20}, {"id": 20, "from": 20, "to": 21}, {"id": 21, "from": 21, "to": 22}], "templateName": "HandPose", "templateId": -1}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "template", "pointLabels": {}, "trackingId": "bab62dc810b0cee390f8d5fb5fa62fade3c8da7", "groupId": 0, "points": [{"id": 1, "x": 332.9866027832032, "y": 526.2959883676228}, {"id": 2, "x": 332.8439004919032, "y": 527.5132367654812}, {"id": 3, "x": 334.35612353649776, "y": 527.3324179308058}, {"id": 4, "x": 336.2640990372543, "y": 524.0976645502819}, {"id": 5, "x": 337.51601736886164, "y": 516.1050720214844}, {"id": 6, "x": 339.060296362573, "y": 524.7754271337591}, {"id": 7, "x": 341.64884537916925, "y": 526.5125154522543}, {"id": 8, "x": 344.0771833147321, "y": 527.3880219566797}, {"id": 9, "x": 335.88342117477254, "y": 527.9910814406194}, {"id": 10, "x": 334.6968087835627, "y": 529.0659044885928}, {"id": 11, "x": 333.86405081277377, "y": 527.8757251825314}, {"id": 12, "x": 339.9883503337483, "y": 529.320022177355}, {"id": 13, "x": 338.46802612975404, "y": 530.370269900207}, {"id": 14, "x": 337.1430909712236, "y": 530.7341613769531}, {"id": 15, "x": 341.9785882300073, "y": 531.0127476105173}, {"id": 16, "x": 340.85258785708925, "y": 532.1869901255352}, {"id": 17, "x": 339.1688606346047, "y": 532.8862634202454}, {"id": 18, "x": 339.0958418793731, "y": 532.8511886128618}, {"id": 19, "x": 342.74045026171336, "y": 523.5337313474565}, {"id": 20, "x": 343.0975823874003, "y": 525.8059083903495}, {"id": 21, "x": 341.95265642103254, "y": 527.6336142573132}, {"id": 22, "x": 340.4774169921875, "y": 527.7661633949826}], "connections": [{"id": 1, "from": 5, "to": 4}, {"id": 2, "from": 3, "to": 4}, {"id": 3, "from": 3, "to": 2}, {"id": 4, "from": 2, "to": 1}, {"id": 5, "from": 5, "to": 6}, {"id": 6, "from": 6, "to": 9}, {"id": 7, "from": 9, "to": 10}, {"id": 8, "from": 10, "to": 11}, {"id": 9, "from": 5, "to": 7}, {"id": 10, "from": 7, "to": 12}, {"id": 11, "from": 12, "to": 13}, {"id": 12, "from": 13, "to": 14}, {"id": 13, "from": 5, "to": 8}, {"id": 14, "from": 8, "to": 15}, {"id": 15, "from": 15, "to": 16}, {"id": 16, "from": 16, "to": 17}, {"id": 17, "from": 17, "to": 18}, {"id": 18, "from": 5, "to": 19}, {"id": 19, "from": 19, "to": 20}, {"id": 20, "from": 20, "to": 21}, {"id": 21, "from": 21, "to": 22}], "templateName": "HandPose", "templateId": -1}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "template", "pointLabels": {}, "trackingId": "f8f542a9e9da918d5d5cb8eed9052713302089", "groupId": 0, "points": [{"id": 1, "x": 500.7473449707031, "y": 512.2212813363728}, {"id": 2, "x": 499.83990268916875, "y": 511.0267255350125}, {"id": 3, "x": 499.35212573376333, "y": 508.78712984486833}, {"id": 4, "x": 499.49539176186363, "y": 505.6112143549695}, {"id": 5, "x": 505.1166338239397, "y": 498.2973327636719}, {"id": 6, "x": 501.5269101321042, "y": 506.7595579931341}, {"id": 7, "x": 503.99778336745044, "y": 506.673098948348}, {"id": 8, "x": 506.9555402483259, "y": 505.9015717613673}, {"id": 9, "x": 501.35003494430373, "y": 510.62224599140063}, {"id": 10, "x": 501.986939398797, "y": 512.5206164026553}, {"id": 11, "x": 503.15418142800803, "y": 512.9774707880001}, {"id": 12, "x": 503.6314472575764, "y": 510.3629298921987}, {"id": 13, "x": 503.9346398992853, "y": 513.4720155056757}, {"id": 14, "x": 506.3155763227861, "y": 514.4830017089844}, {"id": 15, "x": 506.32755673586666, "y": 510.11449321598604}, {"id": 16, "x": 506.78978268130794, "y": 513.0534452036602}, {"id": 17, "x": 508.6354744041359, "y": 513.6350427171204}, {"id": 18, "x": 508.56245564890435, "y": 512.0705489644243}, {"id": 19, "x": 509.736452458979, "y": 503.5178622068315}, {"id": 20, "x": 510.1524224752909, "y": 508.84887714034943}, {"id": 21, "x": 509.8898512452513, "y": 511.676521972157}, {"id": 22, "x": 509.7675476074219, "y": 511.8091321449826}], "connections": [{"id": 1, "from": 5, "to": 4}, {"id": 2, "from": 3, "to": 4}, {"id": 3, "from": 3, "to": 2}, {"id": 4, "from": 2, "to": 1}, {"id": 5, "from": 5, "to": 6}, {"id": 6, "from": 6, "to": 9}, {"id": 7, "from": 9, "to": 10}, {"id": 8, "from": 10, "to": 11}, {"id": 9, "from": 5, "to": 7}, {"id": 10, "from": 7, "to": 12}, {"id": 11, "from": 12, "to": 13}, {"id": 12, "from": 13, "to": 14}, {"id": 13, "from": 5, "to": 8}, {"id": 14, "from": 8, "to": 15}, {"id": 15, "from": 15, "to": 16}, {"id": 16, "from": 16, "to": 17}, {"id": 17, "from": 17, "to": 18}, {"id": 18, "from": 5, "to": 19}, {"id": 19, "from": 19, "to": 20}, {"id": 20, "from": 20, "to": 21}, {"id": 21, "from": 21, "to": 22}], "templateName": "HandPose", "templateId": -1}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "template", "pointLabels": {"0": "Nose"}, "trackingId": "4fd95b7d6d95b7b84750e65aa89c70b9c86eb3b8", "groupId": 0, "points": [{"id": 1, "x": 460.2714192848242, "y": 486.08071083487926}, {"id": 2, "x": 454.92882596998356, "y": 481.9066804669699}, {"id": 3, "x": 461.0707178220127, "y": 481.61528130084}, {"id": 4, "x": 462.32680898178, "y": 482.46856689453125}, {"id": 5, "x": 444.8684189242054, "y": 483.808782080494}, {"id": 6, "x": 455.8683091235324, "y": 497.2664014146353}, {"id": 7, "x": 439.86159351357213, "y": 498.91779556832523}, {"id": 8, "x": 432.98627658437374, "y": 519.4614616257791}, {"id": 9, "x": 415.8799309258186, "y": 515.9119205914317}, {"id": 10, "x": 467.5532979208077, "y": 499.0862192385027}, {"id": 11, "x": 479.28433580441475, "y": 514.1935318132136}, {"id": 12, "x": 498.51239013671875, "y": 512.030284394326}, {"id": 13, "x": 454.8632612058889, "y": 546.5478157765722}, {"id": 14, "x": 444.0484270284733, "y": 546.0017547475499}, {"id": 15, "x": 464.16791732413037, "y": 546.2800095783913}, {"id": 16, "x": 468.63255127661785, "y": 573.6905686937465}, {"id": 17, "x": 457.1555372435924, "y": 577.0907707675425}, {"id": 18, "x": 432.2792663574219, "y": 587.0443088500142}, {"id": 19, "x": 429.91821938954894, "y": 606.0040783618011}, {"id": 20, "x": 463.69909188680566, "y": 602.9990721708784}, {"id": 21, "x": 484.317011118421, "y": 607.0152893066406}], "connections": [{"id": 1, "from": 1, "to": 6}, {"id": 2, "from": 6, "to": 10}, {"id": 3, "from": 10, "to": 11}, {"id": 4, "from": 11, "to": 12}, {"id": 5, "from": 7, "to": 8}, {"id": 6, "from": 8, "to": 9}, {"id": 7, "from": 14, "to": 7}, {"id": 8, "from": 14, "to": 13}, {"id": 9, "from": 13, "to": 15}, {"id": 10, "from": 15, "to": 10}, {"id": 11, "from": 7, "to": 6}, {"id": 12, "from": 14, "to": 16}, {"id": 13, "from": 15, "to": 17}, {"id": 14, "from": 16, "to": 20}, {"id": 15, "from": 20, "to": 21}, {"id": 16, "from": 17, "to": 18}, {"id": 17, "from": 18, "to": 19}, {"id": 18, "from": 5, "to": 2}, {"id": 19, "from": 2, "to": 1}, {"id": 20, "from": 1, "to": 1}, {"id": 21, "from": 3, "to": 1}, {"id": 22, "from": 3, "to": 4}], "templateName": "HandPose", "templateId": -1}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "template", "pointLabels": {"0": "Nose"}, "trackingId": "8894b2a1727f62631d26e885a5aaf9bc2ac2a578", "groupId": 0, "points": [{"id": 1, "x": 569.4099335784475, "y": 411.3099511426366}, {"id": 2, "x": 565.2798621579027, "y": 406.3627038525488}, {"id": 3, "x": 567.377754831435, "y": 405.3775634765625}, {"id": 4, "x": 562.1341137290701, "y": 404.67809199715805}, {"id": 5, "x": 554.7715578497942, "y": 408.0821593507321}, {"id": 6, "x": 543.3504267346603, "y": 422.3509408794715}, {"id": 7, "x": 530.5325718803996, "y": 432.4575436529285}, {"id": 8, "x": 513.1264329109782, "y": 468.5712030528786}, {"id": 9, "x": 505.0783099316068, "y": 498.26488325838557}, {"id": 10, "x": 564.5019009957019, "y": 431.59166109918834}, {"id": 11, "x": 572.9879904477306, "y": 466.0899617391194}, {"id": 12, "x": 588.320701407949, "y": 491.39197319472385}, {"id": 13, "x": 547.1874731524312, "y": 499.0241945917735}, {"id": 14, "x": 536.2172232162276, "y": 499.38451563669537}, {"id": 15, "x": 558.2200212079587, "y": 496.61095606638287}, {"id": 16, "x": 565.8375729727319, "y": 546.3956734358432}, {"id": 17, "x": 545.4810409910515, "y": 549.0779244124057}, {"id": 18, "x": 502.6168107549702, "y": 573.1785073042392}, {"id": 19, "x": 506.98697907641065, "y": 599.8044128417969}, {"id": 20, "x": 555.6301612734296, "y": 594.6135561518564}, {"id": 21, "x": 585.93212890625, "y": 602.2106018066406}], "connections": [{"id": 1, "from": 1, "to": 6}, {"id": 2, "from": 6, "to": 10}, {"id": 3, "from": 10, "to": 11}, {"id": 4, "from": 11, "to": 12}, {"id": 5, "from": 7, "to": 8}, {"id": 6, "from": 8, "to": 9}, {"id": 7, "from": 14, "to": 7}, {"id": 8, "from": 14, "to": 13}, {"id": 9, "from": 13, "to": 15}, {"id": 10, "from": 15, "to": 10}, {"id": 11, "from": 7, "to": 6}, {"id": 12, "from": 14, "to": 16}, {"id": 13, "from": 15, "to": 17}, {"id": 14, "from": 16, "to": 20}, {"id": 15, "from": 20, "to": 21}, {"id": 16, "from": 17, "to": 18}, {"id": 17, "from": 18, "to": 19}, {"id": 18, "from": 5, "to": 2}, {"id": 19, "from": 2, "to": 1}, {"id": 20, "from": 1, "to": 1}, {"id": 21, "from": 3, "to": 1}, {"id": 22, "from": 3, "to": 4}], "templateName": "HandPose", "templateId": -1}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "template", "pointLabels": {"0": "Nose"}, "trackingId": "2fe1f0c6c4af879955d6f19cfcf113a6b929b73", "groupId": 0, "points": [{"id": 1, "x": 388.9594774956746, "y": 424.3453820508397}, {"id": 2, "x": 383.78257983006284, "y": 420.2971520947363}, {"id": 3, "x": 387.1454388819895, "y": 419.5367736816406}, {"id": 4, "x": 382.7214935156717, "y": 418.8373022022362}, {"id": 5, "x": 369.81775320578504, "y": 421.3423522218259}, {"id": 6, "x": 368.5353785473912, "y": 441.4006845318153}, {"id": 7, "x": 353.1593986570741, "y": 443.28386811581913}, {"id": 8, "x": 340.9145244608405, "y": 484.88446599233174}, {"id": 9, "x": 337.471170384727, "y": 516.0647184634637}, {"id": 10, "x": 380.0734310110131, "y": 441.19236910700084}, {"id": 11, "x": 392.6590966976267, "y": 481.59771320396317}, {"id": 12, "x": 411.22125244140625, "y": 510.38843315566135}, {"id": 13, "x": 368.27931488725477, "y": 514.5319460566172}, {"id": 14, "x": 361.465192188568, "y": 515.6977785761485}, {"id": 15, "x": 378.7043428557912, "y": 512.1187075312266}, {"id": 16, "x": 393.26020935016874, "y": 556.5333687483432}, {"id": 17, "x": 344.09536524138383, "y": 562.7657295881869}, {"id": 18, "x": 321.86363692684523, "y": 598.4685463667392}, {"id": 19, "x": 345.55514438756916, "y": 610.3072814941406}, {"id": 20, "x": 402.05302902711884, "y": 603.0690004877939}, {"id": 21, "x": 426.8170225465453, "y": 607.0261535644531}], "connections": [{"id": 1, "from": 1, "to": 6}, {"id": 2, "from": 6, "to": 10}, {"id": 3, "from": 10, "to": 11}, {"id": 4, "from": 11, "to": 12}, {"id": 5, "from": 7, "to": 8}, {"id": 6, "from": 8, "to": 9}, {"id": 7, "from": 14, "to": 7}, {"id": 8, "from": 14, "to": 13}, {"id": 9, "from": 13, "to": 15}, {"id": 10, "from": 15, "to": 10}, {"id": 11, "from": 7, "to": 6}, {"id": 12, "from": 14, "to": 16}, {"id": 13, "from": 15, "to": 17}, {"id": 14, "from": 16, "to": 20}, {"id": 15, "from": 20, "to": 21}, {"id": 16, "from": 17, "to": 18}, {"id": 17, "from": 18, "to": 19}, {"id": 18, "from": 5, "to": 2}, {"id": 19, "from": 2, "to": 1}, {"id": 20, "from": 1, "to": 1}, {"id": 21, "from": 3, "to": 1}, {"id": 22, "from": 3, "to": 4}], "templateName": "HandPose", "templateId": -1}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "bf7e1885326a2aac18619c30d310c21e8fb89e93", "groupId": 0, "points": [496.93, 506.95, 500.11, 499.6, 499.38, 494.21, 500.85, 490.53, 502.81, 490.04, 503.79, 488.32, 505.02, 480.97, 507.22, 477.3, 510.16, 466.51, 520.21, 451.32, 522.42, 446.41, 524.38, 435.63, 541.78, 412.84, 543, 408.92, 541.78, 405.73, 541.78, 398.13, 542.51, 394.95, 543.74, 392.74, 546.19, 389.8, 548.4, 388.82, 556.97, 388.82, 563.35, 391.27, 565.06, 393.23, 566.29, 396.42, 567.76, 405.24, 569.23, 409.41, 569.23, 412.59, 568.25, 414.55, 568, 419.45, 565.8, 422.4, 562.37, 423.62, 561.63, 425.09, 561.63, 427.05, 566.04, 429.5, 568, 433.42, 569.72, 445.68, 594.96, 498.62, 594.96, 502.78, 593.98, 505.48, 591.53, 508.18, 589.82, 508.42, 588.35, 505.97, 586.88, 500.58, 585.4, 499.6, 582.46, 499.35, 568.98, 481.71, 571.19, 508.18, 569.96, 510.63, 567.76, 510.87, 572.66, 595.43, 574.87, 597.63, 580.01, 598.61, 586.39, 598.61, 588.84, 599.35, 589.33, 601.31, 587.86, 604.01, 586.88, 604.5, 553.3, 604.99, 551.09, 601.8, 551.09, 592.49, 552.81, 589.55, 548.15, 554.25, 530.51, 572.39, 511.88, 586.85, 509.67, 587.09, 508.69, 593.22, 508.69, 596.9, 509.92, 599.84, 509.67, 601.8, 506.49, 602.04, 502.57, 598.86, 499.87, 594.45, 496.93, 584.64, 492.52, 581.21, 489.58, 576.56, 489.82, 571.41, 491.05, 570.18, 498.15, 569.45, 509.67, 565.04, 525.11, 547.64, 532.22, 546.16, 531.98, 541.26, 537.12, 538.57, 530.51, 510.14, 526.34, 513.32, 522.42, 489.55, 521.19, 477.05, 517.76, 485.38, 515.31, 489.06, 514.57, 493.72, 512.61, 495.68, 511.39, 498.86, 509.43, 506.71, 508.94, 514.55, 505.51, 515.28, 501.83, 514.55, 498.15, 510.87, 497.91, 507.93]}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": true, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {"0": "Left Hand", "21": "Right Hand"}, "trackingId": "932bda5b59db89dd68602306c70d8da62e0afdc", "groupId": 0, "points": [418.36, 510.31, 423.02, 513.25, 429.15, 514.48, 433.07, 513.25, 441.65, 499.04, 448.76, 495.36, 449.74, 490.7, 446.55, 487.52, 444.83, 484.33, 446.06, 471.59, 448.27, 468.89, 453.66, 467.18, 459.29, 468.16, 464.69, 470.61, 465.42, 471.59, 466.16, 483.6, 464.69, 488.25, 464.69, 493.4, 467.87, 497.57, 482.58, 507.37, 486.5, 509.33, 500.96, 509.09, 500.22, 516.93, 499.24, 519.13, 481.11, 520.61, 475.47, 517.42, 472.28, 517.17, 471.55, 518.4, 470.08, 544.62, 470.81, 557.12, 474.49, 576, 473.02, 599.52, 482.09, 602.46, 488.21, 605.65, 488.46, 608.35, 487.97, 609.08, 464.2, 610.06, 463.46, 603.44, 461.74, 600.26, 461.74, 597.56, 463.95, 595.11, 463.22, 591.68, 463.95, 580.9, 452.92, 587.51, 442.87, 590.21, 443.85, 591.93, 443.36, 592.66, 441.89, 591.93, 439.93, 592.42, 439.2, 593.4, 438.95, 597.07, 435.52, 601.48, 434.3, 608.35, 433.07, 609.57, 431.35, 603.44, 429.64, 602.95, 427.92, 584.33, 437.48, 582.61, 456.35, 572.81, 454.88, 567.17, 453.17, 563.74, 453.41, 559.82, 450.96, 556.63, 447.53, 554.43, 445.81, 551.24, 442.14, 550.02, 438.95, 522.81, 423.27, 523.79, 417.63, 521.83, 413.95, 516.93, 413.71, 515.21]}, {"creationType": "Preannotation", "classId": -1, "className": "Human", "visible": false, "locked": false, "probability": 100, "attributes": [], "type": "polygon", "pointLabels": {}, "trackingId": "b4a35bf808984de199195734dfbb73b1cb5c8b5", "groupId": 0, "points": [380.35, 435.63, 378.64, 439.31, 395.79, 464.55, 396.28, 478.03, 394.57, 481.22, 407.56, 499.11, 408.05, 501.07, 410.74, 502.05, 410.99, 504.99, 415.15, 507.93, 415.15, 509.4, 410.25, 513.32, 407.8, 517, 399.22, 516.75, 390.4, 510.87, 389.18, 512.34, 397.51, 539.06, 397.75, 559.89, 400.2, 568.47, 409.76, 593.96, 417.12, 602.78, 422.51, 604.25, 428.63, 603.76, 429.61, 606.21, 428.63, 608.42, 402.65, 614.3, 396.53, 611.85, 395.79, 609.4, 397.51, 602.04, 395.55, 599.35, 394.57, 599.35, 383.29, 574.84, 380.6, 555.97, 369.32, 542, 350.45, 561.61, 334.03, 598.86, 335.01, 600.82, 340.65, 606.21, 343.34, 607.44, 348.49, 607.93, 349.47, 608.66, 349.72, 610.62, 348.25, 612.09, 346.78, 612.58, 319.82, 610.62, 315.89, 608.17, 318.1, 599.84, 319.08, 590.77, 329.13, 566.02, 339.42, 549.11, 342.61, 541.51, 341.38, 529.74, 339.18, 533.91, 333.79, 524.6, 333.3, 521.9, 325.94, 519.45, 339.42, 477.54, 339.18, 467.98, 336.48, 463.82, 359.52, 408.92, 366.38, 404.5, 379.62, 404.5, 380.84, 404.99, 385.5, 411.12, 387.7, 416.27, 387.7, 420.68, 389.42, 424.6, 388.44, 428.03, 386.97, 429.75, 386.23, 434.65]}]} \ No newline at end of file diff --git a/tests/integration/annotations/test_annotation_classes.py b/tests/integration/annotations/test_annotation_classes.py index 41a70f1c5..c0584fa49 100644 --- a/tests/integration/annotations/test_annotation_classes.py +++ b/tests/integration/annotations/test_annotation_classes.py @@ -19,7 +19,7 @@ def test_invalid_json(self): try: sa.create_annotation_classes_from_classes_json(self.PROJECT_NAME, self.classes_path) except Exception as e: - self.assertIn("field required", str(e)) + self.assertIn("Couldn't validate annotation classes", str(e)) def test_annotation_classes(self): annotation_classes = sa.search_annotation_classes(self.PROJECT_NAME) From f2df99e76ff510c2bb2f1e8a059a82c498fe1102 Mon Sep 17 00:00:00 2001 From: Vaghinak Basentsyan Date: Wed, 16 Feb 2022 11:55:31 +0400 Subject: [PATCH 3/7] Fix Annotation class serialization --- src/superannotate/lib/app/interface/sdk_interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/superannotate/lib/app/interface/sdk_interface.py b/src/superannotate/lib/app/interface/sdk_interface.py index 3dac6b260..21d2f64a6 100644 --- a/src/superannotate/lib/app/interface/sdk_interface.py +++ b/src/superannotate/lib/app/interface/sdk_interface.py @@ -1562,6 +1562,7 @@ def create_annotation_class( class_type=type, ) return response.data.dict() + return BaseSerializers(response.data).serialize() @Trackable From bbc4673f136015a9f68e0b2567cd8a740fa9ef9d Mon Sep 17 00:00:00 2001 From: Shabin Dilanchian Date: Wed, 16 Feb 2022 13:01:01 +0400 Subject: [PATCH 4/7] Add logs --- src/superannotate/lib/core/usecases/images.py | 60 +++++++++++------- .../lib/infrastructure/controller.py | 2 +- .../classes/test_create_annotation_class.py | 63 +++++++++++++++++++ 3 files changed, 102 insertions(+), 23 deletions(-) diff --git a/src/superannotate/lib/core/usecases/images.py b/src/superannotate/lib/core/usecases/images.py index aaae48a1f..36b483d79 100644 --- a/src/superannotate/lib/core/usecases/images.py +++ b/src/superannotate/lib/core/usecases/images.py @@ -2710,12 +2710,12 @@ def __init__( self, annotation_classes: BaseManageableRepository, annotation_class: AnnotationClassEntity, - project_name: str, + project: ProjectEntity, ): super().__init__() self._annotation_classes = annotation_classes self._annotation_class = annotation_class - self._project_name = project_name + self._project = project def validate_uniqueness(self): annotation_classes = self._annotation_classes.get_all( @@ -2730,11 +2730,20 @@ def validate_uniqueness(self): ): raise AppValidationException("Annotation class already exits.") + def validate_project_type(self): + if ( + self._project.project_type != ProjectType.VECTOR.value + and self._annotation_class.type == "tag" + ): + raise AppException( + f"Predefined tagging functionality is not supported for projects of type {ProjectType.get_name(self._project.project_type)}." + ) + def execute(self): if self.is_valid(): logger.info( "Creating annotation class in project %s with name %s", - self._project_name, + self._project.name, self._annotation_class.name, ) created = self._annotation_classes.insert(entity=self._annotation_class) @@ -2840,27 +2849,34 @@ def validate_annotation_classes(self): if "attribute_groups" not in self._annotation_classes: raise AppValidationException("Field attribute_groups is required.") + def validate_project_type(self): + if self._project.project_type != ProjectType.VECTOR.value and "tag" in [ + i.type for i in self._annotation_classes + ]: + raise AppException( + f"Predefined tagging functionality is not supported for projects of type {ProjectType.get_name(self._project.project_type)}." + ) + def execute(self): - existing_annotation_classes = self._annotation_classes_repo.get_all() - existing_classes_name = [i.name for i in existing_annotation_classes] - unique_annotation_classes = [] - for annotation_class in self._annotation_classes: - if annotation_class.name in existing_classes_name: - logger.warning( - "Annotation class %s already in project. Skipping.", - annotation_class.name, + if self.is_valid(): + existing_annotation_classes = self._annotation_classes_repo.get_all() + existing_classes_name = [i.name for i in existing_annotation_classes] + unique_annotation_classes = [] + for annotation_class in self._annotation_classes: + if annotation_class.name in existing_classes_name: + logger.warning( + "Annotation class %s already in project. Skipping.", + annotation_class.name, + ) + continue + else: + unique_annotation_classes.append(annotation_class) + created = [] + for i in range(0, len(unique_annotation_classes), self.CHUNK_SIZE): + created += self._annotation_classes_repo.bulk_insert( + entities=unique_annotation_classes[i : i + self.CHUNK_SIZE], ) - continue - else: - unique_annotation_classes.append(annotation_class) - - created = [] - - for i in range(0, len(unique_annotation_classes), self.CHUNK_SIZE): - created += self._annotation_classes_repo.bulk_insert( - entities=unique_annotation_classes[i : i + self.CHUNK_SIZE], - ) - self._response.data = created + self._response.data = created return self._response diff --git a/src/superannotate/lib/infrastructure/controller.py b/src/superannotate/lib/infrastructure/controller.py index 8569bd50c..fc30a8748 100644 --- a/src/superannotate/lib/infrastructure/controller.py +++ b/src/superannotate/lib/infrastructure/controller.py @@ -1142,7 +1142,7 @@ def create_annotation_class( use_case = usecases.CreateAnnotationClassUseCase( annotation_classes=annotation_classes, annotation_class=annotation_class, - project_name=project_name, + project=project, ) use_case.execute() return use_case.execute() diff --git a/tests/integration/classes/test_create_annotation_class.py b/tests/integration/classes/test_create_annotation_class.py index 4cfc82319..b11dc3b83 100644 --- a/tests/integration/classes/test_create_annotation_class.py +++ b/tests/integration/classes/test_create_annotation_class.py @@ -15,3 +15,66 @@ def test_create_annotation_class(self): sa.create_annotation_class(self.PROJECT_NAME, "test_add", "#FF0000", type="tag") classes = sa.search_annotation_classes(self.PROJECT_NAME) self.assertEqual(classes[0]["type"], "tag") + + +class TestCreateAnnotationClassNonVectorWithError(BaseTestCase): + PROJECT_NAME = "test_create_annotation_class" + PROJECT_TYPE = "Video" + PROJECT_DESCRIPTION = "Example Project test pixel basic images" + + def test_create_annotation_class(self): + msg = "" + try: + sa.create_annotation_class(self.PROJECT_NAME, "test_add", "#FF0000", type="tag") + except Exception as e: + msg = str(e) + self.assertEqual(msg, "Predefined tagging functionality is not supported for projects of type Video.") + + +class TestCreateAnnotationClassesNonVectorWithError(BaseTestCase): + PROJECT_NAME = "test_create_annotation_class" + PROJECT_TYPE = "Video" + PROJECT_DESCRIPTION = "Example Project test pixel basic images" + + def test_create_annotation_class(self): + with tempfile.TemporaryDirectory() as tmpdir_name: + temp_path = f"{tmpdir_name}/new_classes.json" + with open(temp_path, + "w") as new_classes: + new_classes.write( + ''' + [ + { + "id":56820, + "project_id":7617, + "name":"Personal vehicle", + "color":"#547497", + "count":18, + "createdAt":"2020-09-29T10:39:39.000Z", + "updatedAt":"2020-09-29T10:48:18.000Z", + "type": "tag", + "attribute_groups":[ + { + "id":21448, + "class_id":56820, + "name":"Large", + "is_multiselect":0, + "createdAt":"2020-09-29T10:39:39.000Z", + "updatedAt":"2020-09-29T10:39:39.000Z", + "attributes":[] + } + ] + } + ] + + ''' + ) + msg = "" + try: + sa.create_annotation_classes_from_classes_json( + self.PROJECT_NAME, temp_path + ) + except Exception as e: + msg = str(e) + self.assertEqual(msg, "Predefined tagging functionality is not supported for projects of type Video.") + From 18e393e44e731926604a91cbfdd7c185093e8ceb Mon Sep 17 00:00:00 2001 From: Vaghinak Basentsyan Date: Wed, 16 Feb 2022 14:52:56 +0400 Subject: [PATCH 5/7] Adjust convertor and tessts --- src/superannotate/__init__.py | 2 + .../lib/app/interface/sdk_interface.py | 1 - .../lib/core/usecases/annotations.py | 7 +++- src/superannotate/lib/core/usecases/images.py | 2 +- src/superannotate/lib/core/video_convertor.py | 2 +- .../lib/infrastructure/controller.py | 5 ++- .../lib/infrastructure/services.py | 16 +++++--- .../lib/infrastructure/stream_data_handler.py | 11 ++++-- .../test_get_annotations_per_frame.py | 39 +++++++++++++++++-- 9 files changed, 65 insertions(+), 20 deletions(-) diff --git a/src/superannotate/__init__.py b/src/superannotate/__init__.py index 7f3ef5d76..afb4e8cc5 100644 --- a/src/superannotate/__init__.py +++ b/src/superannotate/__init__.py @@ -51,6 +51,7 @@ from superannotate.lib.app.interface.sdk_interface import download_image_annotations from superannotate.lib.app.interface.sdk_interface import download_model from superannotate.lib.app.interface.sdk_interface import get_annotations +from superannotate.lib.app.interface.sdk_interface import get_annotations_per_frame from superannotate.lib.app.interface.sdk_interface import get_exports from superannotate.lib.app.interface.sdk_interface import get_folder_metadata from superannotate.lib.app.interface.sdk_interface import get_image_annotations @@ -130,6 +131,7 @@ "get_exports", # annotations "get_annotations", + "get_annotations_per_frame", # converters "convert_json_version", "import_annotation", diff --git a/src/superannotate/lib/app/interface/sdk_interface.py b/src/superannotate/lib/app/interface/sdk_interface.py index 21d2f64a6..fd1927f5c 100644 --- a/src/superannotate/lib/app/interface/sdk_interface.py +++ b/src/superannotate/lib/app/interface/sdk_interface.py @@ -1561,7 +1561,6 @@ def create_annotation_class( attribute_groups=attribute_groups, class_type=type, ) - return response.data.dict() return BaseSerializers(response.data).serialize() diff --git a/src/superannotate/lib/core/usecases/annotations.py b/src/superannotate/lib/core/usecases/annotations.py index 52c70b5ac..8fc839fc4 100644 --- a/src/superannotate/lib/core/usecases/annotations.py +++ b/src/superannotate/lib/core/usecases/annotations.py @@ -554,6 +554,9 @@ def execute(self): return self._response if not response.data: self._response.errors = AppException(f"Video {self._video_name} not found.") - - self._response.data = VideoFrameGenerator(response.data[1], fps=self._fps) + annotations = response.data + if annotations: + self._response.data = list(VideoFrameGenerator(response.data[0], fps=self._fps)) + else: + self._response.data = [] return self._response diff --git a/src/superannotate/lib/core/usecases/images.py b/src/superannotate/lib/core/usecases/images.py index aaae48a1f..63a79b6a4 100644 --- a/src/superannotate/lib/core/usecases/images.py +++ b/src/superannotate/lib/core/usecases/images.py @@ -2813,7 +2813,7 @@ def execute(self): str(self._download_path), ) classes = self._annotation_classes_repo.get_all() - classes = [entity.dict() for entity in classes] + classes = [entity.dict(by_alias=True) for entity in classes] json_path = f"{self._download_path}/classes.json" json.dump(classes, open(json_path, "w"), indent=4) self._response.data = json_path diff --git a/src/superannotate/lib/core/video_convertor.py b/src/superannotate/lib/core/video_convertor.py index c065719d6..27203d42c 100644 --- a/src/superannotate/lib/core/video_convertor.py +++ b/src/superannotate/lib/core/video_convertor.py @@ -141,5 +141,5 @@ def _process(self): ) def __iter__(self): - for frame_no in range(1, int(self._frames_count)): + for frame_no in range(1, int(self._frames_count) + 1): yield self.get_frame(frame_no).dict() diff --git a/src/superannotate/lib/infrastructure/controller.py b/src/superannotate/lib/infrastructure/controller.py index 8569bd50c..d320174a4 100644 --- a/src/superannotate/lib/infrastructure/controller.py +++ b/src/superannotate/lib/infrastructure/controller.py @@ -55,8 +55,8 @@ def __init__(self, config_path: str = None, token: str = None): self._user_id = None self._team_name = None self._reporter = None - self._ssl_verify = not (os.environ.get("SA_TESTING", "False").lower() == "false") - + self._testing = os.getenv("SA_TESTING", 'False').lower() in ('true', '1', 't') + self._ssl_verify = not self._testing self._backend_url = os.environ.get("SA_URL", constances.BACKEND_URL) if token: @@ -114,6 +114,7 @@ def initialize_backend_client(self): auth_token=self._token, logger=self._logger, verify_ssl=self._ssl_verify, + testing=self._testing ) self._backend_client.get_session.cache_clear() return self._backend_client diff --git a/src/superannotate/lib/infrastructure/services.py b/src/superannotate/lib/infrastructure/services.py index 5f7fc337f..7339d9434 100644 --- a/src/superannotate/lib/infrastructure/services.py +++ b/src/superannotate/lib/infrastructure/services.py @@ -43,16 +43,23 @@ class BaseBackendService(SuerannotateServiceProvider): """ def __init__( - self, api_url: str, auth_token: str, logger, paginate_by=None, verify_ssl=False + self, api_url: str, auth_token: str, logger, paginate_by=None, verify_ssl=False, testing: bool = False ): self.api_url = api_url self._auth_token = auth_token self.logger = logger self._paginate_by = paginate_by - self._verify_ssl = False # TODO fix False + self._verify_ssl = verify_ssl self.team_id = auth_token.split("=")[-1] + self._testing = testing self.get_session() + @property + def assets_provider_url(self): + if self._testing: + return "https://assets-provider.devsuperannotate.com/api/v1/" + return "https://assets-provider.superannotate.com/api/v1/" + @timed_lru_cache(seconds=360) def get_session(self): session = requests.Session() @@ -166,7 +173,6 @@ class SuperannotateBackendService(BaseBackendService): Manage projects, images and team in the Superannotate """ DEFAULT_CHUNK_SIZE = 1000 - STREAMED_DATA_PROVIDER_URL = "https://assets-provider.devsuperannotate.com" URL_USERS = "users" URL_LIST_PROJECTS = "projects" @@ -215,7 +221,7 @@ class SuperannotateBackendService(BaseBackendService): URL_DELETE_ANNOTATIONS = "annotations/remove" URL_DELETE_ANNOTATIONS_PROGRESS = "annotations/getRemoveStatus" URL_GET_LIMITS = "project/{}/limitationDetails" - URL_GET_ANNOTATIONS = "api/v1/images/annotations/stream" + URL_GET_ANNOTATIONS = "images/annotations/stream" def get_project(self, uuid: int, team_id: int): get_project_url = urljoin(self.api_url, self.URL_GET_PROJECT.format(uuid)) @@ -1011,7 +1017,7 @@ def get_limitations( ) def get_annotations(self, project_id: int, team_id: int, folder_id: int, items: List[str]) -> List[dict]: - get_limits_url = urljoin(self.STREAMED_DATA_PROVIDER_URL, self.URL_GET_ANNOTATIONS) + get_limits_url = urljoin(self.assets_provider_url, self.URL_GET_ANNOTATIONS) query_params = { "team_id": team_id, "project_id": project_id, diff --git a/src/superannotate/lib/infrastructure/stream_data_handler.py b/src/superannotate/lib/infrastructure/stream_data_handler.py index 4bb801e6f..a701900aa 100644 --- a/src/superannotate/lib/infrastructure/stream_data_handler.py +++ b/src/superannotate/lib/infrastructure/stream_data_handler.py @@ -13,18 +13,22 @@ def map_image_names_to_fetch_streamed_data(data: List[str]): class StreamedAnnotations: - DELIMITER = b";)" + DELIMITER = b';)' def __init__(self, headers: dict): self._headers = headers self._annotations = [] - async def fetch(self, method: str, session: aiohttp.ClientSession, url: str, data: dict = None, params: dict = None): + async def fetch(self, method: str, session: aiohttp.ClientSession, url: str, data: dict = None, + params: dict = None): response = await session._request(method, url, json=data, params=params) buffer = b"" async for line in response.content: slices = line.split(self.DELIMITER) - if slices[0]: + if len(slices) == 1: + buffer += slices[0] + continue + elif slices[0]: self._annotations.append(json.loads(buffer + slices[0])) for data in slices[1:-1]: self._annotations.append(json.loads(data)) @@ -43,7 +47,6 @@ async def get_data( map_function: Callable = lambda x: x, verify_ssl: bool = False, ): - async with aiohttp.ClientSession(raise_for_status=True, headers=self._headers, connector=aiohttp.TCPConnector(ssl=verify_ssl)) as session: diff --git a/tests/integration/annotations/test_get_annotations_per_frame.py b/tests/integration/annotations/test_get_annotations_per_frame.py index 479ef0ba2..45eb0556c 100644 --- a/tests/integration/annotations/test_get_annotations_per_frame.py +++ b/tests/integration/annotations/test_get_annotations_per_frame.py @@ -1,21 +1,52 @@ +import json import os from os.path import dirname +from pathlib import Path + +import src.superannotate as sa from tests.integration.base import BaseTestCase class TestGetAnnotations(BaseTestCase): PROJECT_NAME = "test attach video urls" - PATH_TO_URLS = "data_set/attach_urls.csv" + PATH_TO_URLS = "data_set/attach_video_for_annotation.csv" PATH_TO_URLS_WITHOUT_NAMES = "data_set/attach_urls_with_no_name.csv" PATH_TO_50K_URLS = "data_set/501_urls.csv" PROJECT_DESCRIPTION = "desc" + ANNOTATIONS_PATH = "data_set/video_annotation" + VIDEO_NAME = "video.mp4" + CLASSES_PATH = "data_set/video_annotation/classes/classes.json" PROJECT_TYPE = "Video" @property def csv_path(self): - return os.path.join(dirname(dirname(__file__)), self.PATH_TO_URLS) + return os.path.join(dirname(dirname(dirname(__file__))), self.PATH_TO_URLS) + + @property + def classes_path(self): + return os.path.join(self.folder_path, self.CLASSES_PATH) @property - def csv_path_without_name_column(self): - return os.path.join(dirname(dirname(__file__)), self.PATH_TO_URLS_WITHOUT_NAMES) + def folder_path(self): + return Path(__file__).parent.parent.parent + + @property + def annotations_path(self): + return os.path.join(self.folder_path, self.ANNOTATIONS_PATH) + + def test_video_annotation_upload(self): + sa.create_annotation_classes_from_classes_json(self.PROJECT_NAME, self.classes_path) + _, _, _ = sa.attach_video_urls_to_project( + self.PROJECT_NAME, + self.csv_path, + ) + sa.upload_annotations_from_folder_to_project(self.PROJECT_NAME, self.annotations_path) + annotations = sa.get_annotations_per_frame(self.PROJECT_NAME, self.VIDEO_NAME, 1) + self.assertEqual( + len(annotations), + int( + json.load(open(f"{self.annotations_path}/{self.VIDEO_NAME}.json"))["metadata"]["duration"] / ( + 1000 * 1000) + ) + ) From 762db47dfe5aa15fc1ad784cdc6eee20c858ab08 Mon Sep 17 00:00:00 2001 From: Vaghinak Basentsyan Date: Wed, 16 Feb 2022 15:12:45 +0400 Subject: [PATCH 6/7] Deleted filering in the tags preprocessing --- src/superannotate/lib/core/data_handlers.py | 53 +++------ src/superannotate/lib/core/usecases/images.py | 4 - .../sample_project_pixel/classes/classes.json | 111 +++++++++++++++++- 3 files changed, 129 insertions(+), 39 deletions(-) diff --git a/src/superannotate/lib/core/data_handlers.py b/src/superannotate/lib/core/data_handlers.py index a25b0dbc7..e0946933d 100644 --- a/src/superannotate/lib/core/data_handlers.py +++ b/src/superannotate/lib/core/data_handlers.py @@ -8,13 +8,14 @@ from typing import Dict from typing import List -import lib.core as constances -from lib.core.enums import ClassTypeEnum -from lib.core.reporter import Reporter from superannotate_schemas.schemas.classes import AnnotationClass from superannotate_schemas.schemas.classes import Attribute from superannotate_schemas.schemas.classes import AttributeGroup +import lib.core as constances +from lib.core.enums import ClassTypeEnum +from lib.core.reporter import Reporter + class BaseDataHandler(metaclass=ABCMeta): @abstractmethod @@ -40,17 +41,15 @@ def __init__(self, annotation_classes: List[AnnotationClass]): @lru_cache() def get_annotation_class( - self, name: str, class_type: ClassTypeEnum + self, name: str ) -> AnnotationClass: for annotation_class in self._annotation_classes: - if annotation_class.name == name and class_type.equals( - annotation_class.type - ): + if annotation_class.name == name: return annotation_class @lru_cache() def get_attribute_group( - self, annotation_class: AnnotationClass, attr_group_name: str + self, annotation_class: AnnotationClass, attr_group_name: str ) -> AttributeGroup: for attr_group in annotation_class.attribute_groups: if attr_group.name == attr_group_name: @@ -108,9 +107,7 @@ class DocumentTagHandler(BaseAnnotationDateHandler): def handle(self, annotation: dict): new_tags = [] for tag in annotation["tags"]: - annotation_class = self.get_annotation_class( - tag, class_type=ClassTypeEnum.OBJECT - ) + annotation_class = self.get_annotation_class(tag) if annotation_class: new_tags.append(annotation_class.id) annotation["tags"] = new_tags @@ -119,10 +116,10 @@ def handle(self, annotation: dict): class MissingIDsHandler(BaseAnnotationDateHandler): def __init__( - self, - annotation_classes: List[AnnotationClass], - templates: List[dict], - reporter: Reporter, + self, + annotation_classes: List[AnnotationClass], + templates: List[dict], + reporter: Reporter, ): super().__init__(annotation_classes) self.validate_existing_classes(annotation_classes) @@ -175,9 +172,7 @@ def handle(self, annotation: dict): annotation_instance["classId"] = -1 else: class_name = annotation_instance["className"] - annotation_type = annotation_instance.get("type", ClassTypeEnum.OBJECT) - class_type = self._get_class_type(annotation_type) - annotation_class = self.get_annotation_class(class_name, class_type) + annotation_class = self.get_annotation_class(class_name) if not annotation_class: self.reporter.log_warning(f"Couldn't find class {class_name}") self.reporter.store_message("missing_classes", class_name) @@ -199,7 +194,7 @@ def handle(self, annotation: dict): template["name"]: template["id"] for template in self._templates } for annotation_instance in ( - i for i in annotation["instances"] if i.get("type", None) == "template" + i for i in annotation["instances"] if i.get("type", None) == "template" ): annotation_instance["templateId"] = template_name_id_map.get( annotation_instance.get("templateName", ""), -1 @@ -209,13 +204,7 @@ def handle(self, annotation: dict): i for i in annotation["instances"] if "className" in i and i["classId"] > 0 ]: annotation_class_name = annotation_instance["className"] - annotation_class_type = self._get_class_type( - annotation_instance.get("type", ClassTypeEnum.OBJECT) - ) - - annotation_class = self.get_annotation_class( - annotation_class_name, annotation_class_type - ) + annotation_class = self.get_annotation_class(annotation_class_name) if not annotation_class: self.reporter.log_warning( f"Couldn't find annotation class {annotation_class_name}" @@ -291,9 +280,7 @@ def convert_timestamp(timestamp): "locked": False, } if class_name: - annotation_class = self.get_annotation_class( - class_name, ClassTypeEnum.OBJECT - ) + annotation_class = self.get_annotation_class(class_name) if annotation_class: editor_instance["classId"] = annotation_class.id else: @@ -328,9 +315,7 @@ def convert_timestamp(timestamp): ] = timestamp_data["points"] if not class_name: continue - annotation_class = self.get_annotation_class( - class_name, ClassTypeEnum.OBJECT - ) + annotation_class = self.get_annotation_class(class_name) if not annotation_class: self.reporter.store_message( "missing_classes", meta["className"] @@ -365,10 +350,10 @@ def convert_timestamp(timestamp): (group_name, attr_name) ) attributes_to_add = ( - existing_attributes_in_current_instance - active_attributes + existing_attributes_in_current_instance - active_attributes ) attributes_to_delete = ( - active_attributes - existing_attributes_in_current_instance + active_attributes - existing_attributes_in_current_instance ) if attributes_to_add or attributes_to_delete: editor_instance["timeline"][timestamp][ diff --git a/src/superannotate/lib/core/usecases/images.py b/src/superannotate/lib/core/usecases/images.py index 394dc6b26..e0094ce88 100644 --- a/src/superannotate/lib/core/usecases/images.py +++ b/src/superannotate/lib/core/usecases/images.py @@ -2845,10 +2845,6 @@ def __init__( self._annotation_classes = annotation_classes self._project = project - def validate_annotation_classes(self): - if "attribute_groups" not in self._annotation_classes: - raise AppValidationException("Field attribute_groups is required.") - def validate_project_type(self): if self._project.project_type != ProjectType.VECTOR.value and "tag" in [ i.type for i in self._annotation_classes diff --git a/tests/data_set/sample_project_pixel/classes/classes.json b/tests/data_set/sample_project_pixel/classes/classes.json index f3d49a051..4a89b47a6 100644 --- a/tests/data_set/sample_project_pixel/classes/classes.json +++ b/tests/data_set/sample_project_pixel/classes/classes.json @@ -1 +1,110 @@ -[{"id":56820,"project_id":7617,"name":"Personal vehicle","color":"#547497","count":18,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:48:18.000Z","attribute_groups":[{"id":21448,"class_id":56820,"name":"Large","is_multiselect":0,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:39:39.000Z","attributes":[{"id":57096,"group_id":21448,"project_id":7617,"name":"no","count":0,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:39:39.000Z"},{"id":57097,"group_id":21448,"project_id":7617,"name":"yes","count":1,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:48:18.000Z"}]}]},{"id":56821,"project_id":7617,"name":"Large vehicle","color":"#2ba36d","count":1,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:48:18.000Z","attribute_groups":[{"id":21449,"class_id":56821,"name":"small","is_multiselect":0,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:39:39.000Z","attributes":[{"id":57098,"group_id":21449,"project_id":7617,"name":"yes","count":0,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:39:39.000Z"},{"id":57099,"group_id":21449,"project_id":7617,"name":"no","count":1,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:48:18.000Z"}]}]},{"id":56822,"project_id":7617,"name":"Pedestrian","color":"#d4da03","count":3,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:48:18.000Z","attribute_groups":[]},{"id":56823,"project_id":7617,"name":"Two wheeled vehicle","color":"#f11aec","count":1,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:48:18.000Z","attribute_groups":[]},{"id":56824,"project_id":7617,"name":"Traffic sign","color":"#d8a7fd","count":9,"createdAt":"2020-09-29T10:39:39.000Z","updatedAt":"2020-09-29T10:48:18.000Z","attribute_groups":[]}] +[ + { + "id": 56820, + "project_id": 7617, + "name": "Personal vehicle", + "color": "#547497", + "count": 18, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:48:18.000Z", + "attribute_groups": [ + { + "id": 21448, + "class_id": 56820, + "name": "Large", + "is_multiselect": 0, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:39:39.000Z", + "attributes": [ + { + "id": 57096, + "group_id": 21448, + "project_id": 7617, + "name": "no", + "count": 0, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:39:39.000Z" + }, + { + "id": 57097, + "group_id": 21448, + "project_id": 7617, + "name": "yes", + "count": 1, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:48:18.000Z" + } + ] + } + ] + }, + { + "id": 56821, + "project_id": 7617, + "name": "Large vehicle", + "color": "#2ba36d", + "count": 1, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:48:18.000Z", + "attribute_groups": [ + { + "id": 21449, + "class_id": 56821, + "name": "small", + "is_multiselect": 0, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:39:39.000Z", + "attributes": [ + { + "id": 57098, + "group_id": 21449, + "project_id": 7617, + "name": "yes", + "count": 0, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:39:39.000Z" + }, + { + "id": 57099, + "group_id": 21449, + "project_id": 7617, + "name": "no", + "count": 1, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:48:18.000Z" + } + ] + } + ] + }, + { + "id": 56822, + "project_id": 7617, + "name": "Pedestrian", + "color": "#d4da03", + "count": 3, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:48:18.000Z", + "attribute_groups": [] + }, + { + "id": 56823, + "project_id": 7617, + "name": "Two wheeled vehicle", + "color": "#f11aec", + "count": 1, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:48:18.000Z", + "attribute_groups": [] + }, + { + "id": 56824, + "project_id": 7617, + "name": "Traffic sign", + "color": "#d8a7fd", + "count": 9, + "createdAt": "2020-09-29T10:39:39.000Z", + "updatedAt": "2020-09-29T10:48:18.000Z", + "attribute_groups": [] + } +] From 356ded9f5415f6c25370b69235c4ecac531807c3 Mon Sep 17 00:00:00 2001 From: Vaghinak Basentsyan Date: Wed, 16 Feb 2022 17:50:38 +0400 Subject: [PATCH 7/7] Changed stremed data handler DELIMITER --- src/superannotate/lib/core/data_handlers.py | 1 + src/superannotate/lib/infrastructure/stream_data_handler.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/superannotate/lib/core/data_handlers.py b/src/superannotate/lib/core/data_handlers.py index e0946933d..a13d1edbd 100644 --- a/src/superannotate/lib/core/data_handlers.py +++ b/src/superannotate/lib/core/data_handlers.py @@ -205,6 +205,7 @@ def handle(self, annotation: dict): ]: annotation_class_name = annotation_instance["className"] annotation_class = self.get_annotation_class(annotation_class_name) + if not annotation_class: self.reporter.log_warning( f"Couldn't find annotation class {annotation_class_name}" diff --git a/src/superannotate/lib/infrastructure/stream_data_handler.py b/src/superannotate/lib/infrastructure/stream_data_handler.py index a701900aa..b73461507 100644 --- a/src/superannotate/lib/infrastructure/stream_data_handler.py +++ b/src/superannotate/lib/infrastructure/stream_data_handler.py @@ -13,7 +13,7 @@ def map_image_names_to_fetch_streamed_data(data: List[str]): class StreamedAnnotations: - DELIMITER = b';)' + DELIMITER = b'\n:)\n' def __init__(self, headers: dict): self._headers = headers