feat(commands): add --upload flag to load images and fix i2MAP extractor - #72
Merged
Conversation
Add a new `load sdcat` CLI command that reads image paths from SDCAT formatted CSV files and loads them into Tator. Supports direct file upload via --upload flag or reference-only loading via a configured mount/URL mapping. Includes --section, --max-images, --dry-run, and --check-duplicates options. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the load sdcat command (loader is configured via plugin in config.yml). Add --upload flag to load images to support direct file upload to Tator, mirroring the existing --upload behaviour in load video. Without the flag the existing URL-reference flow is unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
…nput Co-authored-by: Cursor <cursoragent@cursor.com>
…t error Co-authored-by: Cursor <cursoragent@cursor.com>
…anscoding Replace gen_spec+load_bulk_images with tator.util.upload_media in the --upload path so image bytes are actually transferred to Tator and transcoding is triggered. Add upload_image helper to media.py. Handle int vs list response.id returned by tator.util.upload_media for images. Co-authored-by: Cursor <cursoragent@cursor.com>
…format Add pattern_depth_zform to tap_i2map_media.py so depth is extracted from filenames like 161012T170211Z0200m-F561_1_0.png (depth between Z and m-). Existing underscore-form pattern is unchanged. Also fix load images --upload path to use get_media_attributes instead of an empty dict so iso_datetime, depth, and other attributes are correctly forwarded to Tator. Co-authored-by: Cursor <cursoragent@cursor.com>
…ilenames Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--uploadflag toaidata load imagesto send image bytes directly to Tator (no mount/web server needed); transcoding is triggered automatically viatator.util.upload_mediatap_i2map_mediaextractor to correctly extractdepthfrom three filename conventions (_200m_,Z0200m-,-200m-) and handle missing values without crashingload images --uploadpath to use the live Tator attribute schema soiso_datetime,depth, and other metadata are forwarded correctlyload sdcatcommand (loader is configured via plugin inconfig.yml)Closes #71
Test plan
aidata load images --upload --dry-run— confirmed 2242 images found, no crashaidata load images --upload --max-images 10— confirmed 10 images uploaded with media IDs assignediso_datetimeanddepthattributes confirmed forwarded to Tator after attribute mapping fix