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
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ History

All release highlights of this project will be documented in this file.

4.4.38 - August 20, 2025
________________________

**Updated**

- ``SAClient.create_project`` now supports template uploads for Multimodal projects with the addition of a new ``form`` parameter.
- ``SAClient.upload_video_to_project`` should install ``ffmpeg-python`` manually for the function.
- ``SAClient.upload_videos_from_folder_to_project`` should install ``ffmpeg-python`` manually for the function.


4.4.37 - July 18, 2025
______________________

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ opencv-python-headless~=4.7
packaging~=24.0
plotly~=5.14
pandas~=2.0
ffmpeg-python~=0.2
pillow>=9.5,~=10.0
tqdm~=4.66
requests==2.*
aiofiles==23.*
fire==0.4.0
mixpanel==4.8.3
superannotate-schemas==1.0.49
superannotate-schemas==1.0.49
2 changes: 1 addition & 1 deletion src/superannotate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys


__version__ = "4.4.37"
__version__ = "4.4.38"


os.environ.update({"sa_version": __version__})
Expand Down
48 changes: 38 additions & 10 deletions src/superannotate/lib/app/interface/sdk_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,35 +1131,40 @@ def create_project(
workflows: Any = None,
instructions_link: str = None,
workflow: str = None,
form: dict = None,
):
"""Create a new project in the team.
"""Creates a new project in the team. For Multimodal projects, you must provide a valid form object,
which serves as a template determining the layout and behavior of the project's interface.

:param project_name: the new project's name
:param project_name: The new project's name.
:type project_name: str

:param project_description: the new project's description
:param project_description: The new project's description.
:type project_description: str

:param project_type: the new project type, Vector, Pixel, Video, Document, Tiled, PointCloud, Multimodal.
:param project_type: The project type. Supported types: 'Vector', 'Pixel', 'Video', 'Document', 'Tiled', 'PointCloud', 'Multimodal'.
:type project_type: str

:param settings: list of settings objects
:type settings: list of dicts

:param classes: list of class objects
:param classes: List of class objects. Not allowed for 'Multimodal' projects.
:type classes: list of dicts

:param workflows: Deprecated
:param workflows: Deprecated. Do not use.
:type workflows: list of dicts

:param workflow: the name of the workflow already created within the team, which must match exactly.
If None, the default “System workflow” workflow will be set.
:param workflow: Name of the workflow already created within the team (must match exactly). If None, the default "System workflow" will be used.
:type workflow: str

:param instructions_link: str of instructions URL
:param instructions_link: URL for project instructions.
:type instructions_link: str

:return: dict object metadata the new project
:param form: Required for Multimodal projects. Must be a JSON object that conforms to SuperAnnotate’s schema
for Multimodal form templates, as used in the Multimodal Form Editor.
:type form: dict

:return: Metadata of the newly created project.
:rtype: dict
"""
if workflows is not None:
Expand All @@ -1172,6 +1177,16 @@ def create_project(
settings = parse_obj_as(List[SettingEntity], settings)
else:
settings = []
if ProjectType(project_type) == ProjectType.MULTIMODAL:
if not form:
raise AppException(
"A form object is required when creating a Multimodal project."
)
if classes is not None:
raise AppException(
"Classes cannot be provided for Multimodal projects."
)
settings.append(SettingEntity(attribute="TemplateState", value=1))
if classes:
classes = parse_obj_as(List[AnnotationClassEntity], classes)
project_entity = entities.ProjectEntity(
Expand All @@ -1194,6 +1209,13 @@ def create_project(
project_response = self.controller.projects.create(project_entity)
project_response.raise_for_status()
project = project_response.data
if form:
form_response = self.controller.projects.attach_form(project, form)
try:
form_response.raise_for_status()
except AppException:
self.controller.projects.delete(project)
raise
if classes:
classes_response = self.controller.annotation_classes.create_multiple(
project, classes
Expand Down Expand Up @@ -2392,6 +2414,9 @@ def upload_videos_from_folder_to_project(
"""Uploads image frames from all videos with given extensions from folder_path to the project.
Sets status of all the uploaded images to set_status if it is not None.

.. note::
Only works on Image projects.

:param project: project name or folder path (e.g., "project1/folder1")
:type project: str

Expand Down Expand Up @@ -2486,6 +2511,9 @@ def upload_video_to_project(
"""Uploads image frames from video to platform. Uploaded images will have
names "<video_name>_<frame_no>.jpg".

.. note::
Only works on Image projects.

:param project: project name or folder path (e.g., "project1/folder1")
:type project: str

Expand Down
5 changes: 5 additions & 0 deletions src/superannotate/lib/core/entities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from lib.core.entities.items import PROJECT_ITEM_ENTITY_MAP
from lib.core.entities.items import TiledEntity
from lib.core.entities.items import VideoEntity
from lib.core.entities.multimodal_form import FormModel
from lib.core.entities.multimodal_form import generate_classes_from_form
from lib.core.entities.project import AttachmentEntity
from lib.core.entities.project import ContributorEntity
from lib.core.entities.project import CustomFieldEntity
Expand Down Expand Up @@ -55,4 +57,7 @@
"UserEntity",
"IntegrationEntity",
"PROJECT_ITEM_ENTITY_MAP",
# multimodal
"FormModel",
"generate_classes_from_form",
]
Loading
Loading