You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the CVAT API to export my task's annotations to a specific folder path that's already mounted on CVAT. It currently keeps uploading only to the base path gs://<bucket_name>.
def export_task_to_cloud(self, task_id: int, cloud_storage_id: int, device_id: str, date: str, format: str = "COCO 1.0") -> None:
"""Export task annotations to cloud storage"""
# Full path including device ID
storage_path = f"{device_id}/{date}/annotations"
filename = "annotations.json"
print(f"Initiating export for task {task_id} to gs://{storage_path}/{filename}")
# Modified export parameters
export_params = {
"format": format,
"location": "cloud_storage",
"cloud_storage_id": cloud_storage_id,
"filename": f"{storage_path}/{filename}",
"use_default_location": False
}
# Use annotations endpoint for just the annotations
export_response = self.session.get(
f"{self.base_url}/tasks/{task_id}/annotations",
params=export_params
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to use the CVAT API to export my task's annotations to a specific folder path that's already mounted on CVAT. It currently keeps uploading only to the base path gs://<bucket_name>.
Beta Was this translation helpful? Give feedback.
All reactions