Skip to main content

Project Objects

class Project(base_orm.BaseORM)
DEPRECATED - prefer using the encord.project.Project class instead. A project defines a label ontology and is a collection of datasets and label rows. ORM:
  • title,
  • description,
  • editor_ontology,
  • ontology_hash,
  • datasets::
    [
       {
            dataset_hash (uid),
            title,
            description,
            dataset_type (internal vs. AWS/GCP/Azure),
       },
       ...
    ],
  • label_rows::
    [
        {
            label_hash (uid),
            data_hash (uid),
            dataset_hash (uid),
            dataset_title,
            data_title,
            data_type,
            label_status
        },
        ...
    ]
  • annotation_task_status

get_labels_list

def get_labels_list() -> List[Optional[str]]
Returns a list of all optional label row IDs (label_hash uid) in a project. If no label_hash is found, a None value is appended. This can be useful for working with fetching additional label row data via get_label_rows() for example.

        project = client_instance.get_project(<project_hash>)
        project_orm = project.get_project()

        labels_list = project_orm.get_labels_list()
        created_labels_list = []
        for label in labels_list:
            if label is not None:  # None values will fail the operation
                created_labels_list.append(label)

        label_rows = project.get_label_rows(created_labels_list, get_signed_url=False)

workflow_manager_uuid

@property
def workflow_manager_uuid() -> UUID
Accessing this property will raise a WrongProjectTypeError if the project is not a workflow project.

ProjectDataset Objects

class ProjectDataset(BaseDTO)
Minimal information about a dataset attached to a project. Arguments:
  • dataset_hash - UUID of the dataset attached to the project.
  • title - Human-readable title of the dataset.
  • description - Description of the dataset.

ProjectType Objects

class ProjectType(str, Enum)
Type of Project. Values:
  • WORKFLOW: Standard workflow Project with stages such as ANNOTATE and REVIEW.
  • MANUAL_QA: Project configured for manual QA only.

ProjectStatus Objects

class ProjectStatus(str, Enum)
Lifecycle status of a Project. Values:
  • NOT_STARTED: The project has been created but no work has begun.
  • IN_PROGRESS: The project is active and annotation/review work is ongoing.
  • PAUSED: The project is temporarily paused.
  • COMPLETED: All work on the project has been completed.
  • CANCELLED: The project has been cancelled before completion.
  • ARCHIVED: The project is archived and no further work is expected.

ProjectCopyOptions Objects

class ProjectCopyOptions(str, Enum)
Options controlling what is copied when duplicating a project. Values:
  • COLLABORATORS: Copy project collaborators to the new project.
  • DATASETS: Copy or attach datasets to the new project.
  • MODELS: Copy model configuration and attachments.
  • LABELS: Copy labels associated with the project.

ReviewApprovalState Objects

class ReviewApprovalState(str, Enum)
Approval state of a label in review. Values:
  • APPROVED: Label has been reviewed and approved.
  • PENDING: Label is pending review or decision.
  • REJECTED: Label has been reviewed and rejected.
  • DELETED: Label has been removed.
  • NOT_SELECTED_FOR_REVIEW: Label was not selected for review.

CopyDatasetAction Objects

class CopyDatasetAction(str, Enum)
Strategy for handling datasets when copying a project. Values:
  • ATTACH: Attach the existing datasets from the original project to the copied project.
  • CLONE: Clone data units into a new dataset and attach that dataset to the copied project.

CopyDatasetOptions Objects

@dataclass
class CopyDatasetOptions()
Options for copying the datasets associated with a project.

action

One of CopyDatasetAction.ATTACH or CopyDatasetAction.CLONE. (defaults to ATTACH)

datasets_to_data_hashes_map

A dictionary of { <dataset_hash>: List[<data_unit_hash>]}. When provided with a CLONE action this will filter the copied data units. When combined with CopyLabelsOptions, only labels from specific data units will be copied.

CopyLabelsOptions Objects

@dataclass
class CopyLabelsOptions()
Options for copying the labels associated with a project.

accepted_label_hashes

A list of label hashes that will be copied to the new project

accepted_label_statuses

A list of label statuses to filter the labels copied to the new project, defined in ReviewApprovalState

CopyProjectPayload Objects

@dataclass
class CopyProjectPayload()
WARN: do not use, this is only for internal purpose.

ProjectWorkflowType Objects

class ProjectWorkflowType(Enum)
Workflow type for a project. Values:
  • MANUAL_QA: Manual QA workflow, where reviews are performed explicitly.
  • BENCHMARK_QA: Benchmark QA workflow, where annotators are presented with benchmark or honeypot data.

ManualReviewWorkflowSettings Objects

class ManualReviewWorkflowSettings()
Sets the project QA workflow to “manual reviews”. There are currently no available settings for this workflow

BenchmarkQaWorkflowSettings Objects

@dataclass
class BenchmarkQaWorkflowSettings()
Sets the project QA workflow to “Automatic”, with benchmark data being presented to all the annotators

source_projects

For Benchmark QA projects, a list of project ids (project_hash-es) that contain the benchmark source data

ProjectWorkflowSettings

A variant type that allows you to select the type of quality assurance workflow for the project, and configure it. Currently one of: ManualReviewWorkflowSettings: a workflow with optional manual reviews BenchmarkQaWorkflowSettings: annotators are presented with “benchmark” or “honeypot” data

ReviewMode Objects

class ReviewMode(str, Enum)
Values:
  • UNLABELLED: The labels are added to the images. However, the one person must still go over all of the labels before submitting them for review.
  • LABELLED: The labels are added to the images and are marked as labelled. A reviewer will still need to approve those.
  • REVIEWED: The labels are added to the images and considered reviewed. No more action is required from the labeler or reviewer.

CvatExportType Objects

class CvatExportType(str, Enum)
Type of CVAT export to generate. Values:
  • PROJECT: Export annotations at the project level.
  • TASK: Export annotations at the task level.

TaskPriorityParams Objects

class TaskPriorityParams(BaseDTO)
Parameters for updating task priorities in bulk. Arguments:
  • priorities - List of (task_hash, priority) tuples where task_hash identifies the task and priority is a floating-point priority value to assign.

ProjectDTO Objects

class ProjectDTO(BaseDTO)
Data transfer object representing a project. Arguments:
  • project_hash - UUID of the project.
  • project_type - Type of the project (workflow, manual QA, etc.).
  • status - Current lifecycle status of the project.
  • title - Human-readable title of the project.
  • description - Description of the project.
  • created_at - Timestamp when the project was created.
  • last_edited_at - Timestamp when the project was last modified.
  • ontology_hash - Identifier of the ontology associated with the project.
  • editor_ontology - Full ontology definition used by the project editor.
  • user_role - Role of the current user on this project, if known.
  • source_projects - Optional list of project identifiers that this project was derived from (for example, benchmark sources).
  • workflow_manager_uuid - UUID of the workflow manager associated with this project, if the project uses the workflow system.
  • workflow - Workflow definition for the project, if available.

CvatReviewMode Objects

class CvatReviewMode(CamelStrEnum)
Values:
  • UNLABELLED: The labels are added to the images. However, the one person must still go over all the labels before submitting them for review.
  • LABELLED: The labels are added to the images and are marked as labelled. A reviewer will still need to approve those.
  • REVIEWED: The labels are added to the images and considered reviewed. No more action is required from the labeler or reviewer.

CvatImportDataItem Objects

class CvatImportDataItem(BaseDTO)
Single data item entry in a CVAT import. Arguments:
  • data_path - Path to the data item in the original CVAT export.
  • data_link - URL or storage link to the data item accessible by Encord.
  • title - Human-readable title to use for the imported data item.

CvatImportStartPayload Objects

class CvatImportStartPayload(BaseDTO)
Payload for starting a CVAT import operation. Arguments:
  • annotations_base64 - Base64-encoded CVAT annotations file contents.
  • dataset_uuid - UUID of the target dataset to import annotations into.
  • review_mode - Review mode to apply to imported annotations.
  • data - List of data items to be imported from the CVAT export.
  • transform_bounding_boxes_to_polygons - If True, convert CVAT bounding boxes to polygons on import.

CvatImportGetResultParams Objects

class CvatImportGetResultParams(BaseDTO)
Parameters for polling the result of a CVAT import operation. Arguments:
  • timeout_seconds - Maximum number of seconds to wait for the import to complete before returning the current status.

CvatImportGetResultLongPollingStatus Objects

class CvatImportGetResultLongPollingStatus(str, Enum)
Status of a long-polling request for a CVAT import operation. Values:
  • DONE: The import has completed successfully.
  • ERROR: The import has failed. See the issues field in the response.
  • PENDING: The import is still in progress.

CvatImportGetResultResponse Objects

class CvatImportGetResultResponse(BaseDTO)
Response model for CVAT import operation status. Arguments:
  • status CvatImportGetResultLongPollingStatus - Import status (“DONE”, “ERROR”, “PENDING”)
  • project_uuid Optional[UUID] - Created project ID. Only present when status=“DONE”
  • issues Optional[Dict] - Import issues. Present for “DONE” (warnings) or “ERROR” (failures)

ProjectFilterParams Objects

class ProjectFilterParams(BaseDTO)
Filter parameters for the /v2/public/projects endpoint

SetProjectStatusPayload Objects

class SetProjectStatusPayload(BaseDTO)
Payload for updating the status of a project. Arguments: status:New status to set for the project.

GetProjectUsersPayload Objects

class GetProjectUsersPayload(BaseDTO)
Parameters for listing users on a project. Arguments:
  • page_token - Optional token for fetching the next page of users from a previous call.

ProjectUserResponse Objects

class ProjectUserResponse(BaseDTO)
This one should be merged with ProjectUser class But at the moment server doesn’t return “project_hash” field (which is correct I suppose), that ProjectUser expects TODO: deprecate project_hash field from ProjectUsers and merge this two together