- Print
- DarkLight
Connect Backblaze B2 to CVAT
- Print
- DarkLight
If your team annotates in CVAT and stores raw images or video elsewhere, you can point a CVAT project directly at a Backblaze B2 Cloud Storage bucket instead of copying files between systems.
Connecting Backblaze B2 to CVAT lets you:
Keep raw media and annotation output in the same bucket, instead of syncing between two storage systems.
Remove the manual export step between CVAT and whatever trains on the data next.
Reuse existing S3 tooling and scripts, since Backblaze B2 uses the S3 API.
Prerequisites
Make sure the following prerequisites are in place before you begin.
Backblaze B2 enabled on your account.
A Backblaze B2 bucket, noting the endpoint URL.
The endpoint is region-specific. If you migrate the bucket or create a new one in a different region, the endpoint URL changes too. Copying an old endpoint into a new storage connection produces an authentication error that has nothing to do with the credentials.A Backblaze B2 application key scoped to the bucket you just created.
Save the keyID and matching applicationKey when you create it; Backblaze shows the applicationKey only once.A CVAT account.
Upload your Data
You can attach an empty bucket and upload later, but if your dataset is ready now, upload it before you configure CVAT so you can confirm the connection is pulling real files.
The manifest file (manifest.jsonl) is optional but worth including if you want faster task creation later; CVAT uses it to avoid scanning the whole bucket. You can drag files directly into the bucket through the Backblaze web console, or use the Backblaze CLI if you are scripting the upload.
See the CVAT Attach cloud storage guide for more information.
Attach the bucket in CVAT
CVAT does not have a dedicated "Backblaze B2" option in its provider dropdown. Backblaze B2 is S3-compatible, so you attach it by selecting Amazon S3 as the provider and pointing CVAT at your Backblaze B2 endpoint instead of AWS's.
Sign in to CVAT.
From the top menu, select Cloud storages, then select + (add) to create a new cloud storage connection.
Fill in the following fields:
Display name: Something your team will recognize
Description: Optional, but useful after you have more than one bucket connected
Provider: Amazon S3 (there is no separate Backblaze B2 option)
Bucket name: The name of your Backblaze B2 bucket
Authentication type: Key ID and secret access key pair
Access key ID: The keyID from your application key
Secret access key: The applicationKey from your application key
Endpoint URL: Your S3-compatible endpoint (for example, https://s3.us-west-004.backblazeb2.com)
Prefix: Optional. Use it if you want CVAT limited to one folder inside the bucket rather than the whole thing.
Region: Optional. Some CVAT versions include a Region field when adding the storage. If yours does, add or select the Backblaze B2 region shown in your bucket's endpoint URL, for example Key: us-west-004, Name: US West 004 (Backblaze B2).
Manifests: Optional. If you uploaded a manifest.jsonl, add it here so CVAT does not have to enumerate the bucket contents on its own.
Select Submit.
Confirm the connection by browsing the bucket's contents from inside CVAT.
Create a Task from the Bucket
After the storage is attached, it behaves like any other cloud storage source in CVAT. Create a new task, select your Backblaze B2 bucket as the data source, then select at least one image or video from the bucket; attaching the storage connection alone does not add any files to the task. If you added a manifest file, task creation should be noticeably faster, since CVAT does not have to list every object in the bucket first.
See the CVAT Tasks guide for more information.
Next Steps
Learn more about other Backblaze integrations and developer examples at Backblaze Labs.
Resources
Help us improve this guide. If you find an error, notice outdated information, or have suggestions for improvement, email techpubs@backblaze.com.