birdfsd_yolov5.label_studio_helpers package
Submodules
birdfsd_yolov5.label_studio_helpers.add_and_sync_new_project module
- 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.create_rare_classes_view module
birdfsd_yolov5.label_studio_helpers.generate_patch_label_name_queries module
birdfsd_yolov5.label_studio_helpers.sync_tasks module
birdfsd_yolov5.label_studio_helpers.utils module
- 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
birdfsd_yolov5.label_studio_helpers.watchdog module
- class WatchDog(root_data_folder: str, images_per_folder: int = 1000, debug: bool = False)[source]
Bases:
objectCreates new projects when a change is detected in the source folder.
This class is used to create a new folder for the images to be stored in. The folder name is based on the current time and date. The folder is created in the root data folder. The folder name is returned.