birdfsd_yolov5.label_studio_helpers package
Submodules
birdfsd_yolov5.label_studio_helpers.add_and_sync_new_project module
- birdfsd_yolov5.label_studio_helpers.add_and_sync_new_project.add_and_sync_data_storage(project_id: int, project_name: str, s3_endpoint_scheme: str = 'https://') dict[source]
Add the new project to label-studio, then sync its local data.
- Parameters
project_id (str) – The id of the project to add the storage to.
project_name (str) – The name of the project to add the storage to.
s3_endpoint_scheme (str) – The scheme to use for the s3 endpoint. Defaults to ‘https://’.
- Returns
The response from the sync request.
- Return type
dict
- birdfsd_yolov5.label_studio_helpers.add_and_sync_new_project.add_new_project(new_project_folder_name: str) Optional[dict][source]
Creates a new project in Label Studio.
- Parameters
new_project_folder_name (str) – The name of the new project.
- Returns
The new project’s metadata.
- Return type
dict
- Raises
ValueError – If the project already exists.
birdfsd_yolov5.label_studio_helpers.create_rare_classes_view module
birdfsd_yolov5.label_studio_helpers.generate_patch_label_name_queries module
- birdfsd_yolov5.label_studio_helpers.generate_patch_label_name_queries.generate_queries(from_string: str, to_string: str) None[source]
Generate queries to update the database for replacing old label names.
- Parameters
from_string (str) – The string to be replaced.
to_string (str) – The string to replace with.
- Returns
None
birdfsd_yolov5.label_studio_helpers.sync_tasks module
birdfsd_yolov5.label_studio_helpers.utils module
- birdfsd_yolov5.label_studio_helpers.utils.get_all_projects_tasks(dump: Optional[Union[bool, str]] = None, get_predictions_instead: bool = False)[source]
Get all the tasks from all projects from the database.
The function gets all the tasks from the MongoDB database. returns a list of dictionaries, each dictionary containing the project name and the tasks associated with it.
- Parameters
dump (Optional[Union[bool, str]]) – The JSON file containing the database dump.
get_predictions_instead (bool) – If True, the function returns the predictions instead of the actual tasks.
- Returns
- A list of dictionaries, each dictionary containing the project
name and the tasks associated with it.
- Return type
list