Skip to content

Repository files navigation

Tank VOC Assistant

Small-target annotation helper for UAV tank images.

Design

  1. Read existing Pascal VOC XML files and keep them as hand-labeled seeds.
  2. Infer the 5-step layout cycle from filenames such as A001_...png.
  3. Generate draft boxes from:
    • seed anchors learned from existing XML files,
    • local contrast small-object candidates,
    • template matches from existing tank crops.
  4. Optionally ask a local multimodal model to select/check each candidate crop.
  5. Write review artifacts:
    • review.csv with coordinates, source, score, and VLM decision,
    • draft_contact_sheet.jpg with boxes overlaid.

For low-labor annotation, use --auto: the VLM checks several candidates around each expected anchor, keeps the first positive target, and drops confident false positives. The CSV remains a log, not the main review surface. If you prefer a conservative no-empty review pass, add --keep-rejected-anchors; rejected anchor candidates will be kept as red boxes for final human cleanup.

Commands

Analyze a folder:

python tank_voc_assistant.py analyze --image-dir "<image-folder>"

Smoke-test the first 10 images with the local VLM, without writing XML:

python tank_voc_assistant.py draft --image-dir "<image-folder>" --review-dir ".\review_auto_test" --limit 10 --dry-run --auto

Generate missing XML files next to images, preserving existing XML. This is the recommended low-labor mode:

python tank_voc_assistant.py draft --image-dir "<image-folder>" --review-dir ".\review_auto_full" --auto

Conservative variant that avoids empty XML files by keeping rejected anchor candidates as red boxes:

python tank_voc_assistant.py draft --image-dir "<image-folder>" --review-dir ".\review_auto_full_keep_rejected" --auto --keep-rejected-anchors

Audit mode only, without automatic VLM candidate selection:

python tank_voc_assistant.py draft --image-dir "<image-folder>" --review-dir ".\review_audit" --vlm-check

Repair only XML files that currently contain no objects. This keeps existing non-empty XML files untouched, checks candidates with the local VLM, writes repair.csv after every image, and renders repair_contact_sheet.jpg at the end:

python tank_voc_assistant.py repair --image-dir "<image-folder>" --review-dir ".\repair_empty" --empty-only --max-candidates 8 --vlm-timeout 45

If you want every empty XML to receive reviewable fallback boxes even when the VLM rejects every candidate, add --keep-best-when-empty:

python tank_voc_assistant.py repair --image-dir "<image-folder>" --review-dir ".\repair_empty_fallback" --empty-only --keep-best-when-empty --max-candidates 8 --vlm-timeout 45

Run a dry batch first:

python tank_voc_assistant.py repair --image-dir "<image-folder>" --review-dir ".\repair_empty_test" --empty-only --limit 5 --dry-run --max-candidates 8 --vlm-timeout 45

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages