File tree Expand file tree Collapse file tree 4 files changed +30
-23
lines changed
Expand file tree Collapse file tree 4 files changed +30
-23
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ SuperAnnotate Python SDK allows access to the platform without web browser:
3030 from superannotate import SAClient
3131
3232
33- sa_client = SAClient()
33+ sa_client = SAClient()
3434
3535 project = ' Dogs'
3636
Original file line number Diff line number Diff line change @@ -48,26 +48,27 @@ To generate a default location (:file:`~/.superannotate/config.json`) config fil
4848
4949 ~/(home directory)
5050 └── .superannotate
51- ├── config.json
51+ ├── config.ini
5252
5353
5454:ref: `CLI init <ref_cli_init >` can be used:
5555
5656.. code-block :: bash
5757
58- superannotatecli init
58+ superannotatecli init < token >
5959
6060 Custom config file
6161~~~~~~~~~~~~~~~~~~~~~~
6262.. _ref_custom_config_file :
6363
64- To create a custom config file a new JSON file with key "token" can be created:
64+ To create a custom config file a new INI file with key "token" can be created:
6565
66- .. code-block :: json
66+ .. code-block :: ini
6767
68- {
69- "token" : " <team token>"
70- }
68+ [DEFAULT]
69+ SA_TOKEN = <token>
70+ LOGGING_LEVEL = INFO
71+ LOGGING_PATH = ~/.superannotate/logs
7172
7273
7374 Initialization and authorization
@@ -84,7 +85,7 @@ the :ref:`CLI init <ref_cli_init>`. Otherwise to authenticate SDK with the :ref:
8485
8586.. code-block :: python
8687
87- sa = SAClient(config_path = " <path_to_config_json >" )
88+ sa = SAClient(config_path = " <path_to_config_file >" )
8889
8990
9091
Original file line number Diff line number Diff line change @@ -103,19 +103,26 @@ The SuperAnnotate format annotation JSONs have the general form:
103103
104104 {
105105 "metadata" : {... }
106- "annotations " : [
106+ "instances " : [
107107 {
108- "className" : " Human" ,
109- "points" : " ..." ,
110- "..." : " ..."
108+ "type" : " polygon" ,
109+ "className" : " Jake" ,
110+ "points" : [... ],
111+ ...
111112 },
112113 {
113- "className" : " Cat" ,
114- "points" : " ..." ,
115- "..." : " ..."
114+ "type" : " bbox" ,
115+ "className" : " Finn" ,
116+ "points" : {
117+ "x1" : 437.16 ,
118+ "x2" : 465.23 ,
119+ "y1" : 341.5 ,
120+ "y2" : 357.09
121+ },
122+ ...
116123 },
117124 {
118- " ..." : " ... "
125+ ...
119126 }
120127 ]
121128
@@ -125,16 +132,15 @@ the "className" fields here will identify the annotation class of an annotation
125132object (polygon, points, etc.). The project
126133you are uploading to should contain annotation class with that name.
127134
128- To upload annotations to platform:
135+ :ref: ` To upload annotations to platform: < ref_upload_annotations_from_folder_to_project >`
129136
130137.. code-block :: python
131138
132139 sa.upload_annotations_from_folder_to_project(project, " <path_to_local_dir>" )
133140
134- This will try uploading to the project all the JSON files in the folder that have specific
135- file naming convention. For vector
136- projects JSONs should be named :file: `"<image_name>___objects.json" `. For pixel projects
137- JSON files should be named :file: `"<image_name>___pixel.json" ` and also for
141+
142+ This will try uploading to the project all the JSON files in the folder that have :file: `"<image_name>.json" ` postfix.
143+ For pixel projects JSON files should be named :file: `"<image_name>___pixel.json" ` and also for
138144each JSON a mask image file should be present with the name
139145:file: `"<image_name>___save.png" `. Image with :file: `<image_name> ` should
140146already be present in the project for the upload to work.
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ minversion = 3.7
33log_cli =true
44python_files = test_*.py
55pytest_plugins = [' pytest_profiling' ]
6- addopts = -n auto --dist =loadscope
6+ ; addopts = -n auto --dist=loadscope
77
You can’t perform that action at this time.
0 commit comments