@@ -3,8 +3,110 @@ Setup Project
33=============
44
55
6- Creating a project
7- ------------------
6+ Creating a Multimodal project
7+ ------------------------------
8+
9+ For Multimodal projects you **must ** provide a ``form `` JSON object that
10+ conforms to SuperAnnotate's Multimodal form template schema. The form
11+ defines the project's UI layout and component behavior in the Multimodal
12+ Form Editor.
13+
14+ .. code-block :: python
15+
16+ minimal_form = {
17+ " components" : [
18+ {
19+ " id" : " component_id_0" ,
20+ " type" : " select" ,
21+ " permissions" : [],
22+ " hasTooltip" : False ,
23+ " label" : " Select" ,
24+ " isRequired" : False ,
25+ " value" : [],
26+ " options" : [
27+ {" value" : " Partially complete, needs review" , " checked" : False },
28+ {" value" : " Incomplete" , " checked" : False },
29+ {" value" : " Complete" , " checked" : False },
30+ {" value" : " 4" , " checked" : False }
31+ ],
32+ " exclude" : False ,
33+ " isMultiselect" : True ,
34+ " placeholder" : " Select"
35+ },
36+ {
37+ " id" : " component_id_1" ,
38+ " type" : " input" ,
39+ " permissions" : [],
40+ " hasTooltip" : False ,
41+ " label" : " Text input" ,
42+ " placeholder" : " Placeholder" ,
43+ " isRequired" : False ,
44+ " value" : " " ,
45+ " min" : 0 ,
46+ " max" : 300 ,
47+ " exclude" : False
48+ },
49+ {
50+ " id" : " component_id_2" ,
51+ " type" : " number" ,
52+ " permissions" : [],
53+ " hasTooltip" : False ,
54+ " label" : " Number" ,
55+ " exclude" : False ,
56+ " isRequired" : False ,
57+ " value" : None ,
58+ " min" : None ,
59+ " max" : None ,
60+ " step" : 1
61+ }
62+ ],
63+ " code" : " " ,
64+ " environments" : []
65+ }
66+
67+ response = sa.create_project(
68+ project_name = " My Multimodal Project" ,
69+ project_description = " Example multimodal project created via SDK" ,
70+ project_type = " Multimodal" ,
71+ form = minimal_form
72+ )
73+
74+ After creating the project, you can create folders and generate items:
75+
76+ .. code-block :: python
77+
78+ # Create a new folder in the project
79+ sa.create_folder(
80+ project = " My Multimodal Project" ,
81+ folder_name = " First Folder"
82+ )
83+
84+ # Generate multiple items in the specific project and folder
85+ # If there are no items in the folder, it will generate a blank item
86+ # otherwise, it will generate items based on the Custom Form
87+ sa.generate_items(
88+ project = " My Multimodal Project/First Folder" ,
89+ count = 10 ,
90+ name = " My Item"
91+ )
92+
93+ To upload annotations to these items:
94+
95+ .. code-block :: python
96+
97+ annotations = [
98+ # list of annotation dicts
99+ ]
100+
101+ sa.upload_annotations(
102+ project = " My Multimodal Project/First Folder" ,
103+ annotations = annotations,
104+ keep_status = True ,
105+ data_spec = " multimodal"
106+ )
107+
108+ Creating a Vector project
109+ --------------------------
8110
9111To create a new "Vector" project with name "Example Project 1" and description
10112"test":
@@ -17,7 +119,7 @@ To create a new "Vector" project with name "Example Project 1" and description
17119
18120
19121 Uploading images to project
20- ---------------------------
122+ ===========================
21123
22124
23125To upload all images with extensions "jpg" or "png" from the
@@ -42,7 +144,7 @@ See the full argument options for
42144
43145
44146Creating a folder in a project
45- ______________________________
147+ ==============================
46148
47149To create a new folder "folder1" in the project "Example Project 1":
48150
@@ -63,7 +165,7 @@ point to that folder with slash after the project name, e.g.,
63165 sa.upload_images_from_folder_to_project(project + " /folder1" , " <local_folder_path>" )
64166
65167 Working with annotation classes
66- _______________________________
168+ ===============================
67169
68170An annotation class for a project can be created with SDK's:
69171
@@ -94,7 +196,7 @@ The :file:`classes.json` file will be downloaded to :file:`"<path_to_local_folde
94196
95197
96198Working with annotations
97- ________________________
199+ ========================
98200
99201
100202The SuperAnnotate format annotation JSONs have the general form:
@@ -154,7 +256,7 @@ already be present in the project for the upload to work.
154256
155257
156258Exporting projects
157- __________________
259+ ==================
158260
159261To export the project annotations we need to prepare the export first:
160262
0 commit comments