Skip to content

feat(commands): add --upload flag to load images and fix i2MAP extractor - #72

Merged
danellecline merged 7 commits into
mainfrom
feat/uploadsdcat
Jul 14, 2026
Merged

feat(commands): add --upload flag to load images and fix i2MAP extractor#72
danellecline merged 7 commits into
mainfrom
feat/uploadsdcat

Conversation

@danellecline

Copy link
Copy Markdown
Member

Summary

  • Add --upload flag to aidata load images to send image bytes directly to Tator (no mount/web server needed); transcoding is triggered automatically via tator.util.upload_media
  • Fix tap_i2map_media extractor to correctly extract depth from three filename conventions (_200m_, Z0200m-, -200m-) and handle missing values without crashing
  • Fix load images --upload path to use the live Tator attribute schema so iso_datetime, depth, and other metadata are forwarded correctly
  • Remove the short-lived load sdcat command (loader is configured via plugin in config.yml)

Closes #71

Test plan

  • aidata load images --upload --dry-run — confirmed 2242 images found, no crash
  • aidata load images --upload --max-images 10 — confirmed 10 images uploaded with media IDs assigned
  • Depth extraction verified for all three i2MAP filename formats via regex unit test
  • iso_datetime and depth attributes confirmed forwarded to Tator after attribute mapping fix

danellecline and others added 7 commits July 13, 2026 14:28
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>
@danellecline danellecline added the enhancement New feature or request label Jul 13, 2026
@danellecline danellecline linked an issue Jul 13, 2026 that may be closed by this pull request
@danellecline
danellecline merged commit 3bef54a into main Jul 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add image upload from SDCAT formatted file

1 participant