Import Projects to Active

The active_import method supports the following when importing Annotate Projects to Active:

  • project_mode: Specifies the type of import for the Annotate Project into Active:
    • ActiveProjectMode.DATA
    • ActiveProjectMode.LABEL
    • ActiveProjectMode.METRIC
    • ActiveProjectMode.ADVANCED
  • video_sampling_rate: OPTIONAL - Specifies the sampling rate (float value) in FPS for videos when importing into Active. If this attribute is not included, videos import at the default of 1 FPS.

from encord import EncordUserClient
from encord.orm.active import ActiveProjectImportPayload, ActiveProjectMode

SSH_PATH = "<file-path-to-ssh-private-key>"

PROJECT_ID = "<project-unique-id>"

user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path=SSH_PATH
)

project = user_client.get_project(PROJECT_ID)

# video_sampling_rate is optional
import_project = project.active_import(project_mode= ActiveProjectMode.<specify-project-import-type>, video_sampling_rate=<specify-float-value-for-video-import>)

Sync Projects to Active

Changes to Annotate Projects are not automatically synced to Active. Use active_sync to sync your Annotate Projects to your Active Projects.


from encord import EncordUserClient
from encord.orm.active import ActiveProjectImportPayload, ActiveProjectMode

SSH_PATH = "<file-path-to-ssh-private-key>"

PROJECT_ID = "<project-unique-id>"

user_client = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path=SSH_PATH
)

project = user_client.get_project(PROJECT_ID)

# Sync the Active Project
import_project = project.active_sync()