Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
minversion = 3.0
log_cli=true
python_files = test_*.py
;addopts = -n auto --dist=loadscope
addopts = -n auto --dist=loadscope
10 changes: 5 additions & 5 deletions src/superannotate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
attach_document_urls_to_project,
)
from superannotate.lib.app.interface.sdk_interface import attach_image_urls_to_project
from superannotate.lib.app.interface.sdk_interface import attach_items_from_integrated_storage
from superannotate.lib.app.interface.sdk_interface import (
attach_items_from_integrated_storage,
)
from superannotate.lib.app.interface.sdk_interface import attach_video_urls_to_project
from superannotate.lib.app.interface.sdk_interface import benchmark
from superannotate.lib.app.interface.sdk_interface import clone_project
Expand Down Expand Up @@ -105,9 +107,7 @@
from superannotate.lib.app.interface.sdk_interface import (
upload_preannotations_from_folder_to_project,
)
from superannotate.lib.app.interface.sdk_interface import (
upload_priority_scores,
)
from superannotate.lib.app.interface.sdk_interface import upload_priority_scores
from superannotate.lib.app.interface.sdk_interface import upload_video_to_project
from superannotate.lib.app.interface.sdk_interface import (
upload_videos_from_folder_to_project,
Expand Down Expand Up @@ -159,6 +159,7 @@
"clone_project",
"share_project",
"delete_project",
"rename_project",
"upload_priority_scores",
# Images Section
"search_images",
Expand Down Expand Up @@ -215,7 +216,6 @@
"run_prediction",
"search_models",
"download_model",
"rename_project",
"set_image_annotation_status",
"benchmark",
"consensus",
Expand Down
1 change: 1 addition & 0 deletions src/superannotate/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@

def get_default_controller():
from lib.infrastructure.controller import Controller

return Controller.get_default()
9 changes: 8 additions & 1 deletion src/superannotate/lib/app/annotation_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@ def add_annotation_comment_to_json(
):
"""Add a comment to SuperAnnotate format annotation JSON


:param annotation_json: annotations in SuperAnnotate format JSON or filepath to JSON
:type annotation_json: dict or Pathlike (str or Path)

:param comment_text: comment text
:type comment_text: str

:param comment_coords: [x, y] coords
:type comment_coords: list

:param comment_author: comment author email
:type comment_author: str

:param resolved: comment resolve status
:type resolved: bool
"""
Expand Down Expand Up @@ -106,12 +109,16 @@ def add_annotation_bbox_to_json(

:param annotation_json: annotations in SuperAnnotate format JSON or filepath to JSON
:type annotation_json: dict or Pathlike (str or Path)

:param bbox: 4 element list of top-left x,y and bottom-right x, y coordinates
:type bbox: list of floats

:param annotation_class_name: annotation class name
:type annotation_class_name: str

:param annotation_class_attributes: list of annotation class attributes
:type annotation_class_attributes: list of 2 element dicts

:param error: if not None, marks annotation as error (True) or no-error (False)
:type error: bool
"""
Expand Down
6 changes: 5 additions & 1 deletion src/superannotate/lib/app/interface/cli_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ def _upload_annotations(
):
project_folder_name = project
project_name, folder_name = split_project_path(project)
project = Controller.get_default().get_project_metadata(project_name=project_name).data
project = (
Controller.get_default()
.get_project_metadata(project_name=project_name)
.data
)
if not format:
format = "SuperAnnotate"
if not dataset_name and format == "COCO":
Expand Down
Loading