Skip to content

Edge-case image RI: target-accepted batching, scale switch, config guides, full-scale outputs - #77

Merged
arvinAM17 merged 8 commits into
mainfrom
docs/edge-case-image-generation-polish
Sep 29, 2026
Merged

arvinAM17 merged 8 commits into
mainfrom
docs/edge-case-image-generation-polish

Conversation

@arvinAM17

@arvinAM17 arvinAM17 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • NB2 generates until each class reaches TARGET_ACCEPTED accepted images, with a per-class MAX_ATTEMPTS budget and 10% oversampling. It uses unused scenes before reusing old ones, and reports honestly when a target isn't reached.
  • scale in configs/config.yaml shrinks the NB0 download and the NB2/NB3 counts together (0.2 = bootcamp small mode).
  • Short "where to change it" notes throughout the notebooks for bringing your own dataset or local images, anomalies, editor, detector, and judge/API, plus a config map in the README.
  • Full-scale outputs: 1110 images, 200 accepted synthetic images in about 157 minutes. On the held-out real test, traffic-cone AP50 goes 0.245 → 0.321 at +50% synth and 0.253 at +100%.
    Clickup Ticket(s): Link(s) if applicable.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test improvements
  • 🔒 Security fix

Changes Made

  • NB2 generates until each class reaches TARGET_ACCEPTED accepted images, with a per-class MAX_ATTEMPTS budget and 10% oversampling. It uses unused scenes before reusing old ones, and reports honestly when a target isn't reached.
  • scale in configs/config.yaml shrinks the NB0 download and the NB2/NB3 counts together (0.2 = bootcamp small mode).
  • Short "where to change it" notes throughout the notebooks for bringing your own dataset or local images, anomalies, editor, detector, and judge/API, plus a config map in the README.
  • Full-scale outputs: 1110 images, 200 accepted synthetic images in about 157 minutes. On the held-out real test, traffic-cone AP50 goes 0.245 → 0.321 at +50% synth and 0.253 at +100%.
    Clickup Ticket(s): Link(s) if applicable.

Testing

  • Tests pass locally (uv run pytest tests/)
  • Type checking passes (uv run mypy <src_dir>)
  • Linting passes (uv run ruff check src_dir/)
  • Manual testing performed (describe below)

Manual testing details:

Screenshots/Recordings

Related Issues

Deployment Notes

Checklist

  • Code follows the project's style guidelines
  • Self-review of code completed
  • Documentation updated (if applicable)
  • No sensitive information (API keys, credentials) exposed

Arvin Azarmina and others added 8 commits September 23, 2026 13:26
…/novelty plot, docs polish

- NB2 batch now aims for TARGET_ACCEPTED accepted images per class with a
  per-class MAX_ATTEMPTS budget; classes below target revisit their seed pool
  with new variations, and the run reports classes that miss the target.
- Record every judged edit (checkpoint/judged.jsonl) and add a
  fidelity-vs-novelty plot on the CLIP embedding proxies.
- Batch summary (target, accepted, attempts, retries, rejects, rate, elapsed).
- README conceptual overview; NB0.5 callout; NB1 multi-signal wording.
- CLI: --target-accepted / --max-attempts.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Seed pools are drawn by cursor: first round target x (1 + oversample)
  fresh scenes; later rounds (1 + oversample) x deficit / rate, filled by
  retries then unused scenes, reusing scenes only when the pool runs out.
- Summary reports scenes new/reused/pool per class; resume restores
  in-flight items instead of re-queuing the whole pool.
- extract_max_generic 320 -> 1000 with an NB0 top-up (only missing scenes
  are downloaded); NB2 pools 300 scenes per class.
- pick_synth_seeds shrinks pools to the clean scenes available instead of
  seeding from scenes that already contain a rare object.
- CLI: --oversample, --n-synth-seeds default 300.

Co-authored-by: Cursor <cursoragent@cursor.com>
…P PCA

The scatter collapsed onto the diagonal because the neighbor bank includes
the real images (neighbor_sim >= real_sim). Show per-class histograms of each
gate signal with its threshold, plus a 2-D PCA of real vs judged CLIP vectors.
Judged-edit and real-bank vectors are now persisted in the checkpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
- configs/config.yaml: scale multiplies the NB0 Mapillary download and the
  NB2/NB3 counts (0.2 = bootcamp small mode); scaled() helper in config.
- Notebooks: short 'where to change it' notes above config-driven cells
  (dataset/local images, anomalies, editor, detector, judge/API, NB3 knobs).
- NB2: drop the embedding plot cells for now (library code kept).

Co-authored-by: Cursor <cursoragent@cursor.com>
- NB2: replace runtime estimate with the measured full-scale run (484 edits, ~157 min).
- NB3: runtime note for 200 synth; wrap-up states what the committed run shows.
- NB0.5/NB1: tidy runtime callouts; drop internal 'slice B/C' labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@arvinAM17
arvinAM17 requested a review from fatemetkl September 28, 2026 03:35
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: VectorInstitute/synthetic-data-bootcamp/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a5f375e3-7b7a-4d4f-9382-5a23221c7056


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fatemetkl fatemetkl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Notebooks run with no issues!

@arvinAM17
arvinAM17 merged commit d9b1a99 into main Sep 29, 2026
3 checks passed
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