diff --git a/README.md b/README.md index 51638891..ca8e6875 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ feeling for use cases for the package. ## Installation Using an environment manager such as -[Anaconda](https://www.anaconda.com/products/individual) or +[miniforge](https://github.com/conda-forge/miniforge) or [venv](https://docs.python.org/3/library/venv.html) to create a new Python environment before installing the Intel® Geti™ SDK and its requirements is highly recommended. diff --git a/geti_sdk/rest_clients/annotation_clients/base_annotation_client.py b/geti_sdk/rest_clients/annotation_clients/base_annotation_client.py index 5c7c0111..9f42b9b6 100644 --- a/geti_sdk/rest_clients/annotation_clients/base_annotation_client.py +++ b/geti_sdk/rest_clients/annotation_clients/base_annotation_client.py @@ -158,9 +158,13 @@ def __get_label_mapping(self, project: Project) -> Dict[str, str]: label_name = label.name project_label_name_to_label[label_name] = label - source_label_names = self.annotation_reader.get_all_label_names() + source_label_names = set(self.annotation_reader.get_all_label_names()) source_label_name_to_project_label_id: Dict[str, str] = {} - for source_label_name in source_label_names: + # We include the project label names in the mapping, as we want to ensure that + # we can match the labels from the source to the project labels. + for source_label_name in source_label_names.union( + project_label_name_to_label.keys() + ): if source_label_name in project_label_name_to_label: label_id = project_label_name_to_label[source_label_name].id elif (