Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOAA Upload Script #1358

Merged
merged 10 commits into from
Aug 3, 2023
Merged

NOAA Upload Script #1358

merged 10 commits into from
Aug 3, 2023

Conversation

BryonLewis
Copy link
Collaborator

@BryonLewis BryonLewis commented Jul 26, 2023

This is a script for NOAA to import their mirrored bucket annotations into their system. I'm going to deliver it directly to them but I feel it should be included in the repo as a reference point for others who may want to utilize similar features of girder-client.

  • Allows specifying a GirderId for a root folder and local mounted folder location to mirror. It will then upload the annotations to the mirrored directory structure in the system.
  • ImageSet Structure is :
    • ./bucket-name-images/platform/date/ID/imageType/images/Dir0001
    • ./bucket-name-images/platform/date/ID/imageType/images/Dir0002
    • ./bucket-name-images/platform/date/ID/imageType/images/Dir0003
  • Annotation Struture is:
    • ./bucket-name-annotations/platform/date/ID/imageType/images/ANNOTATIONS
    • ./bucket-name-images/platform/date/ID/imageType/images/ANNOTATIONS/unlabled/annotations-Dir0001.csv
    • ./bucket-name-images/platform/date/ID/imageType/images/ANNOTATIONS/unlabled/annotations-Dir0002.csv
    • ./bucket-name-images/platform/date/ID/imageType/images/ANNOTATIONS/unlabled/annotations-Dir0003.csv

TODO:

  • Modify the current setup to support this new structure. I would probably make it so you input the /images/ directory on girder and reference the ANNOTATIONS folder locally and it will go through and match the annotations and Directory name to the image sequence names.
  • Add capability to clone videos to public folder for easier organization, or possibly clone to a specified folder.
  • Add support for specific keys in the annotation files that will cause it to clone the dataset instead of uploading directly.
  • Create an explanation video about how it works

For reference I also ran our poetry tox -e format ../samples/scripts and that's why the uploadScript.py has been modified

SmallUpload.mp4

@BryonLewis BryonLewis marked this pull request as ready for review July 31, 2023 11:47
@click.argument(
"folder"
) # a local folder to search for mp4 video files and json/csv files.
@click.argument("girder_id", required=False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the girder id is actually optional.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was leftover from the earlier version when I had the girder_id specified in global variables. I'll change it.

samples/scripts/syncAnnotationsScript.py Outdated Show resolved Hide resolved
samples/scripts/syncAnnotationsScript.py Outdated Show resolved Hide resolved
samples/scripts/syncAnnotationsScript.py Outdated Show resolved Hide resolved
samples/scripts/syncAnnotationsScript.py Show resolved Hide resolved
samples/scripts/syncAnnotationsScript.py Outdated Show resolved Hide resolved
BryonLewis and others added 5 commits August 2, 2023 15:51
Co-authored-by: Mary Salvi <40494088+marySalvi@users.noreply.github.com>
Co-authored-by: Mary Salvi <40494088+marySalvi@users.noreply.github.com>
Co-authored-by: Mary Salvi <40494088+marySalvi@users.noreply.github.com>
Co-authored-by: Mary Salvi <40494088+marySalvi@users.noreply.github.com>
Copy link
Collaborator

@marySalvi marySalvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BryonLewis BryonLewis merged commit f898b48 into main Aug 3, 2023
4 checks passed
@BryonLewis BryonLewis deleted the noaa-upload-script branch August 3, 2023 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants