Repository navigation
Decouple annotation and data directory structure #1685
Description
Is your feature request related to a problem? If so, Please describe.
We have GCP buckets full of data. The data are not VIAME/DIVE-specific. They are just videos and images of fish or coral or whatever. The data aren't set up to specifically back a DIVE instance, they are just data. We also have annotations, generated through some means, either manual, with a VIAME model, or with another model. At annotation creation time, we take note of the URL of the video/image, and we log that into the annotations. The annotations are actually not stored near the data, but in a separate bucket. This is because a single video may have multiple sources of annotations - e.g. from multiple models that we want to compare, from a human, etc.
When we import the data into DIVE, it seems that DIVE expects the video/imagery and the annotations to be near each other in some particular fashion. This seems to apply whether we are importing CSV data, or COCO.json data, imagery or videos - although the particular mechanism is different in each case, the general need to arrange our files in a particular fashion seems to be a common thread.
Perhaps we are missing something, and you can advise? How can we have one bucket full of data, another bucket with annotations, and load these into DIVE through GIRDER without having to move them around?
Describe the solution you'd like
DIVE seems to anticipate hard-coded relative paths to images/videos. To contrast, we have a labelstudio instance as well and it has a path field:
"""
{
"id": 332,
"data": {
"image": "gs://nmfs-dev-uc1-pifsc/SFM03/AIML/training_imagery/ESA_AGLO/raw/OCC-TUT-001_2023_27.JPG"
},
"annotations": [
{..........
"""
Common formats like COCO have a few fields that could be useful. VIAME CSV has a file field, as well, at least for images (the 2nd column, I think).
How difficult do you think it would be to un-hard-code this behavior, so that we could specify a relative or absolute URL for the images/videos? Right now, we are faced with the prospect of having to maintain multiple copies of rather large datasets to work around this. I think that the kwcoco data structure supports this sort of thing, so that might be useful here.
Describe alternatives you've considered
We are currently copying the entire dataset and annotations from their original location into a DIVE-specific directory. This is unfortunate, because these datasets are large, so making multiple copies of them is expensive.
Activity
BryonLewis commentedon Jun 14, 2026
The quickest path for something like this to work would involve something like the following:
User Experience
Technical Details
/dive_rpc/import_bucket_annotations/{AnnotationfolderId}- with a parameter of the destination folder Id.Test Data Generation
./samples/scripts/assetStoreImportfolder update the script to generate and load into MinIO decoupled datagenerateSampleData.pyscript to make it so it could have an option to generate two folders instead of a folder with sibiling annotation data./mediaand that would contain the hierarchy of video/image-sequences./annotationsand this would contain annotations for corresponding files in the media folder. The difference would be that for CSV and COCO JSON instead of using relative paths and filenames it will use some sort of minIO, gs, or s3 based reference.minIOConfig.pyscript I would need an option to hose separated media and annotations and instead of creating a single bucket it would create two buckets (prbobably the same access/secret keys to make it easier) and these would be imported into MinIO for testing purposesModification to AssetStore Import Logic
REST Endpoint
/dive_rpc/sync_bucket_annotations/AnnotationFolderIdUI Implementation
I'm not sure on this yet, but we need some UI for this to work instead of using the Swagger WebUI or REST endpoints. I'm not sure if I want to make this button happen in Girder or in the DIVE Admin interface.
The main idea is that you have a dialog come up where you navigate to the media folder and you navigat to the annotation folder and hit import and it imports the data.
csbrown-noaa commentedon Jun 15, 2026
Sounds like a heavy lift as is. Will discuss with the team. @BryonLewis thanks for the insights here.
BryonLewis commentedon Jun 15, 2026
This was more just some planning information for myself, I just wanted to store it with the issue for referencing.
csbrown-noaa commentedon Jun 15, 2026
This is super useful info for us. We're always trying to optimize the limited resources we have for development. Thanks for planning this out so thoroughly.