From 6eebb8aa333ad75fcb9fc227641d6dcda26f59b9 Mon Sep 17 00:00:00 2001 From: Yash Raj Suman Date: Sun, 14 Sep 2025 19:43:58 +0530 Subject: [PATCH 1/6] Add tests/integration folder test: Add integration tests for Labellerr SDK This commit introduces integration tests for core SDK functionalities: Features tested: - Project creation with multiple annotation types: * Polygon annotations * Bounding box detection * Classification (select, dropdown, radio) * Text input fields * Combined annotation types - Project export functionality - Pre-annotation upload support (COCO JSON format) Test structure: /tests /integration - Create_Project.py # Project creation test cases - Export_project.py # Export functionality tests - Pre_annotation.py # Pre-annotation upload tests - main.py # Test runner - cred.py # Credentials config (gitignored) Requirements: - Valid API credentials in cred.py - Test image dataset in test_img/ - Sample annotations in annotations.json Note: Remember to update cred.py with valid credentials before running tests --- tests/integration/Create_Project.py | 567 ++++++++++++++++++ tests/integration/Export_project.py | 30 + tests/integration/Pre_annotation_uploading.py | 26 + .../Create_Project.cpython-310.pyc | Bin 0 -> 7643 bytes .../Create_Project.cpython-311.pyc | Bin 0 -> 14918 bytes .../Create_Project.cpython-312.pyc | Bin 0 -> 12836 bytes .../__pycache__/cred.cpython-310.pyc | Bin 0 -> 383 bytes tests/integration/cred.py | 6 + tests/integration/main.py | 64 ++ 9 files changed, 693 insertions(+) create mode 100644 tests/integration/Create_Project.py create mode 100644 tests/integration/Export_project.py create mode 100644 tests/integration/Pre_annotation_uploading.py create mode 100644 tests/integration/__pycache__/Create_Project.cpython-310.pyc create mode 100644 tests/integration/__pycache__/Create_Project.cpython-311.pyc create mode 100644 tests/integration/__pycache__/Create_Project.cpython-312.pyc create mode 100644 tests/integration/__pycache__/cred.cpython-310.pyc create mode 100644 tests/integration/cred.py create mode 100644 tests/integration/main.py diff --git a/tests/integration/Create_Project.py b/tests/integration/Create_Project.py new file mode 100644 index 0000000..8a797e2 --- /dev/null +++ b/tests/integration/Create_Project.py @@ -0,0 +1,567 @@ +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'SDKPython'))) + +# Add the root directory to Python path +root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) +sys.path.append(root_dir) + +from SDKPython.labellerr.client import LabellerrClient +from SDKPython.labellerr.exceptions import LabellerrError +import uuid + +def create_project_all_option_type(api_key, api_secret, client_id, email, path_to_images): + """Creates a project with all option types using the Labellerr SDK.""" + + client = LabellerrClient(api_key, api_secret) + project_payload = { + 'client_id': client_id, + 'dataset_name': 'Testing_dataset', + 'dataset_description': 'A sample dataset for image classification', + 'data_type': 'image', + 'created_by': email, + 'project_name': 'Testing_project-7', + 'annotation_guide': [ + { + "question_number": 1, # incremental series starting from 1 + "question": "Test", # question name + "question_id": "533bb0c8-fb2b-4394-a8e1-5042a944802f", # random uuid + "option_type": "polygon", + "required": True, + "options": [ + {"option_name": "#fe1236"}, # give the hex code of some random color + ] + }, + { + "question_number": 2, # Pixel annotation for bounding box format + "question": "Test2", + "question_id": "533bb0c8-fb2b-4394-a8e1-5042a944808d", + "option_type": "BoundingBox", + "required": True, + "options": [ + {"option_name": "#afe126"} + ] + }, + { + "question_number": 3, # Classification question for simple input field + "question": "Test-Input", + "option_type": "input", + "question_id": "81bc5c1a-5b95-4df2-8085-aca8d66a93ad", + "required": True, + "options": [] # this will be empty array only + }, + { + "question_number": 4, # Classification question for multi-select dropdown + "question": "Multi-Test", + "option_type": "select", + "question_id": "971c5c1a-5b95-4df2-8085-aca8d66a0351", + "required": True, + "options": [ + { + "option_id": "22b7942f-06ef-4293-9d73-d117eda8ec0d", + "option_name": "A" + }, + { + "option_id": "15e0e903-ed8f-43ff-a841-a0638ff08153", + "option_name": "B" + }, + { + "option_id": "c2e37dad-5034-4bed-920b-5fc14c4032e0", + "option_name": "C" + } + ] + }, + { + "question_number": 5, # Classification question for single-select dropdown + "question": "Test-Dropdown", + "option_type": "dropdown", + "question_id": "456c5c1a-5b95-4df2-8085-aca8d66a03049", + "required": True, + "options": [ + { + "option_id": "58k142f-06ef-4293-9d73-d117eda87254", + "option_name": "Sample A" + }, + { + "option_id": "43t56903-ed8f-43ff-a841-a0638ff08856", + "option_name": "Sample B" + } + ] + }, + { + "question_number": 6, # Classification question for radio + "question": "Radio test", + "option_type": "radio", + "question_id": "712v5c1a-5b95-4df2-8085-aca8d66a01048", + "required": True, + "options": [ + { + "option_id": "916v24h-06ef-4293-9d73-d117eda81112", + "option_name": "1" + }, + { + "option_id": "12ak879-ed8f-43ff-a841-a0638ff23115", + "option_name": "2" + } + ] + } + ], + 'rotation_config': { + 'annotation_rotation_count': 1, + 'review_rotation_count': 1, + 'client_review_rotation_count': 1 + }, + 'autolabel': False, + 'folder_to_upload': path_to_images + } + try: + result = client.initiate_create_project(project_payload) + print(f"[ALL OPTION TYPE] Project ID: {result['project_id']['response']['project_id']}") + except LabellerrError as e: + + print(f"Project creation failed: {str(e)}") + + +def create_project_polygon_boundingbox_project(api_key, api_secret, client_id, email, path_to_images): + + client = LabellerrClient(api_key, api_secret) + + project_payload = { + 'client_id': client_id, + 'dataset_name': 'Testing_dataset', + 'dataset_description': 'Dataset for object detection with polygon and bounding box annotations', + 'data_type': 'image', + 'created_by': email, + 'project_name': 'polygon_boundingbox_project', + 'annotation_guide': [ + { + "question_number": 1, + "question": "Vehicle Detection", + "question_id": str(uuid.uuid4()), + "option_type": "polygon", + "required": True, + "options": [ + {"option_name": "#ff6b35"} # Orange for vehicles + ] + }, + { + "question_number": 2, + "question": "Person Detection", + "question_id": str(uuid.uuid4()), + "option_type": "BoundingBox", + "required": True, + "options": [ + {"option_name": "#4ecdc4"} # Teal for persons + ] + } + ], + 'rotation_config': { + 'annotation_rotation_count': 1, + 'review_rotation_count': 1, + 'client_review_rotation_count': 1 + }, + 'autolabel': False, + 'folder_to_upload': path_to_images + } + + try: + result = client.initiate_create_project(project_payload) + print(f"[polygon_boundingbox] Project ID: {result['project_id']['response']['project_id']}") + except LabellerrError as e: + print(f"Project creation failed: {str(e)}") + +def create_project_select_dropdown_radio(api_key, api_secret, client_id, email, path_to_images): + + client = LabellerrClient(api_key, api_secret) + + project_payload = { + 'client_id': client_id, + 'dataset_name': 'Testing_dataset', + 'dataset_description': 'Dataset for multi-label image classification', + 'data_type': 'image', + 'created_by': email, + 'project_name': 'select_dropdown_radio_project', + 'annotation_guide': [ + { + "question_number": 1, + "question": "Object Categories", + "option_type": "select", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [ + { + "option_id": str(uuid.uuid4()), + "option_name": "Animals" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Vehicles" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Buildings" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Nature" + } + ] + }, + { + "question_number": 2, + "question": "Image Quality", + "option_type": "dropdown", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [ + { + "option_id": str(uuid.uuid4()), + "option_name": "High Quality" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Medium Quality" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Low Quality" + } + ] + }, + { + "question_number": 3, + "question": "Lighting Condition", + "option_type": "radio", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [ + { + "option_id": str(uuid.uuid4()), + "option_name": "Bright" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Dim" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Dark" + } + ] + } + ], + 'rotation_config': { + 'annotation_rotation_count': 1, + 'review_rotation_count': 1, + 'client_review_rotation_count': 1 + }, + 'autolabel': False, + 'folder_to_upload': path_to_images + } + + try: + result = client.initiate_create_project(project_payload) + print(f"[select_dropdown_radio] Project ID: {result['project_id']['response']['project_id']}") + except LabellerrError as e: + print(f"Project creation failed: {str(e)}") + +def create_project_polygon_input(api_key, api_secret, client_id, email, path_to_images): + + client = LabellerrClient(api_key, api_secret) + + project_payload = { + 'client_id': client_id, + 'dataset_name': 'Testing_dataset', + 'dataset_description': 'Medical images with detailed annotations and metadata', + 'data_type': 'image', + 'created_by': email, + 'project_name': 'polygon_input_project', + 'annotation_guide': [ + { + "question_number": 1, + "question": "Anomaly Region", + "question_id": str(uuid.uuid4()), + "option_type": "polygon", + "required": True, + "options": [ + {"option_name": "#ff4757"} # Red for anomalies + ] + }, + { + "question_number": 2, + "question": "Anomaly Description", + "question": "Describe the anomaly", + "option_type": "input", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [] + }, + { + "question_number": 3, + "question": "Additional Notes", + "option_type": "input", + "question_id": str(uuid.uuid4()), + "required": False, + "options": [] + } + ], + 'rotation_config': { + 'annotation_rotation_count': 1, + 'review_rotation_count': 1, + 'client_review_rotation_count': 1 + }, + 'autolabel': False, + 'folder_to_upload': path_to_images + } + + try: + result = client.initiate_create_project(project_payload) + print(f"[polygon_input_project] Project ID: {result['project_id']['response']['project_id']}") + except LabellerrError as e: + print(f"Project creation failed: {str(e)}") + +def create_project_input_select_radio(api_key, api_secret, client_id, email, path_to_images): + + client = LabellerrClient(api_key, api_secret) + + project_payload = { + 'client_id': client_id, + 'dataset_name': 'Testing_dataset', + 'dataset_description': 'Dataset for evaluating and moderating image content', + 'data_type': 'image', + 'created_by': email, + 'project_name': 'input_select_radio_project', + 'annotation_guide': [ + { + "question_number": 1, + "question": "Content Summary", + "option_type": "input", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [] + }, + { + "question_number": 2, + "question": "Content Categories", + "option_type": "select", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [ + { + "option_id": str(uuid.uuid4()), + "option_name": "Educational" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Entertainment" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Commercial" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "News" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Social" + } + ] + }, + { + "question_number": 3, + "question": "Content Appropriateness", + "option_type": "radio", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [ + { + "option_id": str(uuid.uuid4()), + "option_name": "Appropriate" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Needs Review" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Inappropriate" + } + ] + } + ], + 'rotation_config': { + 'annotation_rotation_count': 1, + 'review_rotation_count': 1, + 'client_review_rotation_count': 1 + }, + 'autolabel': False, + 'folder_to_upload': path_to_images + } + + try: + result = client.initiate_create_project(project_payload) + print(f"[input_select_radio] Project ID: {result['project_id']['response']['project_id']}") + except LabellerrError as e: + print(f"Project creation failed: {str(e)}") + +def create_project_boundingbox_dropdown_input(api_key, api_secret, client_id, email, path_to_images): + + client = LabellerrClient(api_key, api_secret) + + project_payload = { + 'client_id': client_id, + 'dataset_name': 'Testing_dataset', + 'dataset_description': 'Retail product images with bounding boxes and metadata', + 'data_type': 'image', + 'created_by': email, + 'project_name': 'boundingbox_dropdown_input_project', + 'annotation_guide': [ + { + "question_number": 1, + "question": "Product Bounding Box", + "question_id": str(uuid.uuid4()), + "option_type": "BoundingBox", + "required": True, + "options": [ + {"option_name": "#2ed573"} # Green for products + ] + }, + { + "question_number": 2, + "question": "Product Category", + "option_type": "dropdown", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [ + { + "option_id": str(uuid.uuid4()), + "option_name": "Electronics" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Clothing" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Home & Garden" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Sports" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Books" + } + ] + }, + { + "question_number": 3, + "question": "Product Name/Brand", + "option_type": "input", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [] + }, + { + "question_number": 4, + "question": "Product Condition Notes", + "option_type": "input", + "question_id": str(uuid.uuid4()), + "required": False, + "options": [] + } + ], + 'rotation_config': { + 'annotation_rotation_count': 1, + 'review_rotation_count': 1, + 'client_review_rotation_count': 1 + }, + 'autolabel': False, + 'folder_to_upload': path_to_images + } + + try: + result = client.initiate_create_project(project_payload) + print(f"[boundingbox_dropdown_input] Project ID: {result['project_id']['response']['project_id']}") + except LabellerrError as e: + print(f"Project creation failed: {str(e)}") + +def create_project_radio_dropdown(api_key, api_secret, client_id, email, path_to_images): + + client = LabellerrClient(api_key, api_secret) + + project_payload = { + 'client_id': client_id, + 'dataset_name': 'Testing_dataset', + 'dataset_description': 'Simple dataset for quick image classification', + 'data_type': 'image', + 'created_by': email, + 'project_name': 'radio_dropdown_project', + 'annotation_guide': [ + { + "question_number": 1, + "question": "Image Type", + "option_type": "radio", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [ + { + "option_id": str(uuid.uuid4()), + "option_name": "Indoor" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Outdoor" + } + ] + }, + { + "question_number": 2, + "question": "Primary Subject", + "option_type": "dropdown", + "question_id": str(uuid.uuid4()), + "required": True, + "options": [ + { + "option_id": str(uuid.uuid4()), + "option_name": "Person" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Animal" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Object" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Landscape" + }, + { + "option_id": str(uuid.uuid4()), + "option_name": "Architecture" + } + ] + } + ], + 'rotation_config': { + 'annotation_rotation_count': 1, + 'review_rotation_count': 1, + 'client_review_rotation_count': 1 + }, + 'autolabel': False, + 'folder_to_upload': path_to_images + } + + try: + result = client.initiate_create_project(project_payload) + print(f"[radio_dropdown] Project ID: {result['project_id']['response']['project_id']}") + except LabellerrError as e: + print(f"Project creation failed: {str(e)}") + + + diff --git a/tests/integration/Export_project.py b/tests/integration/Export_project.py new file mode 100644 index 0000000..100d56e --- /dev/null +++ b/tests/integration/Export_project.py @@ -0,0 +1,30 @@ +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'SDKPython'))) + +# Add the root directory to Python path +root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) +sys.path.append(root_dir) + +from SDKPython.labellerr.client import LabellerrClient +from SDKPython.labellerr.exceptions import LabellerrError +import uuid + + +def export_project(api_key, api_secret, client_id, project_id): + """Exports a project using the Labellerr SDK.""" + + client = LabellerrClient(api_key, api_secret) + export_config = { + "export_name": "Weekly Export", + "export_description": "Export of all accepted annotations", + "export_format": "coco_json", + "statuses": ['review', 'r_assigned','client_review', 'cr_assigned','accepted'] + } + try: + result = client.create_local_export(project_id, client_id, export_config) + + export_id = result["response"]['report_id'] + print(f"Local export created successfully. Export ID: {export_id}") + except LabellerrError as e: + print(f"Local export creation failed: {str(e)}") \ No newline at end of file diff --git a/tests/integration/Pre_annotation_uploading.py b/tests/integration/Pre_annotation_uploading.py new file mode 100644 index 0000000..ac4c5f5 --- /dev/null +++ b/tests/integration/Pre_annotation_uploading.py @@ -0,0 +1,26 @@ +import sys +import os +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'SDKPython'))) + +# Add the root directory to Python path +root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) +sys.path.append(root_dir) + +from SDKPython.labellerr.client import LabellerrClient +from SDKPython.labellerr.exceptions import LabellerrError +import uuid + +def pre_annotation_uploading(api_key, api_secret, client_id, project_id, annotation_format, annotation_file): + + client = LabellerrClient(api_key, api_secret) + try: + # Upload and wait for processing to complete + result = client.upload_preannotation_by_project_id(project_id, client_id, annotation_format, annotation_file) + # Check the final status + if result['response']['status'] == 'completed': + print("Pre-annotations processed successfully") + # Access additional metadata if needed + metadata = result['response'].get('metadata', {}) + print("metadata",metadata) + except LabellerrError as e: + print(f"Pre-annotation upload failed: {str(e)}") \ No newline at end of file diff --git a/tests/integration/__pycache__/Create_Project.cpython-310.pyc b/tests/integration/__pycache__/Create_Project.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..56e6ba82b80684008fc531ce1c1e96f49c0345ad GIT binary patch literal 7643 zcmbW6+ix3L9mhT6YaHi(ZIY(bHtlZ8y6bCfmy0%+mW{}!r3ni=Em&ipV`nzD$9rbn zHbaV#y5bMu1t9|3@D{DKuSg&s0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jhDqqSv^DyDD+qR@l8l#ZRaK z;R*3JCZXA4DAy~Xz_3q4#2eLX3dVxs9tKl^Y?;GiA{J47&69C4xe7K++Imr37r2w$ z43CkJ025(D#7RjuOo-x|q}U;f%UBh?0Q(WoPhhZpsI7v#p-1TswHAyDg|Mr1eV3^Z zT-$%>RaglFd#r^0Z-UpLtA9zXg^QJ~g?CkJVXR;+c*}72N`YQw(+`mG!~1g&LfV78 z&l;pX$Sx>bKe%gml(!r9^9Pr+nD((T_P8NFnro=GsbjbT!j(6OJA8TGqUlQIGGy0{Hdm;B+7Jtj{vjp?~Ib%rxtt zHya>d-U9gBSF!+*saia!^7OrX=e`NvXM?CCVlz0n6IIlp<5ZhF^_?_FclZRkN*J5 zU|BFy0@A#mW!W5KxkvwUOzl1Tmt*ulGykFOr?x-S{e|fx+n?JW=sq_6qW&N1Ke_Vw z-Cu=%8G8D|9oKZ$HN9Q4jWSE29qvY!yRp;AXB+t)CY)u$878ceR*(-1tiIt-hX3>j zfBb`=d+!hb-Pm7^eWH78`jzdMwx{Nu)8pCG8OoF%IVPAXJ#tLlJ^GigSz}q)gQ!Wb>jz0mF}cCMPn&4c4|M_3q?jbw aCE7%j#&vJgB260AU8F_jQ~Xny_x}T)R9uq) literal 0 HcmV?d00001 diff --git a/tests/integration/__pycache__/Create_Project.cpython-312.pyc b/tests/integration/__pycache__/Create_Project.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55f02a2c652a9be03a7f44de712732149a2525fc GIT binary patch literal 12836 zcmdT~U2GdycAg={KZ&INMOmUO+LA5FHf8<{B~dZFE6S3stSmdW;%scE%#e2|Q6@Rs zJEU!K<-jQlY@dp5U(%v3kf22q!2#k&1KWqxT{{N)Lc%qcm}G$kx_$7Qoa{r9zVzHX zGo&bUv=+H&Pzt(p=l-0z_s-n&o$s9c?+!;Z13&p!k5@l=i(&qg+-N^q12^CKScdtC zK@4J3%vI&eUS$Pltx0QIxvp6%c`YZfHCx)W`pQ+OWlN=nmeX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mTPsN+j*JCnznqLX=Y`545KT?iTkzffhyw|}c zJ*oRG*9#meJZrmxOGi!uoW%6tZ>bU%|E}D2hOFXz<9FKfCT^wI}x>+2*UhuwG zaQ@kIYji(g^6S&1b0f^-5!-yb@v+Y}Z#O=%n;<{d1t$+TB-tQJauYdPD4T)m3mG`U z%*P~J(6lBdGqMFGF*zeGTcgngoNtUq<-YPU{c##uC1>=!sJrIY5XCS!NG)BH7KD>24jSUqV>bpzczei`K9Hf)?c=MZ1~jjiRDxKC-%=SeeurLJ6}Y% zq7Q%i%scX8GaTe{n=F$RPlDg~R;i%k=<>~4`rThc8DNPHk)!Mit~ zpjY3*lUq(sGT+Z6Gs%2;x7$%R@eCh)pb+8*6Krz-UAhBSAw9Y1(}awccpcIIQ(lhY5SxRB4C;n$zu#rq;pxDeYs zBfHoeKRTZ01VJ1U@m5=R?)NPn+WqBp)(^QTx7j8xC5w2Qm3&i>Qm)3d;B2rzR_*&V VXNMhssG}5h+M1%NT0>LY>L0~RWaj_? literal 0 HcmV?d00001 diff --git a/tests/integration/cred.py b/tests/integration/cred.py new file mode 100644 index 0000000..6b5b428 --- /dev/null +++ b/tests/integration/cred.py @@ -0,0 +1,6 @@ +API_KEY = '66ee9d.85405d401b9c58481b9e2b73f5' +API_SECRET = 'cf2f638ae901c8fd5611d097846ce6c806451818573ca6e92a412ff188df1b05' + +CLIENT_ID = "14051" +PROJECT_ID = None +EMAIL_ID = "yashsuman15@gmail.com" \ No newline at end of file diff --git a/tests/integration/main.py b/tests/integration/main.py new file mode 100644 index 0000000..3a4aa9e --- /dev/null +++ b/tests/integration/main.py @@ -0,0 +1,64 @@ +from Create_Project import * +from Export_project import export_project +import cred +from Pre_annotation_uploading import pre_annotation_uploading + +api_key = cred.API_KEY +api_secret = cred.API_SECRET +client_id = cred.CLIENT_ID +project_id = cred.PROJECT_ID +email = cred.EMAIL_ID + + + +def test_create_project(path_to_images): + + print("CREATING PROJECTS WITH DIFFERENT OPTION TYPE") + print("\n 1:project with all option type") + create_project_all_option_type(api_key, api_secret, client_id, email, path_to_images) + + print("\n 2:project with polygon and bounding box") + create_project_polygon_boundingbox_project(api_key, api_secret, client_id, email, path_to_images) + + print("\n 3:project with select, dropdown and radio") + create_project_select_dropdown_radio(api_key, api_secret, client_id, email, path_to_images) + + print("\n 4:project with polygon and input") + create_project_polygon_input(api_key, api_secret, client_id, email, path_to_images) + + print("\n 5:project with input, select and radio") + create_project_input_select_radio(api_key, api_secret, client_id, email, path_to_images) + + print("\n 6:project with bounding box, dropdown and input") + create_project_boundingbox_dropdown_input(api_key, api_secret, client_id, email, path_to_images) + + print("\n 7:project with radio and dropdown") + create_project_radio_dropdown(api_key, api_secret, client_id, email, path_to_images) + + print("\n Project creation completed.") + +def test_export_project(project_id): + print("\n EXPORTING PROJECT") + export_project(api_key, api_secret, client_id, project_id) + print("\n Project export completed.") + +def test_pre_annotation_uploading(project_id, annotation_format, annotation_file): + print("\n PRE-ANNOTATION UPLOADING") + pre_annotation_uploading(api_key, api_secret, client_id, project_id, annotation_format, annotation_file) + print("\n Pre-annotation uploading completed.") + +if __name__ == "__main__": + + test_dataset_path = r'D:\professional\LABELLERR\Task\LABIMP-7059-SDK-Testing\test_img_6' + test_create_project(test_dataset_path) + + test_export_project(project_id) + + json_annotation_file = r'D:\professional\LABELLERR\Task\LABIMP-7059-SDK-Testing\test_img_6_annotations.json' + test_pre_annotation_uploading(project_id, 'coco_json', json_annotation_file) + + + + + + \ No newline at end of file From 0e32505164b5083743e24ecdbf300f09d9cc801c Mon Sep 17 00:00:00 2001 From: Yash Raj Suman Date: Tue, 16 Sep 2025 04:55:00 +0000 Subject: [PATCH 2/6] -removed api keys, secrets, client id -removed __pychace__ -added .gitignore --- tests/__pycache__/__init__.cpython-310.pyc | Bin 155 -> 0 bytes tests/__pycache__/test_client.cpython-310.pyc | Bin 1542 -> 0 bytes tests/__pycache__/test_client.cpython-312.pyc | Bin 2626 -> 0 bytes tests/integration/.gitignore | 3 +++ .../__pycache__/Create_Project.cpython-310.pyc | Bin 7643 -> 0 bytes .../__pycache__/Create_Project.cpython-311.pyc | Bin 14918 -> 0 bytes .../__pycache__/Create_Project.cpython-312.pyc | Bin 12836 -> 0 bytes .../__pycache__/cred.cpython-310.pyc | Bin 383 -> 0 bytes tests/integration/cred.py | 10 +++++----- 9 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 tests/__pycache__/__init__.cpython-310.pyc delete mode 100644 tests/__pycache__/test_client.cpython-310.pyc delete mode 100644 tests/__pycache__/test_client.cpython-312.pyc create mode 100644 tests/integration/.gitignore delete mode 100644 tests/integration/__pycache__/Create_Project.cpython-310.pyc delete mode 100644 tests/integration/__pycache__/Create_Project.cpython-311.pyc delete mode 100644 tests/integration/__pycache__/Create_Project.cpython-312.pyc delete mode 100644 tests/integration/__pycache__/cred.cpython-310.pyc diff --git a/tests/__pycache__/__init__.cpython-310.pyc b/tests/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 1b1c8d7e4ced92b29e6b0157ffd6327ad9baa53b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 155 zcmd1j<>g`kf>Yi6=^*+sh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o6vGKeRZts8~NS zFFi4@I5kh-B|o_|H#M)MSU)E*DK#gxs7OE9#XF#~BqKjhza+I7C=nl@nU`4-AFo$X Xd5gm)H$SB`C)EyQZZQ*(U||3N=TRg+ diff --git a/tests/__pycache__/test_client.cpython-310.pyc b/tests/__pycache__/test_client.cpython-310.pyc deleted file mode 100644 index 610757eb79424c4945a59b2e4e7f63914f3a5830..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1542 zcma)6&2Hm15GEzsmYv`3?xjErs0DiP#s6{aqCY8;pobPg0dIQXMW98>t1KnDq`cTQ z9ORHa_7V1w9Q!hT09|`3`UXXTc1S0w)Ampb9L|h5!{IkGR69Ej1Y_&BceCZ^2>oJ( z%|Spof@xj>;fQ02s9imYGmm=M^1k#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_K-o+|6`0WBS)_(nm1R0ZyG*BSz3+f}4O1$6y@rY9``QSvvlA16Bx7_mfqh0^ zmJ=T|nuA!VX0&^G-8}m}utL&oB{O7E_a>!vBn3m{hm~ku_{qtq_N;gMvvk&bC9@dH zdT(SJz$YHwF-NlINJc%r16ud2KRClN&pFG*R{ircj*B+^w#@+f@`lJi0lEAApmkbh z`5Md-a8Xxnjx-&CjOHVd(Q*VbT8RuWN7}$#1Sd7>toHeU=}Baf-GkN2>QQ7ta6xes z+rb>@`G4vr9=bvaHV3c?5S%RG-fCEuL~jMD4C_9jwjhDqqSv^DyDD+qR@l8l#ZRaK z;R*3JCZXA4DAy~Xz_3q4#2eLX3dVxs9tKl^Y?;GiA{J47&69C4xe7K++Imr37r2w$ z43CkJ025(D#7RjuOo-x|q}U;f%UBh?0Q(WoPhhZpsI7v#p-1TswHAyDg|Mr1eV3^Z zT-$%>RaglFd#r^0Z-UpLtA9zXg^QJ~g?CkJVXR;+c*}72N`YQw(+`mG!~1g&LfV78 z&l;pX$Sx>bKe%gml(!r9^9Pr+nD((T_P8NFnro=GsbjbT!j(6OJA8TGqUlQIGGy0{Hdm;B+7Jtj{vjp?~Ib%rxtt zHya>d-U9gBSF!+*saia!^7OrX=e`NvXM?CCVlz0n6IIlp<5ZhF^_?_FclZRkN*J5 zU|BFy0@A#mW!W5KxkvwUOzl1Tmt*ulGykFOr?x-S{e|fx+n?JW=sq_6qW&N1Ke_Vw z-Cu=%8G8D|9oKZ$HN9Q4jWSE29qvY!yRp;AXB+t)CY)u$878ceR*(-1tiIt-hX3>j zfBb`=d+!hb-Pm7^eWH78`jzdMwx{Nu)8pCG8OoF%IVPAXJ#tLlJ^GigSz}q)gQ!Wb>jz0mF}cCMPn&4c4|M_3q?jbw aCE7%j#&vJgB260AU8F_jQ~Xny_x}T)R9uq) diff --git a/tests/integration/__pycache__/Create_Project.cpython-312.pyc b/tests/integration/__pycache__/Create_Project.cpython-312.pyc deleted file mode 100644 index 55f02a2c652a9be03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{~>q{hWa-I z8~7l2db8B32V(muBnl7_lIA04% zD?F2DrvU#T)>J#de%^3a!M{to_!oY7^h*SeEDc*-Q%bqb>Zl0 zL#W$G?;k!!W+H1}J_JGhjXi*Lt~zL5FVH;2)7VF89?kEI=Ji+JejPN=tV_z zPvHP({Kg(Zq8^3Qm7#52IY6d>TC)<*Ste(lNDO9KHZNq5C}M@LSuW(V^p4D0i2$`; z#K0o)2GBtoSfVi?*{qy?kj+X^Nj57{C)u_LxFp4SIBRO3!SU53Ij})ON;{523|y-o zVFTDRunT*t1>-Et;=c&q{M{aSv!vmTPsN+j*JCnznqLX=Y`545KT?iTkzffhyw|}c zJ*oRG*9#meJZrmxOGi!uoW%6tZ>bU%|E}D2hOFXz<9FKfCT^wI}x>+2*UhuwG zaQ@kIYji(g^6S&1b0f^-5!-yb@v+Y}Z#O=%n;<{d1t$+TB-tQJauYdPD4T)m3mG`U z%*P~J(6lBdGqMFGF*zeGTcgngoNtUq<-YPU{c##uC1>=!sJrIY5XCS!NG)BH7KD>24jSUqV>bpzczei`K9Hf)?c=MZ1~jjiRDxKC-%=SeeurLJ6}Y% zq7Q%i%scX8GaTe{n=F$RPlDg~R;i%k=<>~4`rThc8DNPHk)!Mit~ zpjY3*lUq(sGT+Z6Gs%2;x7$%R@eCh)pb+8*6Krz-UAhBSAw9Y1(}awccpcIIQ(lhY5SxRB4C;n$zu#rq;pxDeYs zBfHoeKRTZ01VJ1U@m5=R?)NPn+WqBp)(^QTx7j8xC5w2Qm3&i>Qm)3d;B2rzR_*&V VXNMhssG}5h+M1%NT0>LY>L0~RWaj_? diff --git a/tests/integration/cred.py b/tests/integration/cred.py index 6b5b428..27f7313 100644 --- a/tests/integration/cred.py +++ b/tests/integration/cred.py @@ -1,6 +1,6 @@ -API_KEY = '66ee9d.85405d401b9c58481b9e2b73f5' -API_SECRET = 'cf2f638ae901c8fd5611d097846ce6c806451818573ca6e92a412ff188df1b05' +API_KEY = "" +API_SECRET = "" -CLIENT_ID = "14051" -PROJECT_ID = None -EMAIL_ID = "yashsuman15@gmail.com" \ No newline at end of file +CLIENT_ID = "" +PROJECT_ID = "" +EMAIL_ID = "" \ No newline at end of file From e3774014b88fc5c5bdeefcd2073d58dd57befc82 Mon Sep 17 00:00:00 2001 From: yashsuman Date: Fri, 31 Oct 2025 03:44:50 +0530 Subject: [PATCH 3/6] fixed according to new refactored code --- labellerr/core/datasets/video_dataset.py | 12 +- labellerr/notebooks/SDK.ipynb | 590 +++++++++++++++-------- 2 files changed, 406 insertions(+), 196 deletions(-) diff --git a/labellerr/core/datasets/video_dataset.py b/labellerr/core/datasets/video_dataset.py index 6f38301..01bce58 100644 --- a/labellerr/core/datasets/video_dataset.py +++ b/labellerr/core/datasets/video_dataset.py @@ -41,7 +41,15 @@ def fetch_files(self, page_size: int = 1000): # print(params) - response = self.client.make_request(url, params, unique_id) + # Fixed: Pass method as first arg, url as second, params as kwarg + print(f"url: f{url}") + + response = self.client.make_request( + method="GET", + url=url, + request_id=unique_id, + params=params + ) # pprint.pprint(response) @@ -161,4 +169,4 @@ def download(self): raise LabellerrError(f"Failed to process dataset videos: {str(e)}") -LabellerrDatasetMeta._register(DatasetDataType.video, VideoDataset) +LabellerrDatasetMeta._register(DatasetDataType.video, VideoDataset) \ No newline at end of file diff --git a/labellerr/notebooks/SDK.ipynb b/labellerr/notebooks/SDK.ipynb index 1efd28f..7850192 100644 --- a/labellerr/notebooks/SDK.ipynb +++ b/labellerr/notebooks/SDK.ipynb @@ -22,6 +22,7 @@ "source": [ "from labellerr.client import LabellerrClient\n", "from labellerr.core.datasets import LabellerrDataset\n", + "from labellerr.core.exceptions import LabellerrError\n", "import os\n", "from tqdm.notebook import tqdm\n" ] @@ -61,7 +62,149 @@ "\n", "api_key = config[\"API_KEY\"]\n", "api_secret = config[\"API_SECRET\"]\n", - "client_id = config[\"CLIENT_ID\"]" + "client_id = config[\"CLIENT_ID\"]\n", + "email = config[\"EMAIL\"]" + ] + }, + { + "cell_type": "markdown", + "id": "d2646549", + "metadata": {}, + "source": [ + "## Kaggle Dataset Download and Project creation" + ] + }, + { + "cell_type": "markdown", + "id": "c2d2a744", + "metadata": {}, + "source": [ + "Before downloading the dataset from Kaggle, you need to:\n", + "\n", + "1. Install kagglehub package using pip\n", + "2. Authenticate with Kaggle\n", + "3. Download the CCTV footage dataset\n", + "\n", + "The kagglehub package provides a simple interface to download datasets directly from Kaggle. Make sure you have a Kaggle account and API credentials set up before proceeding.\n", + "\n", + "Note: If you haven't set up Kaggle authentication before, you'll need to:\n", + "1. Create a Kaggle account at https://www.kaggle.com\n", + "2. Go to \"Account\" settings\n", + "3. Scroll to API section and click \"Create New API Token\"\n", + "4. This will download a kaggle.json file with your credentials" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "be12bf3f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: kagglehub in c:\\users\\yashs\\miniconda3\\lib\\site-packages (0.3.13)\n", + "Requirement already satisfied: dotenv in c:\\users\\yashs\\miniconda3\\lib\\site-packages (0.9.9)\n", + "Collecting ipywidgets\n", + " Downloading ipywidgets-8.1.7-py3-none-any.whl.metadata (2.4 kB)\n", + "Requirement already satisfied: packaging in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from kagglehub) (25.0)\n", + "Requirement already satisfied: pyyaml in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from kagglehub) (6.0.3)\n", + "Requirement already satisfied: requests in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from kagglehub) (2.32.5)\n", + "Requirement already satisfied: tqdm in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from kagglehub) (4.67.1)\n", + "Requirement already satisfied: python-dotenv in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from dotenv) (1.1.0)\n", + "Requirement already satisfied: comm>=0.1.3 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipywidgets) (0.2.1)\n", + "Requirement already satisfied: ipython>=6.1.0 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipywidgets) (9.5.0)\n", + "Requirement already satisfied: traitlets>=4.3.1 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipywidgets) (5.14.3)\n", + "Collecting widgetsnbextension~=4.0.14 (from ipywidgets)\n", + " Downloading widgetsnbextension-4.0.14-py3-none-any.whl.metadata (1.6 kB)\n", + "Collecting jupyterlab_widgets~=3.0.15 (from ipywidgets)\n", + " Downloading jupyterlab_widgets-3.0.15-py3-none-any.whl.metadata (20 kB)\n", + "Requirement already satisfied: colorama in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (0.4.6)\n", + "Requirement already satisfied: decorator in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (5.2.1)\n", + "Requirement already satisfied: ipython-pygments-lexers in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (1.1.1)\n", + "Requirement already satisfied: jedi>=0.16 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (0.19.2)\n", + "Requirement already satisfied: matplotlib-inline in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (0.1.7)\n", + "Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (3.0.52)\n", + "Requirement already satisfied: pygments>=2.4.0 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (2.19.1)\n", + "Requirement already satisfied: stack_data in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (0.6.3)\n", + "Requirement already satisfied: typing_extensions>=4.6 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (4.15.0)\n", + "Requirement already satisfied: wcwidth in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython>=6.1.0->ipywidgets) (0.2.13)\n", + "Requirement already satisfied: parso<0.9.0,>=0.8.4 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from jedi>=0.16->ipython>=6.1.0->ipywidgets) (0.8.4)\n", + "Requirement already satisfied: charset_normalizer<4,>=2 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from requests->kagglehub) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from requests->kagglehub) (3.7)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from requests->kagglehub) (2.3.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from requests->kagglehub) (2025.10.5)\n", + "Requirement already satisfied: executing>=1.2.0 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from stack_data->ipython>=6.1.0->ipywidgets) (2.2.1)\n", + "Requirement already satisfied: asttokens>=2.1.0 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from stack_data->ipython>=6.1.0->ipywidgets) (3.0.0)\n", + "Requirement already satisfied: pure_eval in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from stack_data->ipython>=6.1.0->ipywidgets) (0.2.3)\n", + "Downloading ipywidgets-8.1.7-py3-none-any.whl (139 kB)\n", + "Downloading jupyterlab_widgets-3.0.15-py3-none-any.whl (216 kB)\n", + "Downloading widgetsnbextension-4.0.14-py3-none-any.whl (2.2 MB)\n", + " ---------------------------------------- 0.0/2.2 MB ? eta -:--:--\n", + " ------------------- -------------------- 1.0/2.2 MB 4.6 MB/s eta 0:00:01\n", + " --------------------------------- ------ 1.8/2.2 MB 4.2 MB/s eta 0:00:01\n", + " ---------------------------------------- 2.2/2.2 MB 3.9 MB/s 0:00:00\n", + "Installing collected packages: widgetsnbextension, jupyterlab_widgets, ipywidgets\n", + "\n", + " -------------------------- ------------- 2/3 [ipywidgets]\n", + " ---------------------------------------- 3/3 [ipywidgets]\n", + "\n", + "Successfully installed ipywidgets-8.1.7 jupyterlab_widgets-3.0.15 widgetsnbextension-4.0.14\n" + ] + } + ], + "source": [ + "# !pip install kagglehub dotenv ipywidgets" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "e05889d7", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "9238b9a0f083402c926fabe84ac82a5a", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(HTML(value='
\n", + "video\n" ] } ], "source": [ - "results = dataset.download()" + "files = LabellerrDataset(client, dataset.dataset_id)\n", + "print(type(dataset))\n", + "print(dataset.data_type)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cf0aa76f", + "metadata": {}, + "outputs": [], + "source": [ + "files.fetch_files()" ] }, { @@ -231,7 +540,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "id": "f5c41073", "metadata": {}, "outputs": [], @@ -270,7 +579,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "dd96be8c", "metadata": {}, "outputs": [], @@ -289,19 +598,10 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "id": "a3052f25", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Keyframes extracted to FFMPEG_detects\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\frames\n", - "JSON mapping saved to: FFMPEG_detects\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\c44f38f6-0186-436f-8c2d-ffb50a539c76_mapping.json\n" - ] - } - ], + "outputs": [], "source": [ "for filename in os.listdir(dataset_dir):\n", " file_path = os.path.join(dataset_dir, filename)\n", @@ -350,18 +650,10 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": null, "id": "1b364362", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Found 52 image files\n" - ] - } - ], + "outputs": [], "source": [ "import os\n", "\n", @@ -384,79 +676,17 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "id": "f39153ab", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\0.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1008.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1016.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1028.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1060.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1082.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1106.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1119.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1137.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1157.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1175.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1189.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\119.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1201.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1218.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1233.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1246.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1257.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1278.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1312.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\1319.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\141.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\233.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\263.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\37.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\381.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\408.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\437.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\457.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\484.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\508.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\552.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\575.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\590.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\619.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\63.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\647.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\683.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\706.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\721.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\758.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\776.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\805.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\823.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\83.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\836.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\858.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\876.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\893.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\915.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\949.jpg',\n", - " 'FFMPEG_detects\\\\16257fd6-b91b-4d00-a680-9ece9f3f241c\\\\c44f38f6-0186-436f-8c2d-ffb50a539c76\\\\frames\\\\99.jpg']" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "images_files" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "id": "40c70986", "metadata": {}, "outputs": [], @@ -489,36 +719,17 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "a1d96b25", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Dataset created successfully!\n", - "Dataset ID: 6a680901-fe81-49f0-9120-bb754d63a341\n" - ] - }, - { - "data": { - "text/plain": [ - "'6a680901-fe81-49f0-9120-bb754d63a341'" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "upload_images_from_files(images_files, client, client_id)" ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "id": "958fc75e", "metadata": {}, "outputs": [], @@ -601,19 +812,10 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "id": "9f682f4f", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Project created successfully!\n", - "Project ID: sherri_puny_rattlesnake_84247\n" - ] - } - ], + "outputs": [], "source": [ "if response['response']['project_id']:\n", " print(f\"Project created successfully!\")\n", @@ -697,7 +899,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "df6b3ac7", "metadata": {}, "outputs": [], @@ -708,7 +910,7 @@ ], "metadata": { "kernelspec": { - "display_name": "SDk", + "display_name": ".venv", "language": "python", "name": "python3" }, @@ -722,7 +924,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.18" + "version": "3.14.0" } }, "nbformat": 4, From 7aede4d3096f2b08afd81d8a51305636db8b2d86 Mon Sep 17 00:00:00 2001 From: yashsuman Date: Fri, 31 Oct 2025 10:18:47 +0530 Subject: [PATCH 4/6] minor changes --- labellerr/notebooks/SDK.ipynb | 104 +++++++++++----------------------- 1 file changed, 33 insertions(+), 71 deletions(-) diff --git a/labellerr/notebooks/SDK.ipynb b/labellerr/notebooks/SDK.ipynb index 7850192..1112e7e 100644 --- a/labellerr/notebooks/SDK.ipynb +++ b/labellerr/notebooks/SDK.ipynb @@ -96,78 +96,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "be12bf3f", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: kagglehub in c:\\users\\yashs\\miniconda3\\lib\\site-packages (0.3.13)\n", - "Requirement already satisfied: dotenv in c:\\users\\yashs\\miniconda3\\lib\\site-packages (0.9.9)\n", - "Collecting ipywidgets\n", - " Downloading ipywidgets-8.1.7-py3-none-any.whl.metadata (2.4 kB)\n", - "Requirement already satisfied: packaging in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from kagglehub) (25.0)\n", - "Requirement already satisfied: pyyaml in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from kagglehub) (6.0.3)\n", - "Requirement already satisfied: requests in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from kagglehub) (2.32.5)\n", - "Requirement already satisfied: tqdm in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from kagglehub) (4.67.1)\n", - "Requirement already satisfied: python-dotenv in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from dotenv) (1.1.0)\n", - "Requirement already satisfied: comm>=0.1.3 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipywidgets) (0.2.1)\n", - "Requirement already satisfied: ipython>=6.1.0 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipywidgets) (9.5.0)\n", - "Requirement already satisfied: traitlets>=4.3.1 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipywidgets) (5.14.3)\n", - "Collecting widgetsnbextension~=4.0.14 (from ipywidgets)\n", - " Downloading widgetsnbextension-4.0.14-py3-none-any.whl.metadata (1.6 kB)\n", - "Collecting jupyterlab_widgets~=3.0.15 (from ipywidgets)\n", - " Downloading jupyterlab_widgets-3.0.15-py3-none-any.whl.metadata (20 kB)\n", - "Requirement already satisfied: colorama in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (0.4.6)\n", - "Requirement already satisfied: decorator in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (5.2.1)\n", - "Requirement already satisfied: ipython-pygments-lexers in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (1.1.1)\n", - "Requirement already satisfied: jedi>=0.16 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (0.19.2)\n", - "Requirement already satisfied: matplotlib-inline in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (0.1.7)\n", - "Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (3.0.52)\n", - "Requirement already satisfied: pygments>=2.4.0 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (2.19.1)\n", - "Requirement already satisfied: stack_data in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (0.6.3)\n", - "Requirement already satisfied: typing_extensions>=4.6 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from ipython>=6.1.0->ipywidgets) (4.15.0)\n", - "Requirement already satisfied: wcwidth in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython>=6.1.0->ipywidgets) (0.2.13)\n", - "Requirement already satisfied: parso<0.9.0,>=0.8.4 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from jedi>=0.16->ipython>=6.1.0->ipywidgets) (0.8.4)\n", - "Requirement already satisfied: charset_normalizer<4,>=2 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from requests->kagglehub) (3.3.2)\n", - "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from requests->kagglehub) (3.7)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from requests->kagglehub) (2.3.0)\n", - "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from requests->kagglehub) (2025.10.5)\n", - "Requirement already satisfied: executing>=1.2.0 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from stack_data->ipython>=6.1.0->ipywidgets) (2.2.1)\n", - "Requirement already satisfied: asttokens>=2.1.0 in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from stack_data->ipython>=6.1.0->ipywidgets) (3.0.0)\n", - "Requirement already satisfied: pure_eval in c:\\users\\yashs\\miniconda3\\lib\\site-packages (from stack_data->ipython>=6.1.0->ipywidgets) (0.2.3)\n", - "Downloading ipywidgets-8.1.7-py3-none-any.whl (139 kB)\n", - "Downloading jupyterlab_widgets-3.0.15-py3-none-any.whl (216 kB)\n", - "Downloading widgetsnbextension-4.0.14-py3-none-any.whl (2.2 MB)\n", - " ---------------------------------------- 0.0/2.2 MB ? eta -:--:--\n", - " ------------------- -------------------- 1.0/2.2 MB 4.6 MB/s eta 0:00:01\n", - " --------------------------------- ------ 1.8/2.2 MB 4.2 MB/s eta 0:00:01\n", - " ---------------------------------------- 2.2/2.2 MB 3.9 MB/s 0:00:00\n", - "Installing collected packages: widgetsnbextension, jupyterlab_widgets, ipywidgets\n", - "\n", - " -------------------------- ------------- 2/3 [ipywidgets]\n", - " ---------------------------------------- 3/3 [ipywidgets]\n", - "\n", - "Successfully installed ipywidgets-8.1.7 jupyterlab_widgets-3.0.15 widgetsnbextension-4.0.14\n" - ] - } - ], + "outputs": [], "source": [ - "# !pip install kagglehub dotenv ipywidgets" + "# !pip install kagglehub ipywidgets" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "id": "e05889d7", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "9238b9a0f083402c926fabe84ac82a5a", + "model_id": "cc0c857aa5a1490494c6d2b4f00850f0", "version_major": 2, "version_minor": 0 }, @@ -187,7 +133,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "c5b93e97", "metadata": {}, "outputs": [ @@ -260,7 +206,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 7, "id": "55b42671", "metadata": {}, "outputs": [], @@ -270,23 +216,37 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 36, "id": "7be23d9a", "metadata": {}, "outputs": [], "source": [ - "path_to_dataset = r\"C:\\Users\\yashs\\.cache\\kagglehub\\datasets\\mistag\\short-videos\\versions\\4\"" + "path_to_dataset = r\"D:\\Professional\\tensormatics_SDKPython\\.cache\\kagglehub\\datasets\\mistag\\short-videos\\versions\\4\"" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 40, "id": "94adb94a", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dataset created with ID: 6316a22a-cb5e-49ef-9d6c-925e95d27fe1\n", + "Total files: 0\n" + ] + } + ], "source": [ "from labellerr.core.datasets import create_dataset\n", "from labellerr.core.schemas import DatasetConfig\n", + "from pathlib import Path\n", + "\n", + "\n", + "if not Path(path_to_dataset).exists():\n", + " raise FileNotFoundError(f\"Path does not exist: {path_to_dataset}\")\n", "\n", "dataset = create_dataset(\n", " client=client,\n", @@ -296,7 +256,9 @@ " data_type=\"video\",\n", " connector_type=\"local\"\n", " ),\n", - " folder_to_upload=path_to_dataset\n", + " folder_to_upload=path_to_dataset,\n", + " path=path_to_dataset\n", + " \n", ")\n", "\n", "print(f\"Dataset created with ID: {dataset.dataset_id}\")\n", @@ -305,7 +267,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 17, "id": "c9f6eff1", "metadata": {}, "outputs": [ @@ -313,7 +275,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Annotation template created with ID: 1a42256a-c36a-4e9e-aea7-7b4e79ecf21a\n" + "Annotation template created with ID: 5a6be0f2-63fe-464a-aae3-bdfbf9e3a864\n" ] } ], @@ -342,7 +304,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 18, "id": "6027577d", "metadata": {}, "outputs": [], @@ -365,7 +327,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 32, "id": "2bad0ec0", "metadata": {}, "outputs": [ @@ -373,7 +335,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Project created successfully. Project ID: clemmie_near_guppy_37143\n" + "Project creation failed: Dataset 2a0ed373-b255-4963-b19d-74b6904b0e66 does not exist or is invalid: Dataset 2a0ed373-b255-4963-b19d-74b6904b0e66 has no files\n" ] } ], From 1bd7d0384b286f5df2e41bbe519c83f51c911e13 Mon Sep 17 00:00:00 2001 From: yashsuman Date: Fri, 31 Oct 2025 23:33:21 +0530 Subject: [PATCH 5/6] fixed the payload required keyword --- labellerr/notebooks/SDK.ipynb | 101 +++++++++++++++++++++++++--------- 1 file changed, 76 insertions(+), 25 deletions(-) diff --git a/labellerr/notebooks/SDK.ipynb b/labellerr/notebooks/SDK.ipynb index 1112e7e..2f156b0 100644 --- a/labellerr/notebooks/SDK.ipynb +++ b/labellerr/notebooks/SDK.ipynb @@ -206,7 +206,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 42, "id": "55b42671", "metadata": {}, "outputs": [], @@ -216,7 +216,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 43, "id": "7be23d9a", "metadata": {}, "outputs": [], @@ -226,7 +226,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 61, "id": "94adb94a", "metadata": {}, "outputs": [ @@ -234,7 +234,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Dataset created with ID: 6316a22a-cb5e-49ef-9d6c-925e95d27fe1\n", + "Dataset created with ID: 7cccc826-7a71-4a12-8fe1-773077350c44\n", "Total files: 0\n" ] } @@ -257,7 +257,7 @@ " connector_type=\"local\"\n", " ),\n", " folder_to_upload=path_to_dataset,\n", - " path=path_to_dataset\n", + " path=\"local\"\n", " \n", ")\n", "\n", @@ -267,7 +267,31 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 46, + "id": "5b7e6f39", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dataset ID: 4d4acbe5-0968-407b-92b8-0c9e928e1886\n", + "Data Type: video\n", + "Files Count: 0\n", + "Status Code: 100\n" + ] + } + ], + "source": [ + "print(f\"Dataset ID: {dataset.dataset_id}\")\n", + "print(f\"Data Type: {dataset.data_type}\")\n", + "print(f\"Files Count: {dataset.files_count}\")\n", + "print(f\"Status Code: {dataset.status_code}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 71, "id": "c9f6eff1", "metadata": {}, "outputs": [ @@ -275,18 +299,20 @@ "name": "stdout", "output_type": "stream", "text": [ - "Annotation template created with ID: 5a6be0f2-63fe-464a-aae3-bdfbf9e3a864\n" + "Annotation template created with ID: e76c2697-ea5f-4f45-9398-9470004ab524\n" ] } ], "source": [ "from labellerr.core.projects import create_annotation_guideline\n", + "import uuid\n", "\n", "questions = [\n", - " {\n", + " { \"question_number\": 1,\n", " \"question\": \"Test_12345\",\n", " \"option_type\": \"polygon\",\n", " \"required\": True,\n", + " \"question_id\": str(uuid.uuid4()),\n", " \"options\": [\n", " { \"option_name\": \"#fe1236\" }\n", " ]\n", @@ -304,7 +330,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 72, "id": "6027577d", "metadata": {}, "outputs": [], @@ -327,7 +353,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 73, "id": "2bad0ec0", "metadata": {}, "outputs": [ @@ -335,7 +361,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Project creation failed: Dataset 2a0ed373-b255-4963-b19d-74b6904b0e66 does not exist or is invalid: Dataset 2a0ed373-b255-4963-b19d-74b6904b0e66 has no files\n" + "Project created successfully. Project ID: vanda_poor_sawfish_70734\n" ] } ], @@ -350,20 +376,20 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 74, "id": "b1ca38e6", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'project_id': 'clemmie_near_guppy_37143',\n", + "{'project_id': 'vanda_poor_sawfish_70734',\n", " 'project_name': 'SDK workflow',\n", " 'created_by': 'yashsuman15@gmail.com',\n", - " 'created_at': 1761859030067,\n", + " 'created_at': 1761933037216,\n", " 'data_type': 'video',\n", - " 'attached_datasets': ['502ed024-2d9a-4468-8cc3-5884dfaaaa97'],\n", - " 'annotation_template_id': '1a42256a-c36a-4e9e-aea7-7b4e79ecf21a',\n", + " 'attached_datasets': ['7cccc826-7a71-4a12-8fe1-773077350c44'],\n", + " 'annotation_template_id': 'e76c2697-ea5f-4f45-9398-9470004ab524',\n", " 'client_id': '14078',\n", " 'rotations': {'annotation_rotation_count': 1,\n", " 'review_rotation_count': 1,\n", @@ -372,16 +398,16 @@ " 'auto_label': None,\n", " 'origin': 'https://pro.labellerr.com',\n", " 'status_code': 300,\n", - " 'indexing_job_id': '692a8948-68ea-4894-9153-a7ad1bc7a2c1',\n", + " 'indexing_job_id': 'c25cf218-65fa-475b-b35e-e80a97e0d103',\n", " 'indexing_job': None,\n", " 'progress': {'eta': '',\n", " 'processed': None,\n", " 'start_time': None,\n", - " 'completion_time': 1761859042261},\n", + " 'completion_time': 1761933040462},\n", " 'total_files': 3}" ] }, - "execution_count": 13, + "execution_count": 74, "metadata": {}, "output_type": "execute_result" } @@ -408,17 +434,17 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 75, "id": "9d91db16", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'502ed024-2d9a-4468-8cc3-5884dfaaaa97'" + "'7cccc826-7a71-4a12-8fe1-773077350c44'" ] }, - "execution_count": 14, + "execution_count": 75, "metadata": {}, "output_type": "execute_result" } @@ -429,7 +455,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 76, "id": "9eaec7e1", "metadata": {}, "outputs": [ @@ -450,10 +476,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 77, "id": "cf0aa76f", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "url: fhttps://api.labellerr.com/search/files/all\n", + "Total file IDs extracted: 3\n", + "\n", + "Creating LabellerrFile instances for 3 files...\n", + "Warning: Failed to create file instance for 1565574a-6f74-48ed-9d4d-1e6414b31477: Failed to create file instance: {'error': {'message': 'NotFound: Project ID not found', 'response': [], 'error': 'Project ID not found', 'tracking_id': 'b4cb265c1e14ac135faf9911dc116b82'}, 'code': 404}\n", + "Warning: Failed to create file instance for 6ce70fcb-dea5-4043-8140-8117376a245d: Failed to create file instance: {'error': {'message': 'NotFound: Project ID not found', 'response': [], 'error': 'Project ID not found', 'tracking_id': 'bb38bb9dfe0ba78fa4fc95a4f206a426'}, 'code': 404}\n", + "Warning: Failed to create file instance for a21ebe6e-334e-422a-83be-cd9d1167fc5f: Failed to create file instance: {'error': {'message': 'NotFound: Project ID not found', 'response': [], 'error': 'Project ID not found', 'tracking_id': 'cef70276fb5baa466825d6820fa3795b'}, 'code': 404}\n", + "Successfully created 0 LabellerrFile instances\n" + ] + }, + { + "data": { + "text/plain": [ + "[]" + ] + }, + "execution_count": 77, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "files.fetch_files()" ] From c48fcf299a514db75578f1e84ba75aff406e2b3f Mon Sep 17 00:00:00 2001 From: yashsuman Date: Thu, 6 Nov 2025 05:02:46 +0530 Subject: [PATCH 6/6] Modify the videodataset and videofile --- .pre-commit-config.yaml | 2 +- labellerr/core/datasets/video_dataset.py | 36 ++-- labellerr/core/files/video_file.py | 7 +- labellerr/notebooks/SDK.ipynb | 259 +++++++++-------------- 4 files changed, 127 insertions(+), 177 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cac0187..f470e46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: rev: v1.11.2 hooks: - id: mypy - args: ["--config=pyproject.toml"] + args: ["--config=pyproject.toml", "--python-version", "3.12"] additional_dependencies: - types-requests - types-aiofiles diff --git a/labellerr/core/datasets/video_dataset.py b/labellerr/core/datasets/video_dataset.py index 01bce58..44a9dcd 100644 --- a/labellerr/core/datasets/video_dataset.py +++ b/labellerr/core/datasets/video_dataset.py @@ -42,16 +42,12 @@ def fetch_files(self, page_size: int = 1000): # print(params) # Fixed: Pass method as first arg, url as second, params as kwarg - print(f"url: f{url}") - + response = self.client.make_request( - method="GET", - url=url, - request_id=unique_id, - params=params + method="GET", url=url, request_id=unique_id, params=params ) - - # pprint.pprint(response) + # from pprint import pprint + # pprint(response) # Extract files from the response files = response.get("response", {}).get("files", []) @@ -71,12 +67,15 @@ def fetch_files(self, page_size: int = 1000): if not next_search_after or not files: break - print(f"Fetched total: {len(all_file_ids)}") - print(f"Total file IDs extracted: {len(all_file_ids)}") - # return all_file_ids + return all_file_ids - # Create LabellerrVideoFile instances for each file_id + except Exception as e: + raise LabellerrError(f"Failed to fetch dataset files: {str(e)}") + + def _create_labellerrfile_instances(self, all_file_ids: list, project_id: str): + # Create LabellerrVideoFile instances for each file_id + try: video_files = [] print( f"\nCreating LabellerrFile instances for {len(all_file_ids)} files..." @@ -87,7 +86,7 @@ def fetch_files(self, page_size: int = 1000): video_file = LabellerrFile( client=self.client, file_id=file_id, - project_id="self.project_id", # noqa: # todo: ximi we don't have project id here + project_id=project_id, # noqa: # todo: ximi we don't have project id here dataset_id=self.dataset_id, ) video_files.append(video_file) @@ -102,7 +101,7 @@ def fetch_files(self, page_size: int = 1000): except Exception as e: raise LabellerrError(f"Failed to fetch dataset files: {str(e)}") - def download(self): + def download(self, project_id: str): """ Process all video files in the dataset: download frames, create videos, and automatically clean up temporary files. @@ -115,8 +114,13 @@ def download(self): print(f"# Starting batch video processing for dataset: {self.dataset_id}") print(f"{'#'*70}\n") + # Fetch all files ids + all_files_ids = self.fetch_files() + # Fetch all video files - video_files = self.fetch_files() + video_files = self._create_labellerrfile_instances( + all_files_ids, project_id + ) if not video_files: print("No video files found in dataset") @@ -169,4 +173,4 @@ def download(self): raise LabellerrError(f"Failed to process dataset videos: {str(e)}") -LabellerrDatasetMeta._register(DatasetDataType.video, VideoDataset) \ No newline at end of file +LabellerrDatasetMeta._register(DatasetDataType.video, VideoDataset) diff --git a/labellerr/core/files/video_file.py b/labellerr/core/files/video_file.py index 7e544d5..1a59234 100644 --- a/labellerr/core/files/video_file.py +++ b/labellerr/core/files/video_file.py @@ -61,9 +61,12 @@ def get_frames(self, frame_start: int = 0, frame_end: int | None = None): "frame_end": frame_end, "project_id": self.project_id, "uuid": unique_id, + "client_id": self.client.client_id, } - response = self.client.make_request(url, params, unique_id) + response = self.client.make_request( + "GET", url, request_id=unique_id, params=params + ) return response @@ -233,7 +236,7 @@ def create_video( raise LabellerrError(f"Error while joining frames: {str(e)}") def download_create_video_auto_cleanup( - self, output_folder: str = "./Labellerr_datastets" + self, output_folder: str = "./Labellerr_datasets" ): """ Download frames, create video, and automatically clean up temporary frames. diff --git a/labellerr/notebooks/SDK.ipynb b/labellerr/notebooks/SDK.ipynb index 2f156b0..20cba96 100644 --- a/labellerr/notebooks/SDK.ipynb +++ b/labellerr/notebooks/SDK.ipynb @@ -96,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 5, "id": "be12bf3f", "metadata": {}, "outputs": [], @@ -105,26 +105,13 @@ ] }, { - "cell_type": "code", - "execution_count": 5, + "cell_type": "raw", "id": "e05889d7", - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "cc0c857aa5a1490494c6d2b4f00850f0", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(HTML(value='
\n", - "video\n" - ] - } - ], + "outputs": [], "source": [ - "files = LabellerrDataset(client, dataset.dataset_id)\n", - "print(type(dataset))\n", - "print(dataset.data_type)" + "# from labellerr.core.datasets import LabellerrDataset\n", + "files = LabellerrDataset(client, dataset_id)" ] }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 7, "id": "cf0aa76f", "metadata": {}, "outputs": [ @@ -484,29 +416,25 @@ "name": "stdout", "output_type": "stream", "text": [ - "url: fhttps://api.labellerr.com/search/files/all\n", - "Total file IDs extracted: 3\n", - "\n", - "Creating LabellerrFile instances for 3 files...\n", - "Warning: Failed to create file instance for 1565574a-6f74-48ed-9d4d-1e6414b31477: Failed to create file instance: {'error': {'message': 'NotFound: Project ID not found', 'response': [], 'error': 'Project ID not found', 'tracking_id': 'b4cb265c1e14ac135faf9911dc116b82'}, 'code': 404}\n", - "Warning: Failed to create file instance for 6ce70fcb-dea5-4043-8140-8117376a245d: Failed to create file instance: {'error': {'message': 'NotFound: Project ID not found', 'response': [], 'error': 'Project ID not found', 'tracking_id': 'bb38bb9dfe0ba78fa4fc95a4f206a426'}, 'code': 404}\n", - "Warning: Failed to create file instance for a21ebe6e-334e-422a-83be-cd9d1167fc5f: Failed to create file instance: {'error': {'message': 'NotFound: Project ID not found', 'response': [], 'error': 'Project ID not found', 'tracking_id': 'cef70276fb5baa466825d6820fa3795b'}, 'code': 404}\n", - "Successfully created 0 LabellerrFile instances\n" + "Total file IDs extracted: 3\n" ] - }, - { - "data": { - "text/plain": [ - "[]" - ] - }, - "execution_count": 77, - "metadata": {}, - "output_type": "execute_result" } ], "source": [ - "files.fetch_files()" + "labellerrfile_list = files.fetch_files()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "995fc600", + "metadata": {}, + "outputs": [], + "source": [ + "# import logging\n", + "# logging.basicConfig(level=logging.DEBUG)\n", + "\n", + "labellerrfile = files.download(project_id)" ] }, { @@ -558,9 +486,9 @@ "metadata": {}, "outputs": [], "source": [ - "from labellerr.services.video_sampling.pyscene_detect import PySceneDetect\n", - "from labellerr.services.video_sampling.ssim import SSIMSceneDetect\n", - "from labellerr.services.video_sampling.ffmpeg import FFMPEGSceneDetect" + "from labellerr.services.video_sampling import PySceneDetect\n", + "from labellerr.services.video_sampling import SSIMSceneDetect\n", + "from labellerr.services.video_sampling import FFMPEGSceneDetect" ] }, { @@ -582,12 +510,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "id": "49a6f89d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Path exists ✅\n" + ] + } + ], "source": [ - "dataset_dir = f\".\\Labellerr_datasets\\{dataset_id}\"" + "from pathlib import Path\n", + "\n", + "dataset_dir = Path(f\".\\\\Labellerr_datasets\\\\{dataset_id}\")\n", + "\n", + "if dataset_dir.exists():\n", + " print(\"Path exists ✅\")\n", + "else:\n", + " print(\"Path does not exist ❌\")\n" ] }, { @@ -937,7 +880,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.14.0" + "version": "3.12.0" } }, "nbformat": 4,