diff --git a/README.md b/README.md index bd53c504c4302446fa4f026b3657c3408b9071fc..2b9d9d66ed5ac691bcd9b6efb0d05a5fc44335b6 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The Dataset Viewer has **2,400 image rows**, not 28,800 rows. `commands_json` co `results/primary-and-review-metrics.tar.gz` contains the exact primary score records and reviewer replay traces. These reproduce the reported metrics without cluster access. They do not replace a pixel-level model rerun. -Editable code and manuscript source are in [RefSeg_CA_R3_Public_Source.zip](release/RefSeg_CA_R3_Public_Source.zip). The current draft is [RefSeg_CA_MVA.pdf](release/RefSeg_CA_MVA.pdf). The requested GitHub mirror is `ethosai/RefSeg-CA`; its connection/publication is tracked separately and must not be assumed from this deposit. +Browse the [source code and editable manuscript](https://huggingface.co/datasets/Ethosoft/RefSeg-CA/tree/main/source) file by file, or download [RefSeg_CA_R3_Public_Source.zip](release/RefSeg_CA_R3_Public_Source.zip). The current draft is [RefSeg_CA_MVA.pdf](release/RefSeg_CA_MVA.pdf). Code and data are hosted together under the Ethosoft organization on Hugging Face. ## Construction and evaluation diff --git a/release/RefSeg_CA_MVA.pdf b/release/RefSeg_CA_MVA.pdf index 087bf478d3db60dac392de8fed4109dd80e64a11..45e8e2e79dd0d195a744515335e2d7bd699bfc01 100644 --- a/release/RefSeg_CA_MVA.pdf +++ b/release/RefSeg_CA_MVA.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c6c1a66432d1467b810e4fda419c847140ef8197bb28bbef078f7e5ab83c59d -size 2248845 +oid sha256:44a0bf44fdce2286b73eefab66ab9d4ee568c005015a4b5f2b57bcad122ce25d +size 2248838 diff --git a/release/RefSeg_CA_R3_Public_Source.zip b/release/RefSeg_CA_R3_Public_Source.zip index 92204990a2904959b42e4f7c7952181168de6eec..15d698414ebdaa7112622c7fad0fb0c9b3661f1a 100644 --- a/release/RefSeg_CA_R3_Public_Source.zip +++ b/release/RefSeg_CA_R3_Public_Source.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89a00b596a6b4deeca96fa084e990f91d1512da47a9f0e1342894bf2285118f3 -size 233530 +oid sha256:83888adbdba3b70954ce22cf850fcb07b7b873f2e69d3be22c189735f49e249a +size 233931 diff --git a/source/.gitignore b/source/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8385a4981e3e6811ac6a2c3e91f203709db5f305 --- /dev/null +++ b/source/.gitignore @@ -0,0 +1,15 @@ +build/ +cache/ +assets/ +vendor/ +__pycache__/ +*.pyc +.env* +*.token +data/rich/ +data/natural/ +results/r3/portable/ +*.aux +*.log +*.out +*.blg diff --git a/source/CITATION.cff b/source/CITATION.cff new file mode 100644 index 0000000000000000000000000000000000000000..d4617e4787b0372a764e5e0482dbc9c94001e911 --- /dev/null +++ b/source/CITATION.cff @@ -0,0 +1,19 @@ +cff-version: 1.2.0 +message: "Cite this unpublished manuscript and research software; no public DOI has been assigned." +title: "RefSeg-CA: evaluating and repairing command compliance in generalized referring segmentation" +type: software +version: "R3-major-revision" +date-released: "2026-09-08" +url: "https://huggingface.co/datasets/Ethosoft/RefSeg-CA" +repository-code: "https://huggingface.co/datasets/Ethosoft/RefSeg-CA/tree/main/source" +authors: + - family-names: "Dalar" + given-names: "Yağız Ekrem" + - family-names: "Sezer" + given-names: "Nedim Mutlu" + - family-names: "Aksoy" + given-names: "Ömer Faruk" + - family-names: "Salihoğlu" + given-names: "Feyzi Arda" + - family-names: "Öztürk" + given-names: "Ahmet Rıfat" diff --git a/source/README.md b/source/README.md new file mode 100644 index 0000000000000000000000000000000000000000..40df302fe931d6316271227dc90c627208f93ae2 --- /dev/null +++ b/source/README.md @@ -0,0 +1,47 @@ +# RefSeg-CA — R3 research release + +Evaluating and repairing command compliance in generalized referring segmentation. + +The release contains the SFAP parser/projection, benchmark generator, inference/evaluation scripts, exact-score replay, Slurm examples, editable TikZ/PGFPlots sources, and a current manuscript. Human validation has **not been conducted**. No acceptance or publication claim is made. + +## Data and exact metric replay + +Data repository: https://huggingface.co/datasets/Ethosoft/RefSeg-CA + +From this directory, with Python 3.9 or newer: + +```bash +python code/download_release_data.py +python code/verify_portable_results.py +``` + +The lightweight download reconstructs 30 primary table rows and 22 reviewer-requested threshold configurations. It requires no TRUBA connection or model weights. These are derived scores; reproducing inference pixels requires upstream models and inputs. + +To obtain all 1,200 procedural scenes, both rendering styles, visible-instance maps, and command masks: + +```bash +python code/download_release_data.py --synthetic +``` + +The default data revision is the immutable release tag `r3-data-v1`. Natural images and original gRefCOCO expression text must be obtained from the pinned upstream release; model checkpoint hashes and preparation scripts are under protocol/ and legacy_project/code/. + +## Manuscript and figures + +The current PDF is distributed alongside this source archive in the data repository under `release/RefSeg_CA_MVA.pdf`. Install the official Springer Nature LaTeX template and normal TeX Live packages, placing sn-jnl.cls and sn-mathphys-num.bst alongside the manuscript as instructed by Springer. The repository does not redistribute these third-party generated files. + +```bash +python code/figures_r3.py +python code/build_latex.py +``` + +The synthetic download is required before regenerating image panels. All written figures are monochrome vector graphics; the experimental raster inputs retain their colors. + +## Human evaluation + +Read review/HUMAN_VALIDATION_PROTOCOL.md and review/INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md. Two independent readers, pre-adjudication agreement, adjudicated semantic labels, and a separate image-aware harm audit are still needed. Automated checks are not human labels. + +## Provenance and reuse + +See REPRODUCIBILITY.md, THIRD_PARTY.md, CITATION.cff, and SHA256SUMS. This public deposit establishes accessibility. Authors have not yet selected an additional blanket reuse license for original material; existing per-file third-party terms continue to apply. + +Browse all source files at https://huggingface.co/datasets/Ethosoft/RefSeg-CA/tree/main/source. This organization-owned Hugging Face source tree is the code host for this release. diff --git a/source/REPRODUCIBILITY.md b/source/REPRODUCIBILITY.md new file mode 100644 index 0000000000000000000000000000000000000000..e016f6bee896b57db1c6f1d0534d6ff4880121e2 --- /dev/null +++ b/source/REPRODUCIBILITY.md @@ -0,0 +1,47 @@ +# Reproducibility: R3 + +## Public release, 8 September 2026 + +Code, editable sources, manuscript, procedural images/masks, and exact score records are public at https://huggingface.co/datasets/Ethosoft/RefSeg-CA. Data tag `r3-data-v1` resolves to commit `d5ce7eaa159c8b0a1e81f439b651c0125c0b31e0`. An unauthenticated download into a fresh directory reproduced all 30 primary table rows and 22 sensitivity settings; maximum absolute error was 3.33e-15 in that Python runtime. See protocol/public_download_verification.json. + +The public download script is `code/download_release_data.py`; add `--synthetic` to reconstruct all procedural image folders. The public natural index preserves IDs, while original natural-expression text and images are obtained from their upstream sources. The fuller author supplement below retains the original natural manifest. Neither package claims completed human validation. The browsable code host is https://huggingface.co/datasets/Ethosoft/RefSeg-CA/tree/main/source, under the Ethosoft organization. + +## No-cluster metric replay + +Run `python code/verify_portable_results.py` from this package. It reads six gzip CSV tables under results/r3/portable and both compressed reviewer-replay traces. Thirty primary table rows reproduce within 2.22e-16; all 22 sensitivity means and harm counts pass. The recorded verification is results/r3/portable_verification.json. + +These are exact derived score records, not score-map caches. They suffice to independently recompute the main metrics but do not independently verify model inference pixels. Full pixel-level reruns require the upstream data/models and inference code below. + +## Inputs and software + +- Model/data revisions and file hashes: protocol/asset_manifest.json. +- ReLA checkpoint identity and preparation: protocol/rela_assets.json, code/prepare_rela.py, code/prepare_d2.py, code/rela_engine.py. +- Executed package versions: protocol/runtime_versions.json. Hardware-specific Torch wheels must be installed appropriately for a new machine. +- All 49,492 natural records: results/r3/portable/natural_full_manifest.jsonl.gz. +- Complete rich query/scene manifests: data/rich_synthetic.jsonl and data/rich_scenes.jsonl. +- Historical preparation/inference source is bundled under legacy_project/code. Local paths resolve through code/project_paths.py; REFSEG_LEGACY_ROOT can explicitly point to another prepared copy. + +## Reconstruct images and inference + +1. Fetch pinned assets with `python legacy_project/code/prepare_assets.py` (checksums verified). +2. Prepare the historical fit/calibration data with `python legacy_project/code/prepare_data.py` when reproducing that phase. +3. Prepare full natural inputs and official masks with `python code/prepare_full_natural.py` and `python code/prepare_official_masks.py`. +4. Generate all 1,200 rich scenes with `python code/generate_rich.py`. The shipped ten example scenes are a preview; the complete generation is deterministic from five pinned seeds. +5. Use code/infer_r2.py for CLIPSeg/Grounded SAM or native ReLA. The Slurm examples preserve executed settings; adapt only account, partition, paths, and obsolete dependency job IDs for another cluster. Install the pinned models/dependencies before inference. +6. Run code/r3_replay.py on caches for each of 16 shards per model; run code/r3_summarize.py after all shards complete. A default replay must exactly match the archived primary IoUs before any sensitivity result is accepted. + +## Executed reviewer jobs + +- Array 6334005: 32 completed CPU tasks, two interfaces × 16 shards. +- Summary/export 6334038: completed. +- Primary accepted records: 1,557 per interface; maximum primary replay IoU discrepancy: zero. +- Four scopes and eleven operating points are post-review exploratory diagnostics; the R2 primary rule remains unchanged. + +The raw TRUBA archive path is retained only as provenance: /arf/scratch/egitimg16u1/mcp-workspace/refseg_ca_r2. Portable primary metrics do not need that path. + +## Archive integrity + +- portable_primary_results.tar.gz SHA-256: 4dccb64342faa3c96fd50cce8f7bfed6237d196310ad4947b4d88a14c095708a +- review_replay_records.tar.gz SHA-256: 1df51ae12a48f74f8015b14f637dccd31c103971299a4b4b976e5cb72e4051de + +A release-wide SHA256SUMS file accompanies the final package. Public repository deposit is complete; a DOI remains unassigned. The public DATA_MANIFEST.json additionally records hashes for each distributed data shard and result archive. diff --git a/source/SHA256SUMS b/source/SHA256SUMS new file mode 100644 index 0000000000000000000000000000000000000000..543bcd9911aab1cfd88aa606bdaf5921ad281832 --- /dev/null +++ b/source/SHA256SUMS @@ -0,0 +1,134 @@ +71bf7ed212001f03d9ea352e1c973539bfe2f504b2999afd36af71105e2de78e .gitignore +7c2d78769a4d32dde25b168e1bcc7d018741d47a981bd73ff8c49328e26a0fc5 CITATION.cff +3f2fed9d8fdd16eb3e1f6279a1edf59bd8166ac6df2a8340f3e25cbf9bb734da README.md +2d0c8de7c4066f0543c4ff4ba3558678bd464a92bde8d8f636aaa5afc8c63d9e REPRODUCIBILITY.md +4543088ba4888edc55f81a9f9192a7667dc7e964530ae2b6e8febff07df90e71 THIRD_PARTY.md +33c0d54504ec363c41caeae8b6a3ec155d1ea92fe3a8e390a04d6015427bb4eb code/analyze_r2.py +aa2e8eef7f951febdabc59333df26a9a95fd86b19266432d7a1aa24d2599cd76 code/annotate_parser_audit.py +4358b9069ed272b4e6621b1280ba84ea9a9087da4de72023fc7f0cbeb839fd01 code/audit_phase1.py +7f115476e654374378badab4b867781f1729d347e0372fc207d7ac2b62f4e05b code/build_hf_release.py +e9f0ebe5ea6262a3ab01d3bb26356104411d617415cc6dcfb86f11e106445ae4 code/build_latex.py +d26ea40c9341e48e3e88f960fc1db12de675e5df36d7ff1c7e5a7b538d95fc14 code/download_release_data.py +c88c7faf16e90eb223815cfbaec41e4eb2e424ba662173af307eb23b80ccb316 code/figures_r2.py +71c1f885a51dba5e61cba5725be905441cb3bcf9faf2b0a34d4ba30ce932ca5f code/figures_r3.py +11932a5c675952e5b708f6f0f04bde93d0c94bb7169f0c13a547cbe512d77445 code/generate_rich.py +cd980f0c33ddb13c97ce0f41f4cfc52600c3dd2b0cb648469dce91094bb96d60 code/infer_r2.py +c03eb51e5cbf78b17fdf64d01c6c295aaf3200de8f8a75469b0e0cfd843bdcfb code/package_public_source.py +ae693f0d5a4451b1f846a9f624d0092269a20c715e0ce840655c4050d782e62c code/package_release.py +6a294a9b99c1612c88ee2668993b7eed41038f505398d767c463b444dfba78b2 code/phase1_analyze.py +92408e6897159497cb458b3e73d4b8e9731d2ac5dea8f9be37d42ff440de13ec code/phase1_infer.py +ecab2dfa0b5a79c4d7b55bd93d3438175e8b42b6dde096c34ce1f22d7cef8f44 code/phase1_repair.py +23c1613ae2b16130e963819a4655c43077bab5e9927e5ee7c0a4ebc7a88a4678 code/prepare_d2.py +8a2fe0bdbc8c72e2b33fbfd6689c697266cd8eda14f097f278f84af269939f2b code/prepare_full_natural.py +bbc9a73c01de25e5322325455124b6afcaee0af4d293b159cc9377d58aba95f7 code/prepare_human_passes.py +7ded426fb791eb8fd764742aefd7281bfc78a28db01f4630a7d71f6e01ec13d3 code/prepare_official_masks.py +c6f2512744b481354c77af5ae2f390b4cd07ddf3d9dcf3a3e572a9689b5e0696 code/prepare_rela.py +94b438c79b53ecc1035bd099b3880cd428c7cfc1069ed52172a1371c3430231d code/project_paths.py +d680543c9e2638713134f76c4955f867a976102b8d0af3c6099b8bcfdcf52750 code/publish_hf_release.py +48834716a6689cffea835c9ba57d9b6457094856a9903cca9ee9713005b89156 code/r2_repair.py +40337207e029ff7896cb702fa1d4fb47718421b97caf3d5013b5d557bb71fcef code/r3_replay.py +8c728585942b0b7a98b10711a45578e972ce50104bfe60ee8ae12567aa13da29 code/r3_summarize.py +8688215c04dd3782c1eb0cad2ad8cc5917ada9989434e7be8df8f502995ac641 code/rela_engine.py +501d8a543fc3c4670daa2613ce65e1535f7d570f46ef3232f1862fe3cd949255 code/score_human_parser_audit.py +5685979870a403520236fca36173da15774f08d582e95a96ff75b016a63484c4 code/timing_r2.py +6a15b68352b0354419635f524ec9fca96191502fa6390993cd4dd498c50f0687 code/verify_portable_results.py +5c892456ba80da8be9403d00df1ee6b9a58d7e5726ffb4b008c3b2b9139351cb code/verify_rela_metrics.py +e9299bafa2b1370080eab8309a11cbc1181b4661c6bc49283df2f5dd3bf45751 figures/Fig10_harm_signatures.tex +1b31451b259c67d87300a2b12ce0ca4cbb6b686fd3fc28fb202f70fdc1b255c4 figures/Fig1_framework.tex +169ca88d0f6c354da707fa4019207cd7bf38808255ddb2b5dd785114acbfe16a figures/Fig2_rich_atlas.tex +5ec3a6fd14eb9ffc48766e2dee5da42ca7c0fad5fec4bb067cc2c833a4c323e3 figures/Fig3_paired_render.tex +8215bfccfe95140964c226627c8f03c72981604e79fcbba9f4f9fc3e694ce6c4 figures/Fig4_corrected_contrasts.tex +7b1a89ef763197051a753f4eb0842c568b3bb1c4cdbd2751631571ac1f2f780c figures/Fig5_thresholds.tex +0ef37e3f8d61d7bdc57e66593221f1f077ed5c5f07cb7d6060b4b86083c92877 figures/Fig6_natural_effects.tex +09e7e993d6a2d27cd1f58e5cb75f7590bc2f73835b622363ef4552f8e2261e0d figures/Fig7_absence_tradeoff.tex +c94932ef59ea26d5bdf4641d4ce8c4500bf1203ba8d23bacded0da8293b44252 figures/Fig8_rich_performance.tex +f8d70681e55163404b70b5d3fe166584970c9011aefe463be366614fcf16fb64 figures/Fig9_threshold_robustness.tex +87222306391ef553efc575645b245ce49fa99e2b0adca722d37ca91a4a6c3287 figures/atlas_manifest.json +adee394c340cf4930b7a52ebe9f258cdb3441f5a9dc4d03a1be3cb29326fa0b0 figures/style.tex +ce8a4374ad7002ea756dc54fe5f76ed4bb0bab17441572977f5e439f7aeb3bb0 latex/RefSeg_CA_MVA.tex +fbd1673314c53abff12cbbeb61946c489fde457f0647260742adc27150779fcf latex/design_comparison.tex +bae1861de78cbece3ea00c0b24533ead98f1caa188907090a56d3275dfea20ff latex/references.bib +ed88856df0fb8df7de8b960957ddda13dd902705883293e0ab4d48d141e1e35d latex/review_extensions.tex +6a294a9b99c1612c88ee2668993b7eed41038f505398d767c463b444dfba78b2 legacy_project/code/analyze.py +8f809efc18f9a61a074f8f67209fd56a29ef325d1d3beb79bf49a9f979034942 legacy_project/code/build_latex.py +4aa7bf4ccdf57a254dfda70c6ef5ce6e1525c221024bc09f48a5d94dd55de3dd legacy_project/code/export_qualitative.py +92408e6897159497cb458b3e73d4b8e9731d2ac5dea8f9be37d42ff440de13ec legacy_project/code/infer.py +1cd6bbe48e19b91086e5a62784747aa052b46609421866fb7d5026545ce6d59b legacy_project/code/make_figures.py +f2733ab418a360f233a1e6c0f6517090923c076e5f3d1628a19487bb1886f302 legacy_project/code/package_release.py +6b50adc897f0392fb9028b194d708cb1e509e30eb445ede199b7d2cf8bbf5029 legacy_project/code/pilot.py +de03cc1aa9d6a83e6108c844e6ffa4fe253ad6ad1222868aead86f508c7746a7 legacy_project/code/prepare_assets.py +c0d546fa369b72b0710b9645bd30d7d8f0fa4b0ec33c52bfe57a542ed2ee7171 legacy_project/code/prepare_data.py +ecab2dfa0b5a79c4d7b55bd93d3438175e8b42b6dde096c34ce1f22d7cef8f44 legacy_project/code/repair.py +393b6b83429ca83291e42e0fb1e98ed5de546c167ce59375ecb81ae0edbefbc4 legacy_project/code/replay_analysis.py +ddb8d686f88d8672096d674315739a8a1c1854792b120de679fcb0a68a45740d legacy_project/code/test_protocol.py +3fe7b94c1a0a9e66dca9f1172fe5295f22ab0e314fc47f786d0184c6a9812be3 legacy_project/code/write_results.py +ae6b23e5957498a6e85624e88864784359427a89a65e7e422a7da7206bf6e136 legacy_project/protocol/asset_manifest.json +1c94703f12b2580c53b0b199ccae6008bb1ec84a5495feb4117d604b0303c400 legacy_project/results/analysis/calibration.json +18dfeef104ae9b31933889361bc9d63b14209bad7a979b75721f32f9aa44e098 protocol/HF_DATA_CARD.md +83dd0a7a86bd9db56fe91d7b53cfdab48649bacd383d3d6fb8b7bf8c571a9393 protocol/R2_ANALYSIS_PLAN.md +43a49a858276739b2981e508cfdb832dccd054e3e5805fbe731471021c3058fc protocol/R3_REVIEW_ANALYSIS_PLAN.md +ae6b23e5957498a6e85624e88864784359427a89a65e7e422a7da7206bf6e136 protocol/asset_manifest.json +ac8123d836a124def2d18fd51b3bf2221dceb5d6de5a05d404b5f96bed534618 protocol/checkpoint_identity.json +734412cd8557d749da8718a65fadf6bb2e5d4b8900ee0d9b1fd352cc7fa7ff69 protocol/natural_full_manifest.json +ccf86503063251bafebf6f949b835c9f0ba98fc94c78d331f7af19b54554d75a protocol/public_data_receipt.json +70c5117628654493737282d81dd610c55e223faa24ea22541d6b802fe98f4228 protocol/public_download_verification.json +87f55dab94808d88d2f776d05d4e4318dc021a9d175a1d81d9575e7a716964c2 protocol/public_release_receipt.json +930aed7e6bd8ee7da5a482675fa9b8530b55b72e61f65f6a3bcbf971da550161 protocol/rela_assets.json +0b57c8e45ce69c590fb405b58efc11b67decdf19049ac14f8b1572c50df3cfaf protocol/rela_reconstruction_lock.json +e9f85fc23e9f34419eb51ce0c42e5e9c7162231ee7af0dc4939070cfc05df155 protocol/rich_manifest.json +867c36d6ff741224764daea7ed3cad384ffe684f1b254a57831b0f4ba9edf0d3 protocol/runtime_versions.json +8c12c6d9ca72f45827afe1a52e6663c306fa68e79c1129b6376f36e66ef46088 protocol/template_source.json +6969a223c0d914f1f137e648d395819dab9503a09891d4a72cacf3c92276d5b2 requirements-analysis.txt +25d6921efcf506cc7549c7afd763ef541f04881f5137af9cdd8361bb9b3f7a1a results/analysis/natural_clipseg.json +3ba875a2f3936cf818d2fa950b2fdf58c9b204c548d9e7e58ee7f842f86847d5 results/analysis/natural_groundedsam.json +5373058210aa570aad3b4fca0328e34476dea1c204594c723a38d931a43fa984 results/analysis/paper_results.json +46d0a4eef86b1a2211f81228de49ecd86a8b10da7f739512ba1a0ac168148eec results/analysis/phase1_exact_audit.json +a571efeb65dc30a9ea0e8bfa7480bc18e5c40c93e3b93fc0625664973a87bbe3 results/analysis/phase1_multiplicity.json +14b165094edf8e32514e7be429c3a85faefbfc2009834882fe99d415efd9578c results/analysis/phase1_threshold_curves.json +4cf341064300cc44b9587ad289eb73ddd154961a55d87330c37bed93598278f7 results/analysis/rela_metric_verification.json +073471415d0f781e0f6e41337b7d1bc7dcb3dfeaf10bbc8b3cc69c9f75838cf8 results/r3/jobs/clipseg_0of16.meta.json +bc35728a6e664750383d1a0eddb1b841f6cc513f5463b2b7ea6541225c25fc53 results/r3/jobs/clipseg_10of16.meta.json +844e5b4951ac50efdf76339f7377112d78cbacd96986ca67c12ed48e3d3d630d results/r3/jobs/clipseg_11of16.meta.json +c410cc527d4c41e5f75b21ce0eac963dd703634fb7ae560e0e656c19b87dff0a results/r3/jobs/clipseg_12of16.meta.json +4908646fc62898beb27fbe177601f6123032a8f708a808e479b783af7fcf91e1 results/r3/jobs/clipseg_13of16.meta.json +0a285a15f89b9c11f6802dabdfdfaf04e092e9da7ba0304ac82c64dde5d0e7eb results/r3/jobs/clipseg_14of16.meta.json +e257ea881b69cb655e95e5da9b79c8841b022e1b7354d65dd6c68687b674d8b7 results/r3/jobs/clipseg_15of16.meta.json +e215c2aef3ef3c7a4b0bbfa02c2791a59b77f4c33899a8d5b63930faa43c4d82 results/r3/jobs/clipseg_1of16.meta.json +49c5406cd4a7fa0ccac44bd2429af011546a04901547912b780a6b386d5d9224 results/r3/jobs/clipseg_2of16.meta.json +41c6f8daad80b522d04538fb2569373fc57faf9638898a3bb94e75b73e72a15d results/r3/jobs/clipseg_3of16.meta.json +d384e4e97e1ff715627d857c2238c77aaf32ea4ea9047a1c7ab5cd02eb15b058 results/r3/jobs/clipseg_4of16.meta.json +1e75580137f4a1c8b9473adafc91167f2fcc1d489475055c81203759e53b171a results/r3/jobs/clipseg_5of16.meta.json +f79a2d7b89961ecdc8799cee21bac1d94cbb49114b554445b74bfec0863e3d25 results/r3/jobs/clipseg_6of16.meta.json +3ba8acba95300db2cfa550ce96fbf206c2e9ec2b355dd53f8c29c4c6795292ce results/r3/jobs/clipseg_7of16.meta.json +487a4a4e16ef2157b08763d776fc1694b06a5ea56bf9e04af8bc578ca80b4dc1 results/r3/jobs/clipseg_8of16.meta.json +67f95f8c1b8f381db6d87f38c3ff183b0e3aaa18bbe1e378a45bd9bb8a00e4cf results/r3/jobs/clipseg_9of16.meta.json +61a0748b6403d6be46b65c61c4633a48e2be6d38c5431fb52d477611454a9d2a results/r3/jobs/groundedsam_0of16.meta.json +7efa3b5162ec015da59656aba485ff45a29b9b50604ad23c25e073044c12832a results/r3/jobs/groundedsam_10of16.meta.json +c3dc4aa877d2c1c126de9abf23288bcaed15aa9562336c857b62ccdf745e97a7 results/r3/jobs/groundedsam_11of16.meta.json +15113af4e3e61e840e46804c7a49b3114b1e75625ea06a3f9554e2ccf9746d30 results/r3/jobs/groundedsam_12of16.meta.json +523ad7e4c27d391244a65fdef97dd41412916a8224893d85c54737d0f4655416 results/r3/jobs/groundedsam_13of16.meta.json +e80dbdcf755e642bae369aa630e6f632e12124774045848ef276daa403727212 results/r3/jobs/groundedsam_14of16.meta.json +a9aee9410276d2ab954dc82ef68858503a416567e9e842e6b2811a9d05aa5bc0 results/r3/jobs/groundedsam_15of16.meta.json +b9200f81ee45458d8c8245c0ffbf11b1409e00b72aa265287e5ceb2ae70b4faf results/r3/jobs/groundedsam_1of16.meta.json +4e7928c9f8a5c62e87d4fb10953d453f7242cd02964a168b603d284a22a7733b results/r3/jobs/groundedsam_2of16.meta.json +80cc8e8eb6f3a561cc88aff981778266970c43c8a6614ca5eafca0a9a8feb1dd results/r3/jobs/groundedsam_3of16.meta.json +5f708c0f2fd643866f2b3b596d73690422ae740e05fdf9a9a6ed622bdebf670b results/r3/jobs/groundedsam_4of16.meta.json +5a0d9694a22eb7d06492cac44c91d7909f697b3e5b21d4f67b5069cbc766da7d results/r3/jobs/groundedsam_5of16.meta.json +7859bf13a336b38e868d8c4e3d9afccb5fba32e47e3766f267f37ff66e0bef76 results/r3/jobs/groundedsam_6of16.meta.json +48f70231977f48319419d17c913cb5b25dd8d6948112aad7b49a56898a92fd21 results/r3/jobs/groundedsam_7of16.meta.json +b51e3b8de27c785ebdc1b63efffc97c32ef2d3df8648187f4ebeb366b524c0f5 results/r3/jobs/groundedsam_8of16.meta.json +32564512c85c95d7e46e22a89e4790adedf81bf77d57c13e2d6ff191d7e9d93e results/r3/jobs/groundedsam_9of16.meta.json +5f981eb3145b2b164c4e01fb72ef5d21f53160dda177a85662977147371b614b results/r3/review_results.json +e47dfaf78edb1eb206051cfe483743929f29639f4b979fd9be56e3c87aab8c11 review/HUMAN_VALIDATION_PROTOCOL.md +a6e9e9dd9d9320619216ff65b91ff38d24b0ce73da878e18cec6709090aedecb review/INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md +dda2b7af02adc7a68fcb58fe911dda0c4ec1f91a7e276af215be2777b432c2a1 review/Response_to_Major_Revision.md +8506393c5eb48ede5f37f02078fce5b23b0665ab846c96cb0c7132a71cce51c5 slurm/analyze_all_r2.sbatch +3c8f3038c74b36d9a1b1273b4517c5ffdd978769fd04e758288b7c4227e87092 slurm/build_public_data.sbatch +eaf5fa9f45088fc39b2425a4b83f921ec7be9352f062b380d13d7bec6430e9e3 slurm/full_clipseg.sbatch +c11a0b09d3957fb52d7bd93f62111a980b883cbf990871568b1cdf2beb5627ae slurm/full_groundedsam.sbatch +8102dab9d2c11b3e086473b6997234b9f95e0acf2c1f146e36dd6922fb7eb2e0 slurm/natural_full_rela.sbatch +652767c17829c176f1200d5e967268d3bdca97b83cbf5a22433fdb75fd8f3707 slurm/r3_replay.sbatch +beb0b75252f33793538e7e5f34775cebb1f8ffb167cef5c5f8cd085444c4f622 slurm/r3_summary.sbatch +6825982e1b431e79bc4503869f62b0945a15b642b00fd3a4f11b4b158cada073 slurm/rich_clipseg.sbatch +e01c3ff49bef60716a1dc6262235030719ee6e0edebea46d3011a9a384ae7423 slurm/rich_groundedsam.sbatch +0d9cefe5ec90a54461a47f33b53233e885d42e367593d22df9b62fac6f610b3e slurm/rich_synthetic_rela.sbatch diff --git a/source/THIRD_PARTY.md b/source/THIRD_PARTY.md new file mode 100644 index 0000000000000000000000000000000000000000..a44adf8138e1f5dc83a735076261cef6b113a08a --- /dev/null +++ b/source/THIRD_PARTY.md @@ -0,0 +1,9 @@ +# Third-party materials + +Original natural images and gRefCOCO expression files are not included. Obtain them from https://huggingface.co/datasets/FudanCVL/gRefCOCO at revision 81eede59b3ac070049f597d023c0ff08d1fb80e9 and the image sources referenced by its authors. They retain their original terms. + +Model weights and ReLA source are downloaded from their authors using the revisions and hashes in protocol/. No model weights are redistributed here. + +The Springer Nature LaTeX class/bibliography style and standard algorithm packages must be installed from their official distributions. These generated third-party files are omitted from this public source archive. The user-facing manuscript source remains included. + +This repository adds no blanket license to material owned by others. The project authors have not yet assigned a blanket reuse license to their original code or procedural dataset. diff --git a/source/code/analyze_r2.py b/source/code/analyze_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..5bd333ef6779e5561d5a21a61083e355f4fb9d90 --- /dev/null +++ b/source/code/analyze_r2.py @@ -0,0 +1,134 @@ +"""Aggregate only complete executed shards; expression-weighted cluster CIs.""" +from pathlib import Path +import json,gzip,collections,csv,math,argparse,hashlib,os +import numpy as np +from scipy.stats import binomtest,norm +ROOT=Path(__file__).resolve().parents[1];from project_paths import legacy_root;OLD=legacy_root(ROOT) +DEST=ROOT/'results/analysis';DEST.mkdir(parents=True,exist_ok=True) +def readlines(p): + with (gzip.open(p,'rt') if str(p).endswith('.gz') else p.open()) as f:return [json.loads(s) for s in f] +def ci_cluster(rows,values,alpha=.05,B=2000): + groups=collections.defaultdict(list) + for r,v in zip(rows,values):groups[(r.get('split','test'),r['scene_id'])].append(float(v)) + if not groups:return [None,None] + strata=collections.defaultdict(list) + for (s,k),v in groups.items():strata[s].append((sum(v),len(v))) + rng=np.random.default_rng(77123);sums=np.zeros(B);counts=np.zeros(B) + for v in strata.values(): + v=np.array(v);idx=rng.integers(0,len(v),(B,len(v)));sums+=v[idx,0].sum(1);counts+=v[idx,1].sum(1) + return np.quantile(sums/counts,[alpha/2,1-alpha/2]).tolist() +def describe(rows,variant,key='scores'): + s=[r[key][variant] for r in rows];pos=[z for r,z in zip(rows,s) if r['target_count']>0];neg=[z for r,z in zip(rows,s) if r['target_count']==0] + nt=lambda z:z.get('pred_nt',z['empty']) + return dict(n=len(rows),images=len({r['scene_id'] for r in rows}),positive=len(pos),negative=len(neg),gIoU=float(np.mean([z['iou'] for z in s])),cIoU=sum(z['intersection'] for z in s)/max(1,sum(z['union'] for z in s)),positive_mIoU=float(np.mean([z['iou'] for z in pos])) if pos else None,Nacc=float(np.mean([nt(z) for z in neg])) if neg else None,false_empty=float(np.mean([nt(z) for z in pos])) if pos else None,Pr50=float(np.mean([z['iou']>=.5 for z in pos])) if pos else None) +def comparison(rows,v,b='frozen',key='scores',alpha=.05): + d=np.array([r[key][v]['iou']-r[key][b]['iou'] for r in rows]);helped=int((d>1e-12).sum());harmed=int((d< -1e-12).sum());n=helped+harmed + return dict(n=len(rows),images=len({r['scene_id'] for r in rows}),delta=float(d.mean()) if len(d) else None,ci=ci_cluster(rows,d,alpha),helped=helped,harmed=harmed,tied=len(rows)-n,sign_p=binomtest(helped,n,.5).pvalue if n else 1.,paired_sd=float(d.std(ddof=1)) if len(d)>1 else None,approx_iid_mde80=(norm.ppf(.975)+norm.ppf(.8))*float(d.std(ddof=1))/math.sqrt(len(d)) if len(d)>1 else None) +def add_calibration(rows,model): + p=OLD/'results/analysis/calibration.json' + if not p.exists():return + params=json.loads(p.read_text())[model] + if not (OLD/'assets/grefcoco/instances.json').exists():return + coco=json.loads((OLD/'assets/grefcoco/instances.json').read_text());sizes={i['id']:i['width']*i['height'] for i in coco['images']} + for r in rows: + features=np.array(r['features']);features[4]=r['scores']['cacp']['pred_pixels']/sizes[r['image_id']] + for name in ['source_unconstrained_s11','target_unconstrained_s11','constrained_0.01_s11','constrained_0.025_s11','constrained_0.05_s11','constrained_0.1_s11']: + p=params[name];fit=p['fit'];coef=np.array(fit['coef']);x=(features-np.array(fit['mean']))/np.array(fit['std']);logit=coef[-1]+float(x@coef[:-1]);prob=1/(1+np.exp(-np.clip(logit,-50,50)));reject=prob>=p['operating_point']['threshold'] + for key in ['scores','official480_scores']: + base=r[key]['cacp'];z=dict(base) + if reject:z.update(iou=float(r['target_count']==0),intersection=0,union=base['gt_pixels'],pred_pixels=0,empty=True,pred_nt=True) + r[key][name]=z + r.setdefault('added_abstention',{})[name]=bool(reject and not r['scores']['cacp']['empty'] and r['target_count']>0) +def natural(model,shards): + paths=[ROOT/'results'/f'natural_full_{model}_{i}of{shards}.jsonl' for i in range(shards)] + if not all(p.with_name(p.stem+'_meta.json').exists() for p in paths):return None + rows=[r for p in paths for r in readlines(p)];assert len(rows)==49492 and len({r['id'] for r in rows})==49492 + if model!='rela':add_calibration(rows,model) + variants=list(rows[0]['scores']);out=dict(records=len(rows),images=len({r['scene_id'] for r in rows}),tables=[],comparisons={},coverage={},cost={}) + for split in ['val','testA','testB','all']: + subset=[r for r in rows if split=='all' or r['split']==split] + for key in ['scores','official480_scores']: + for v in variants:out['tables'].append(dict(split=split,grid=key,variant=v,**describe(subset,v,key))) + for scope in ['all','old_supported','scope_safe','old_relational','safe_relational','positive','safe_positive']: + s=[r for r in rows if scope=='all' or (scope=='old_supported' and r['flags'].get('supported')) or (scope=='scope_safe' and r['flags'].get('scope_safe')) or (scope=='old_relational' and r['flags'].get('anchor')) or (scope=='safe_relational' and r['flags'].get('anchor') and r['flags'].get('scope_safe')) or (scope=='positive' and r['target_count']>0) or (scope=='safe_positive' and r['target_count']>0 and r['flags'].get('scope_safe'))] + out['coverage'][scope]=dict(records=len(s),images=len({r['scene_id'] for r in s})) + for v in ['anchor_gate','cacp','safe_anchor','source_unconstrained_s11','constrained_0.05_s11']: + if v in variants and s:out['comparisons'][scope+'/'+v]=comparison(s,v,key='official480_scores') + out['scope_reasons']=dict(collections.Counter(r['flags'].get('scope_reason','native') for r in rows)) + out['exact_cf']=dict(changed=sum(r['flags'].get('cf_vs_anchor_changed',False) for r in rows),nogate_changed=sum(r['flags'].get('nogate_cf_changed',False) for r in rows)) + out['cost']=dict(total_primary_query_requests=sum(r['primary_query_count'] for r in rows),total_cf_query_requests=sum(r['query_count'] for r in rows),average_primary_requests=float(np.mean([r['primary_query_count'] for r in rows])),average_cf_requests=float(np.mean([r['query_count'] for r in rows]))) + out['added_abstention']={v:sum(r.get('added_abstention',{}).get(v,False) for r in rows)/sum(r['target_count']>0 for r in rows) for v in variants if 's11' in v} + (DEST/f'natural_{model}.json').write_text(json.dumps(out,indent=2));print('NATURAL',model,out['coverage'],flush=True) + with gzip.open(DEST/f'natural_{model}_evaluated.jsonl.gz','wt') as f: + for r in rows:f.write(json.dumps(r)+'\n') + return out +def rich(model,shards): + paths=[ROOT/'results'/f'rich_synthetic_{model}_{i}of{shards}.jsonl' for i in range(shards)] + if not all(p.with_name(p.stem+'_meta.json').exists() for p in paths):return None + rows=[r for p in paths for r in readlines(p)];assert len(rows)==28800 and len({r['id'] for r in rows})==28800 + variants=list(rows[0]['scores']);tables=[];curves=[];comparisons={} + for render in ['flat','rich']: + for family in ['attribute','relational','multi_target','negative_action','empty_target','paraphrase','primary']: + s=[r for r in rows if r['render']==render and (r['mode'] in ['attribute','relational','multi_target','empty_target'] if family=='primary' else r['mode']==family)] + pairs=collections.defaultdict(list) + for r in s:pairs[r['pair_id']].append(r) + assert all(len(v)==2 for v in pairs.values()) + for v in variants: + pc=[dict(scene_id=rr[0]['scene_id'],split='test',pc=float(min(r['scores'][v]['iou'] for r in rr)>=.5)) for rr in pairs.values()] + tables.append(dict(render=render,family=family,variant=v,PC50=float(np.mean([x['pc'] for x in pc])),PC50_ci=ci_cluster(pc,[x['pc'] for x in pc]),single_Pr50=float(np.mean([r['scores'][v]['iou']>=.5 for r in s])),**describe(s,v))) + if family=='primary': + for tau in np.arange(.3,.901,.05):curves.append(dict(render=render,variant=v,tau=float(tau),PC=float(np.mean([min(r['scores'][v]['iou'] for r in rr)>=tau for rr in pairs.values()])),Pr=float(np.mean([r['scores'][v]['iou']>=tau for r in s])))) + if family=='primary': + for v in ['anchor_gate','cacp','safe_anchor']: + if v not in variants: + continue + d=[dict(scene_id=rr[0]['scene_id'],split='test',value=float(min(r['scores'][v]['iou'] for r in rr)>=.5)-float(min(r['scores']['frozen']['iou'] for r in rr)>=.5)) for rr in pairs.values()] + comparisons[render+'/'+v]=dict(delta=float(np.mean([x['value'] for x in d])),ci=ci_cluster(d,[x['value'] for x in d])) + out=dict(records=len(rows),scenes=1200,tables=tables,curves=curves,comparisons=comparisons) + (DEST/f'rich_{model}.json').write_text(json.dumps(out,indent=2));print('RICH',model,comparisons,flush=True) + with gzip.open(DEST/f'rich_{model}_evaluated.jsonl.gz','wt') as f: + for r in rows:f.write(json.dumps(r)+'\n') + return out +def audits(): + out={} + for model in ['clipseg','groundedsam']: + paths=list((ROOT/'results').glob(f'phase1_audit_{model}_*of4.jsonl')) + if len(paths)!=4:continue + rows=[r for p in paths for r in readlines(p)];out[model]={} + for scope in ['all','controlled_clean_test','natural_eval']: + s=[r for r in rows if scope=='all' or (scope=='controlled_clean_test' and r['domain']=='controlled' and r['split']=='test' and r['corruption']=='clean') or (scope=='natural_eval' and r['domain']=='natural' and r['split'] in ('val','testA','testB'))] + changed=[r for r in s if r['cf_vs_anchor_changed']] + out[model][scope]=dict(anchor_records=len(s),changed=len(changed),helped=sum(r['delta_iou']>1e-12 for r in changed),harmed=sum(r['delta_iou']< -1e-12 for r in changed),tied=sum(abs(r['delta_iou'])<=1e-12 for r in changed),nogate_changed=sum(r['nogate_cf_changed'] for r in s),reasons=dict(collections.Counter(r['cf_reason'] for r in s))) + s=[r for r in rows if r['domain']=='controlled' and r['split']=='test' and r['corruption']=='clean'];pairs=collections.defaultdict(list) + for r in s:pairs[r['pair_id']].append(r) + keys=list(s[0]['sensitivity']) if s else [] + out[model]['sensitivity']=[dict(setting=k,PC50=float(np.mean([min(r['sensitivity'][k] for r in rr)>=.5 for rr in pairs.values()])),mIoU=float(np.mean([r['sensitivity'][k] for r in s]))) for k in keys] + (DEST/'phase1_exact_audit.json').write_text(json.dumps(out,indent=2));print('AUDITS',out,flush=True) +def phase1(): + out={};curves=[] + for model in ['clipseg','groundedsam']: + p=OLD/'results/analysis'/f'{model}_evaluated.jsonl.gz' + if not p.exists():p=p.with_suffix('') + if not p.exists():continue + rows=readlines(p);s=[r for r in rows if r['domain']=='controlled' and r['split']=='test' and r['corruption']=='clean' and r['mode'] in ['attribute','relation','quantifier','absence']] + pairs=collections.defaultdict(list) + for r in s:pairs[r['pair_id']].append(r) + assert len(pairs)==3200 + out[model]={} + for base in ['frozen','global_direction','anchor_gate']: + rr=[dict(scene_id=v[0]['scene_id'],split=str(v[0]['seed']),value=float(min(r['scores']['cacp']['iou'] for r in v)>=.5)-float(min(r['scores'][base]['iou'] for r in v)>=.5)) for v in pairs.values()] + out[model][base]=dict(delta=float(np.mean([r['value'] for r in rr])),pointwise_ci=ci_cluster(rr,[r['value'] for r in rr]),simultaneous_ci=ci_cluster(rr,[r['value'] for r in rr],alpha=.05/6)) + for v in ['frozen','global_direction','anchor_gate','cacp']: + for tau in np.arange(.3,.901,.05):curves.append(dict(model=model,variant=v,tau=float(tau),PC=float(np.mean([min(r['scores'][v]['iou'] for r in rr)>=tau for rr in pairs.values()])),Pr=float(np.mean([r['scores'][v]['iou']>=tau for r in s])))) + for scope in ['all_natural','supported_natural']: + ns=[r for r in rows if r['domain']=='natural' and r['split'] in ('val','testA','testB') and (scope=='all_natural' or r['flags']['supported'])] + out[model][scope]=comparison(ns,'cacp') + (DEST/'phase1_multiplicity.json').write_text(json.dumps(out,indent=2));(DEST/'phase1_threshold_curves.json').write_text(json.dumps(curves,indent=2));print('PHASE1_STATS_COMPLETE',flush=True) +if __name__=='__main__': + ap=argparse.ArgumentParser();ap.add_argument('--part',default='all',choices=['all','natural','rich','audit','phase1']);a=ap.parse_args() + if a.part in ('all','natural'): + for m,n in [('clipseg',4),('groundedsam',16),('rela',32)]:natural(m,n) + if a.part in ('all','rich'): + for m,n in [('clipseg',4),('groundedsam',12),('rela',16)]:rich(m,n) + if a.part in ('all','audit'):audits() + if a.part in ('all','phase1'):phase1() diff --git a/source/code/annotate_parser_audit.py b/source/code/annotate_parser_audit.py new file mode 100644 index 0000000000000000000000000000000000000000..931ad443e9d9be8324056f2725ee677d0c6666bf --- /dev/null +++ b/source/code/annotate_parser_audit.py @@ -0,0 +1,27 @@ +"""Encode the assistant's text-only inspection; never a human accuracy audit.""" +from pathlib import Path +import csv,json,collections +ROOT=Path(__file__).resolve().parents[1];path=ROOT/'review/parser_audit_122.csv' +rows=list(csv.DictReader(path.open())) +labels={ + 'exact_cardinality_lost':[3,5,14,18,22,25,26,39,41,43,47,50,52,53,62,63,64,66,70,71,74], + 'decomposition_artifact':[1,2,6,8,13,78,82,83], + 'morphology_or_plurality_artifact':[12,31,94], + 'complex_scope_unverified':[0,15,16,17,19,20,21,23,24,27,28,29,30,32,42,77,79,85,95,102,105,114,115], + 'modifier_scope_retained':[4,9,11,33], +} +notes={ + 'exact_cardinality_lost':'The plural flag does not enforce the exact number requested by two/both/three. Incidental correct cardinality is not parsing correctness.', + 'decomposition_artifact':'A dangling preposition or adverb remains in the target phrase. The target/anchor boundary is not a clean noun-phrase decomposition.', + 'morphology_or_plurality_artifact':'Naive final-token singularization or the explicit plural-keyword rule changes an inflection or loses implicit plural scope.', + 'complex_scope_unverified':'The expression contains coordination, nested modifiers, ambiguous attachment or multiple spatial constraints; one target/anchor slot does not verify full scope.', + 'modifier_scope_retained':'A modifier remains inside a target/anchor phrase and the outer relation is separable. The new lexical guard conservatively rejects this case.', + 'simple_representable':'The text admits the implemented plural-union or unary-extreme form, or an unambiguous outer relation. This is a text-only judgment, not verification of visual grounding.' +} +assigned={i:label for label,ids in labels.items() for i in ids};assert sum(map(len,labels.values()))==len(assigned) +for i,r in enumerate(rows): + label=assigned.get(i,'simple_representable');r.update(ai_audit_category=label,ai_audit_note=notes[label],audit_authority='AI assistant; text-only; provisional',human_verdict='',human_notes='') +with path.open('w') as f: + w=csv.DictWriter(f,fieldnames=rows[0]);w.writeheader();w.writerows(rows) +meta=dict(n=len(rows),authority='AI assistant; not independent human adjudication',scope='Original 122 accepted expressions in the 1,800-image Phase 1 natural evaluation; all read as text',counts=dict(collections.Counter(r['ai_audit_category'] for r in rows)),guard_accepted_counts=dict(collections.Counter(r['ai_audit_category'] for r in rows if r['scope_safe']=='True')),precision_reported=False,reason='Several categories require image context and two independent human judgments; no certified parser precision or inter-rater agreement is claimed.') +(ROOT/'review/parser_audit_summary.json').write_text(json.dumps(meta,indent=2));print(json.dumps(meta,indent=2)) diff --git a/source/code/audit_phase1.py b/source/code/audit_phase1.py new file mode 100644 index 0000000000000000000000000000000000000000..13695d6a0abf8b30fa2abea2407c30f024290cfd --- /dev/null +++ b/source/code/audit_phase1.py @@ -0,0 +1,48 @@ +"""Exact mask replay and post hoc lambda/geometry sensitivity, no new fitting.""" +from pathlib import Path +import argparse,json,collections,os,time +import numpy as np +from PIL import Image +import phase1_repair as p +ROOT=Path(__file__).resolve().parents[1];from project_paths import legacy_root;OLD=legacy_root(ROOT) +def sweep(q,maps,threshold,base): + targets=p.components(maps[q.target],threshold);anchors=p.components(maps[q.anchor],threshold) + if not targets or not anchors:return {(l,g):base for l in [0,.25,.5,1] for g in [0,.015,.03,.06]} + ac=anchors[0];am=ac['confidence']-(anchors[1]['confidence'] if len(anchors)>1 else 0) + if am<.05:return {(l,g):base for l in [0,.25,.5,1] for g in [0,.015,.03,.06]} + key='x' if q.relation in ('left','right') else 'y';sign=1 if q.relation in ('right','below') else -1 + candidates=[(c,sign*(c[key]-ac[key]),float((maps[q.original][c['mask']]-maps[q.opposite][c['mask']]).mean())) for c in targets] + outputs={} + for l in [0,.25,.5,1]: + for g in [0,.015,.03,.06]: + allowed=sorted([(c['confidence']+l*r,c,r) for c,d,r in candidates if d>=g],key=lambda z:z[0],reverse=True) + if not allowed or allowed[0][2]<-.05:out=base + elif not q.plural and allowed[0][0]-(allowed[1][0] if len(allowed)>1 else 0)<.05:out=base + else:out=p.union([c for _,c,_ in allowed] if q.plural else [allowed[0][1]],base.shape) + outputs[(l,g)]=out + return outputs +def main(): + ap=argparse.ArgumentParser();ap.add_argument('--model',required=True);ap.add_argument('--shard',type=int,default=0);ap.add_argument('--shards',type=int,default=4);a=ap.parse_args() + manifest=[json.loads(s) for s in (OLD/'data/manifest.jsonl').read_text().splitlines()] + files=sorted((OLD/'results').glob(f'{a.model}_main_*of'+('2' if a.model=='clipseg' else '8')+'.jsonl')) + assert len(files)==(2 if a.model=='clipseg' else 8),files + raw={r['id']:r for f in files for r in (json.loads(s) for s in f.read_text().splitlines())} + selected=[r for r in manifest if p.parse_query(r['query']).anchor] + groups=collections.defaultdict(list) + for r in selected:groups[raw[r['id']]['cache_path']].append(r) + paths=sorted(groups)[a.shard::a.shards];threshold=.5 if a.model=='clipseg' else .25;n=0;t0=time.time() + with (ROOT/'results'/f'phase1_audit_{a.model}_{a.shard}of{a.shards}.jsonl').open('w') as out: + for ix,cache in enumerate(paths): + z=np.load(OLD/cache);maps={q:z[f'p{i}'].astype(np.float32) for i,q in enumerate(z['texts'].tolist())} + for r in groups[cache]: + preds,flags=p.repaired_maps(r['query'],maps,threshold);q=p.parse_query(r['query']);gt=np.asarray(Image.open(OLD/r['gt_path']))>0 + cf=preds['cacp'];ag=preds['anchor_gate'];d=p.score_mask(cf,gt)['iou']-p.score_mask(ag,gt)['iou'] + row={k:r[k] for k in ['id','scene_id','domain','split','mode','pair_id','endpoint','seed','corruption']} + row.update(model=a.model,query=r['query'],plural=q.plural,cf_vs_anchor_changed=bool((cf!=ag).any()),nogate_cf_changed=bool((preds['anchor_nogate']!=preds['counterfactual_nogate']).any()),delta_iou=d,cf_reason=flags['reason'],cf_iou=p.score_mask(cf,gt)['iou'],anchor_iou=p.score_mask(ag,gt)['iou']) + if (r['domain']=='controlled' and r['split']=='test' and r['corruption']=='clean') or (r['domain']=='natural' and r['split'] in ('val','testA','testB')): + sw=sweep(q,maps,threshold,preds['frozen']);assert np.array_equal(sw[(.5,.03)],cf) + row['sensitivity']={f'{l}/{g}':p.score_mask(m,gt)['iou'] for (l,g),m in sw.items()} + out.write(json.dumps(row)+'\n');n+=1 + if ix%20==0:print('AUDIT',ix,len(paths),n,round(time.time()-t0,1),flush=True) + (ROOT/'results'/f'phase1_audit_{a.model}_{a.shard}of{a.shards}_meta.json').write_text(json.dumps(dict(status='COMPLETE',records=n,anchor_records_total=len(selected),all_phase1_records=len(manifest),no_anchor_identity_proven=True,slurm_job_id=os.getenv('SLURM_JOB_ID'),args=vars(a)),indent=2)) +if __name__=='__main__':main() diff --git a/source/code/build_hf_release.py b/source/code/build_hf_release.py new file mode 100644 index 0000000000000000000000000000000000000000..173732274853b827119524346ccbc7e81562c167 --- /dev/null +++ b/source/code/build_hf_release.py @@ -0,0 +1,104 @@ +"""Build public data artifacts from completed RefSeg-CA experiments. + +No authentication or publication occurs here. Natural-image pixels and natural +expression text are reconstructed from their upstream release, not redistributed. +""" +from pathlib import Path +import argparse, collections, csv, gzip, hashlib, json, shutil, tarfile +import pyarrow as pa +import pyarrow.parquet as pq + +ROOT = Path(__file__).resolve().parents[1] +SEEDS = [11, 23, 37, 53, 71] + + +def digest(path): + h = hashlib.sha256() + with path.open('rb') as f: + for chunk in iter(lambda: f.read(1024 * 1024), b''): + h.update(chunk) + return h.hexdigest() + + +def write_gz_jsonl(path, rows): + with gzip.open(path, 'wt', encoding='utf-8') as f: + for row in rows: + f.write(json.dumps(row, ensure_ascii=False) + '\n') + + +def build(dest): + for name in ['data', 'archives', 'manifests', 'results', 'release']: + (dest / name).mkdir(parents=True, exist_ok=True) + records = [json.loads(s) for s in (ROOT / 'data/rich_synthetic.jsonl').read_text().splitlines()] + scenes = [json.loads(s) for s in (ROOT / 'data/rich_scenes.jsonl').read_text().splitlines()] + assert len(scenes) == 1200 and len(records) == 28800 + groups = collections.defaultdict(list) + for r in records: + groups[(r['scene_id'], r['render'])].append(r) + image_type = pa.struct([('bytes', pa.binary()), ('path', pa.string())]) + features = { + 'scene_id': {'dtype': 'string', '_type': 'Value'}, + 'seed': {'dtype': 'int64', '_type': 'Value'}, + 'render': {'dtype': 'string', '_type': 'Value'}, + 'image': {'_type': 'Image'}, 'instance_map': {'_type': 'Image'}, + 'commands_json': {'dtype': 'string', '_type': 'Value'}, + } + schema = pa.schema([ + ('scene_id', pa.string()), ('seed', pa.int64()), ('render', pa.string()), + ('image', image_type), ('instance_map', image_type), ('commands_json', pa.string()) + ], metadata={b'huggingface': json.dumps({'info': {'features': features}}).encode()}) + for seed in SEEDS: + batch = [] + selected = sorted([s for s in scenes if s['seed'] == seed], key=lambda s: s['scene_id']) + assert len(selected) == 240 + for scene in selected: + sid = scene['scene_id']; sd = ROOT / 'data/rich' / sid + for render in ['flat', 'rich']: + qs = groups[(sid, render)] + assert len(qs) == 12 + commands = [{k: q[k] for k in ['id', 'mode', 'pair_id', 'endpoint', 'query', 'target_instance_ids']} for q in qs] + batch.append(dict(scene_id=sid, seed=seed, render=render, + image={'bytes': (sd / (render + '.png')).read_bytes(), 'path': sid + '/' + render + '.png'}, + instance_map={'bytes': (sd / 'instances.png').read_bytes(), 'path': sid + '/instances.png'}, + commands_json=json.dumps(commands))) + pq.write_table(pa.Table.from_pylist(batch, schema=schema), dest / 'data' / f'seed-{seed}.parquet', compression='zstd') + with tarfile.open(dest / 'archives' / f'rich-seed-{seed}.tar.gz', 'w:gz', compresslevel=4) as archive: + for scene in selected: + sd = ROOT / 'data/rich' / scene['scene_id'] + assert len(list(sd.glob('*.png'))) == 15 + for p in sorted(sd.glob('*.png')): + archive.add(p, arcname=p.relative_to(ROOT).as_posix(), recursive=False) + print(json.dumps({'seed': seed, 'viewer_rows': len(batch), 'scenes': len(selected)}), flush=True) + write_gz_jsonl(dest / 'manifests/rich_synthetic.jsonl.gz', records) + write_gz_jsonl(dest / 'manifests/rich_scenes.jsonl.gz', scenes) + with gzip.open(ROOT / 'results/r3/portable/natural_full_manifest.jsonl.gz', 'rt') as f: + natural = [json.loads(s) for s in f] + write_gz_jsonl(dest / 'manifests/natural_index.jsonl.gz', [{k: v for k, v in r.items() if k != 'query'} for r in natural]) + scratch = dest / '_metric_staging' + (scratch / 'results/r3/portable').mkdir(parents=True, exist_ok=True) + (scratch / 'results/analysis').mkdir(parents=True, exist_ok=True) + for p in (ROOT / 'results/r3/portable').glob('*_primary.csv.gz'): + shutil.copy2(p, scratch / 'results/r3/portable' / p.name) + for model in ['clipseg', 'groundedsam']: + with gzip.open(ROOT / 'results/r3' / f'{model}_replay.jsonl.gz', 'rt') as f: + rows = [json.loads(s) for s in f] + write_gz_jsonl(scratch / 'results/r3' / f'{model}_replay.jsonl.gz', [{k: v for k, v in r.items() if k != 'query'} for r in rows]) + for rel in ['results/r3/review_results.json', 'results/analysis/paper_results.json']: + shutil.copy2(ROOT / rel, scratch / rel) + with tarfile.open(dest / 'results/primary-and-review-metrics.tar.gz', 'w:gz') as archive: + for p in sorted(scratch.rglob('*')): + if p.is_file(): archive.add(p, arcname=p.relative_to(scratch).as_posix(), recursive=False) + shutil.rmtree(scratch) + report = dict(version='R3', scenes=1200, rendered_images=2400, command_image_records=28800, + natural_expressions_scored=49492, viewer_rows=2400, seeds=SEEDS, + renderer='deterministic Pillow raster renderer', human_validation='not conducted', + natural_pixels_and_expression_text='retrieve from the pinned upstream release') + report['files'] = {p.relative_to(dest).as_posix(): {'bytes': p.stat().st_size, 'sha256': digest(p)} + for p in sorted(dest.rglob('*')) if p.is_file() and p.name != 'DATA_MANIFEST.json'} + (dest / 'DATA_MANIFEST.json').write_text(json.dumps(report, indent=2)) + print(json.dumps({'status': 'BUILT', 'files': len(report['files']), 'bytes': sum(v['bytes'] for v in report['files'].values())}), flush=True) + + +if __name__ == '__main__': + ap = argparse.ArgumentParser(); ap.add_argument('--output', type=Path, default=ROOT / 'release_public') + build(ap.parse_args().output) diff --git a/source/code/build_latex.py b/source/code/build_latex.py new file mode 100644 index 0000000000000000000000000000000000000000..bc3528bd15194ddec36f7e27d22f5b9010ff6665 --- /dev/null +++ b/source/code/build_latex.py @@ -0,0 +1,48 @@ +"""Compile vector figures and the unmodified Springer Nature journal template. +Uses an existing TeX installation; the fallback only creates a local format/map +when a workspace runtime has TeX sources but no configured format database. +""" +from pathlib import Path +import os,subprocess,argparse,shutil +ROOT=Path(__file__).resolve().parents[1] +def environment(): + env=os.environ.copy() + tmp=ROOT/'build/tmp';tmp.mkdir(parents=True,exist_ok=True);env['TMPDIR']=str(tmp) + if subprocess.run(['kpsewhich','article.cls'],capture_output=True,text=True).stdout.strip():return env + tex=Path('/usr/share/texlive/texmf-dist') + if not (tex/'tex/latex/base/article.cls').exists():raise RuntimeError('Install a standard TeX Live distribution with pgfplots, standalone and Springer dependencies') + aux=ROOT/'build/texlocal';aux.mkdir(parents=True,exist_ok=True) + env.update(TEXMF=str(tex),TEXMFVAR=str(aux),TEXMFCONFIG=str(aux),TEXFORMATS=str(aux)+'//:',TEXFONTMAPS=str(aux)+'//:'+str(tex/'fonts/map')+'//:') + if not (aux/'pdflatex.fmt').exists(): + run(['pdftex','-ini','-interaction=batchmode','-halt-on-error','-jobname=pdflatex','-progname=pdflatex','-output-directory='+str(aux),'-etex','pdflatex.ini'],ROOT,env) + maps=tex/'fonts/map/dvips';files=list((maps/'amsfonts').glob('*.map'))+[maps/'helvetic/uhv.map',maps/'psnfss/psnfss.map'] + (aux/'pdftex.map').write_text('\n'.join(f.read_text() for f in files)) + return env +def run(cmd,cwd,env): + p=subprocess.run(cmd,cwd=cwd,env=env,capture_output=True,text=True) + if p.returncode: + print(p.stdout[-4000:]);print(p.stderr[-1000:]) + if cmd[0]=='pdflatex': + log=Path(cwd)/Path(cmd[-1]).with_suffix('.log') + if log.exists():print(log.read_text(errors='replace')[-5000:]) + raise RuntimeError('Command failed: '+' '.join(cmd)) + return p +def main(): + a=argparse.ArgumentParser();a.add_argument('--figures-only',action='store_true');a.add_argument('--manuscript-only',action='store_true');args=a.parse_args();env=environment() + figout=ROOT/'build/verified_figures';figout.mkdir(parents=True,exist_ok=True) + for f in ([] if args.manuscript_only else sorted((ROOT/'figures').glob('Fig*.tex'))): + run(['pdflatex','-interaction=nonstopmode','-halt-on-error','-output-directory='+str(figout),f.name],f.parent,env) + import fitz + pdf=figout/f.with_suffix('.pdf').name + with fitz.open(pdf) as doc:assert doc.page_count==1,f.name + shutil.copy2(pdf,f.with_suffix('.pdf'));print('Compiled',f.name,flush=True) + # Keep the journal-facing PDF as the canonical vector artifact. + # EPS conversion is intentionally omitted: the available Poppler + # wrapper is not reliable in this runtime. + main=ROOT/'latex/RefSeg_CA_MVA.tex' + if not args.figures_only and main.exists(): + run(['pdflatex','-interaction=nonstopmode','-halt-on-error',main.name],main.parent,env) + run(['bibtex',main.stem],main.parent,env) + for _ in range(2):run(['pdflatex','-interaction=nonstopmode','-halt-on-error',main.name],main.parent,env) + print('Compiled manuscript',flush=True) +if __name__=='__main__':main() diff --git a/source/code/download_release_data.py b/source/code/download_release_data.py new file mode 100644 index 0000000000000000000000000000000000000000..c14ee58ce648785886b52f1069c254d8f64332be --- /dev/null +++ b/source/code/download_release_data.py @@ -0,0 +1,48 @@ +"""Download and verify public RefSeg-CA artifacts using Python's standard library.""" +from pathlib import Path +import argparse, gzip, hashlib, json, shutil, tarfile, urllib.request +ROOT = Path(__file__).resolve().parents[1] +REPO = 'Ethosoft/RefSeg-CA' + + +def fetch(base, name, cache, manifest): + out = cache / name; out.parent.mkdir(parents=True, exist_ok=True) + expected = manifest['files'][name]['sha256'] + if not out.exists() or hashlib.sha256(out.read_bytes()).hexdigest() != expected: + tmp = out.with_suffix(out.suffix + '.part') + with urllib.request.urlopen(base + '/' + name, timeout=120) as r, tmp.open('wb') as f: + shutil.copyfileobj(r, f) + assert hashlib.sha256(tmp.read_bytes()).hexdigest() == expected, name + ': checksum mismatch' + tmp.replace(out) + return out + + +def extract(path, dest): + with tarfile.open(path) as archive: + for m in archive.getmembers(): + target = (dest / m.name).resolve() + if not m.isfile() or not target.is_relative_to(dest.resolve()): + raise ValueError('Unsafe archive member: ' + m.name) + target.parent.mkdir(parents=True, exist_ok=True) + with archive.extractfile(m) as source, target.open('wb') as out: + shutil.copyfileobj(source, out) + + +def main(): + ap = argparse.ArgumentParser(); ap.add_argument('--revision', default='r3-data-v1') + ap.add_argument('--synthetic', action='store_true'); a = ap.parse_args() + base = f'https://huggingface.co/datasets/{REPO}/resolve/{a.revision}' + with urllib.request.urlopen(base + '/DATA_MANIFEST.json', timeout=60) as r: manifest = json.load(r) + cache = ROOT / 'build/downloads'; cache.mkdir(parents=True, exist_ok=True) + extract(fetch(base, 'results/primary-and-review-metrics.tar.gz', cache, manifest), ROOT) + for name in ['rich_synthetic', 'rich_scenes']: + p = fetch(base, 'manifests/' + name + '.jsonl.gz', cache, manifest) + out = ROOT / 'data' / (name + '.jsonl'); out.parent.mkdir(parents=True, exist_ok=True) + with gzip.open(p, 'rb') as r, out.open('wb') as f: shutil.copyfileobj(r, f) + if a.synthetic: + for seed in manifest['seeds']: + extract(fetch(base, f'archives/rich-seed-{seed}.tar.gz', cache, manifest), ROOT) + print(json.dumps({'status': 'DOWNLOADED_AND_VERIFIED', 'revision': a.revision, 'synthetic_images': a.synthetic})) + + +if __name__ == '__main__': main() diff --git a/source/code/figures_r2.py b/source/code/figures_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..88aeb509dc91c478833bbb687dcc632537051b64 --- /dev/null +++ b/source/code/figures_r2.py @@ -0,0 +1,147 @@ +"""Editable publication figures: TikZ layouts and PGFPlots data graphics.""" +from pathlib import Path +import json,shutil,math +from PIL import Image +import numpy as np +ROOT=Path(__file__).resolve().parents[1];F=ROOT/'figures';A=ROOT/'results/analysis';OLD=ROOT.parent/'RefSeg_Scale_MVA' +def esc(s):return str(s).replace('_',r'\_').replace('%',r'\%').replace('&',r'\&') +def write(name,body): + (F/(name+'.tex')).write_text('\\documentclass[tikz,border=1.5pt]{standalone}\n\\input{style}\n\\begin{document}\n'+body+'\n\\end{document}\n') +def atlas(): + scenes=[json.loads(s) for s in (ROOT/'data/rich_scenes.jsonl').read_text().splitlines()] + families=['attribute','relational','multi_target','negative_action','empty_target'];names=['ATTRIBUTE','RELATION','TARGET SET','ACTION','ABSENCE'];colors=['teal','violet','ochre','rose','ink'] + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]',r'\path[use as bounding box] (0,-108) rectangle (164,8);',r'\node[anchor=west,font=\sffamily\bfseries\fontsize{10}{12}\selectfont] at (0,5) {A richer test of the same five command regimes};'] + selections=[] + for j,(family,name,color) in enumerate(zip(families,names,colors)): + x=j*33 + lines.append(r'\fill[%s] (%s,0) rectangle (%s,-1);'%(color,x,x+31)) + lines.append(r'\node[anchor=north,font=\sffamily\bfseries\fontsize{7.5}{9}\selectfont,text=%s] at (%s,-2) {%s};'%(color,x+15.5,name)) + for i in [0,1]: + scene=scenes[(j+5*i)%len(scenes)];sid=scene['scene_id'];pair=next(p for p in scene['pairs'] if p[0]==family);endpoint=1 if family in ['negative_action','empty_target'] else i + query=pair[1][endpoint];count=len(pair[2][endpoint]);y=-10-i*49 + rgb=ROOT/'data/rich'/sid/'rich.png';namefile=f'atlas_{i}_{j}.png';shutil.copy2(rgb,F/'assets'/namefile) + lines.append(r'\node[anchor=north west,inner sep=0] at (%s,%s) {\includegraphics[width=31mm]{assets/%s}};'%(x,y,namefile)) + lines.append(r'\draw[rule,line width=.3pt] (%s,%s) rectangle (%s,%s);'%(x,y,x+31,y-31)) + lines.append(r'\node[anchor=south east,fill=white,inner sep=.7mm,font=\sffamily\bfseries\fontsize{7}{8}\selectfont] at (%s,%s) {$|G|=%s$};'%(x+30.5,y-30.5,count)) + lines.append(r'\node[anchor=north west,text width=30mm,align=left,font=\sffamily\fontsize{7.3}{8.8}\selectfont] at (%s,%s) {\textbf{%s}\enspace %s};'%(x,y-33,chr(97+j+5*i),esc(query))) + selections.append(dict(panel=chr(97+j+5*i),scene_id=sid,family=family,query=query,target_count=count,raster=str(rgb.relative_to(ROOT)))) + lines.append(r'\end{tikzpicture}');write('Fig2_rich_atlas','\n'.join(lines));(F/'atlas_manifest.json').write_text(json.dumps(selections,indent=2)) +def paired_render(): + scenes=[json.loads(s) for s in (ROOT/'data/rich_scenes.jsonl').read_text().splitlines()];selected=[scenes[3],scenes[6],scenes[8]] + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]',r'\path[use as bounding box] (-2,-13) rectangle (164,108);'] + for j,title in enumerate(['Flat surface','Rich surface','Shared target mask']):lines.append(r'\node[anchor=south,font=\sffamily\bfseries\fontsize{8}{10}\selectfont] at (%s,100) {%s};'%(24+j*51,title)) + for i,scene in enumerate(selected): + y=98-i*35;sid=scene['scene_id'];query=scene['pairs'][1][1][0] + for j,kind in enumerate(['flat','rich','relational_0']): + src=ROOT/'data/rich'/sid/(kind+'.png');dst=F/'assets'/f'paired_{i}_{kind}.png' + im=Image.open(src) + if j==2: + mask=np.asarray(im)>0;a=np.full((*mask.shape,3),246,np.uint8);a[mask]=[20,125,131];im=Image.fromarray(a) + im.save(dst);x=8+j*51 + lines.append(r'\node[anchor=north west,inner sep=0] at (%s,%s) {\includegraphics[width=31mm]{assets/%s}};'%(x,y,dst.name)) + if j<2:lines.append(r'\draw[link,draw=muted] (%s,%s)--(%s,%s);'%(x+33,y-15.5,x+46,y-15.5)) + lines.append(r'\node[anchor=west,text width=150mm,font=\sffamily\fontsize{7.6}{9}\selectfont] at (0,%s) {\textbf{%s}\enspace %s};'%(y-33,chr(97+i),esc(query))) + lines.append(r'\end{tikzpicture}');write('Fig3_paired_render','\n'.join(lines)) +def method(): + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]',r'\path[use as bounding box] (0,-11) rectangle (164,88);',r'\fill[paper,rounded corners=1.5mm] (0,63) rectangle (164,88);',r'\node[anchor=west,font=\sffamily\bfseries\fontsize{10}{12}\selectfont] at (4,82) {RefSeg-CA: three questions for one output};'] + for x,title,sub,col in [(4,'MASK QUALITY','Is the returned region correct?','teal'),(59,'COMMAND COMPLIANCE','Does the output obey the instruction?','violet'),(115,'RESPONSIVENESS','Does a changed request stay correct?','ochre')]: + lines.append(r'\node[anchor=west,text=%s,font=\sffamily\bfseries\fontsize{7.8}{9}\selectfont] at (%s,75) {%s};'%(col,x,title)) + lines.append(r'\node[anchor=north west,text width=47mm,align=left,font=\sffamily\fontsize{8}{10}\selectfont] at (%s,72) {%s};'%(x,sub)) + boxes=[(0,43,28,'RGB + expression','Frozen interface','ink'),(34,43,29,'Scope guard',r'Target\\anchor\\relation','violet'),(70,43,28,'Predicted geometry','Eligible target components','teal'),(106,43,27,'Decision gates','Union or select; else fallback','teal'),(140,43,24,'Output mask','Action rule','ink')] + for i,(x,y,w,title,sub,col) in enumerate(boxes): + lines.append(r'\node[box,draw=%s!55,fill=%s!4,minimum width=%s mm,minimum height=23mm,text width=%s mm,anchor=north west,inner sep=1.5mm] (b%s) at (%s,%s) {\textbf{%s}\\[1.3mm]%s};'%(col,col,w,w-3,i,x,y,title,sub)) + if i:lines.append(r'\draw[link,draw=teal] (b%s.east)--(b%s.west);'%(i-1,i)) + lines.append(r'\node[anchor=west,text=teal,font=\sffamily\bfseries\fontsize{8}{10}\selectfont] at (0,53) {SCOPE-FILTERED ANCHOR PROJECTION};') + lines.append(r'\node[anchor=east,text=muted] at (164,53) {1--3 unique queries; no labels at inference};') + lines.append(r'\draw[route,draw=muted,dashed] (b1.south)--(48.5,14)-|(b4.south);') + lines.append(r'\node[fill=white,text=muted,inner sep=.7mm] at (92,14) {unsupported / ambiguous: preserve full-query output};') + lines.append(r'\node[box,draw=ochre!50,fill=ochre!4,anchor=north west,text width=73mm,inner sep=2mm] at (0,7) {\textbf{Counterfactual audit}\quad Opposite relation, residual score and veto; retained as a measured ablation};') + lines.append(r'\node[box,draw=rose!50,fill=rose!4,anchor=north east,text width=73mm,inner sep=2mm] at (164,7) {\textbf{Separate absence decision}\quad Fit and calibrate on disjoint images; expose positive-mask losses};') + lines.append(r'\end{tikzpicture}');write('Fig1_framework','\n'.join(lines)) +def multiplicity(): + data=json.loads((A/'phase1_multiplicity.json').read_text());lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]',r'\path[use as bounding box] (0,-14) rectangle (163,78);'] + contrasts=[('frozen','CACP $-$ frozen'),('global_direction','CACP $-$ global rule'),('anchor_gate','CACP $-$ anchor only')] + for panel,(model,label) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + dx=panel*83;lines.append(r'\node[anchor=west,font=\sffamily\bfseries\fontsize{9}{11}\selectfont] at (%s,73) {%s\enspace %s};'%(dx,chr(97+panel),label)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=55mm,height=57mm,xmin=-2,xmax=29,ymin=-.5,ymax=2.7,ytick=\empty,axis y line=none,axis x line=bottom,xlabel={Paired-correctness change (pp)},xmajorgrids,xtick={0,10,20}]'%(dx+20)) + lines.append(r'\addplot[muted,dashed] coordinates {(0,-.5)(0,2.7)};') + for j,(key,title) in enumerate(contrasts): + z=data[model][key];y=2-j;lo,hi=[v*100 for v in z['simultaneous_ci']];d=z['delta']*100;color='rose' if key=='anchor_gate' else 'teal' + lines.append(r'\addplot[%s,line width=2.4pt,opacity=.22] coordinates {(%.6f,%s)(%.6f,%s)};'%(color,lo,y,hi,y)) + lines.append(r'\addplot[%s,mark=*,mark size=2pt,line width=.8pt,error bars/.cd,x dir=both,x explicit] coordinates {(%.6f,%s) += (%.6f,0) -= (%.6f,0)};'%(color,d,y,hi-d,d-lo)) + lines.append(r'\node[anchor=south west,font=\sffamily\fontsize{7.8}{9}\selectfont] at (axis cs:-1.5,%s) {%s};'%(y+.18,title)) + lines.append(r'\node[anchor=north,font=\sffamily\bfseries\fontsize{8}{10}\selectfont,text=%s] at (axis cs:%.6f,%s) {%+.2f};'%(color,d,y-.13,d)) + lines.append(r'\end{axis}') + lines.append(r'\node[anchor=west,text=muted] at (0,-13) {Six contrasts; image-cluster bootstrap with Bonferroni-adjusted intervals};');lines.append(r'\end{tikzpicture}');write('Fig4_corrected_contrasts','\n'.join(lines)) +def thresholds(): + data=json.loads((A/'phase1_threshold_curves.json').read_text());lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + styles=[('frozen','muted','dashed'),('global_direction','ochre','densely dotted'),('anchor_gate','teal','solid'),('cacp','violet','dashdotted')] + for j,(model,label) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + dx=j*82;lines.append(r'\node[anchor=west,font=\sffamily\bfseries\fontsize{9}{11}\selectfont] at (%s,61) {%s};'%(dx,label)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=64mm,height=48mm,xmin=.3,xmax=.9,ymin=0,ymax=65,xlabel={IoU threshold $\tau$},ylabel={Correct (\%%)},ymajorgrids,xtick={.3,.5,.7,.9}]'%(dx+10)) + for v,col,sty in styles: + s=[r for r in data if r['model']==model and r['variant']==v] + coord=' '.join('(%.3f,%.5f)'%(r['tau'],r['PC']*100) for r in s) + lines.append(r'\addplot[%s,%s,line width=1pt] coordinates {'%(col,sty)+coord+'};') + s=[r for r in data if r['model']==model and r['variant']=='anchor_gate'];coords=' '.join('(%.3f,%.5f)'%(r['tau'],r['Pr']*100) for r in s) + lines.append(r'\addplot[teal,dashed,opacity=.5,line width=.8pt] coordinates {'+coords+'};');lines.append(r'\end{axis}') + lines.append(r'\node[anchor=west,font=\sffamily\fontsize{7.8}{9}\selectfont] at (0,-17) {\textcolor{muted}{Frozen}\quad\textcolor{ochre}{Global rule}\quad\textcolor{teal}{Anchor only}\quad\textcolor{violet}{CACP}\quad Pale dashed: anchor single-expression accuracy};');lines.append(r'\end{tikzpicture}');write('Fig5_thresholds','\n'.join(lines)) +def natural_effects(): + vals=[('CLIPSeg',.1081337,.0772914,.1403822,3.43722,2.371,4.474), + ('Grounded SAM',.0715455,.0349176,.1077133,2.27420,1.184,3.308)] + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]', + r'\path[use as bounding box] (0,-13) rectangle (164,67);', + r'\node[anchor=west,font=\sffamily\bfseries\fontsize{9}{11}\selectfont] at (0,62) {a\enspace Coverage funnel};', + r'\node[anchor=west,font=\sffamily\bfseries\fontsize{9}{11}\selectfont] at (83,62) {b\enspace SFAP effect};'] + funnel=[('All expressions',49492,'ink'),('Old grammar',2809,'ochre'),('Scope accepted',1557,'violet'),('Simple relations',382,'teal')] + for i,(lab,n,col) in enumerate(funnel): + y=48-i*13;w=70*(n/49492)**.34 + lines.append(r'\fill[%s!13,rounded corners=.7mm] (0,%s) rectangle (%s,%s);'%(col,y,w,y+8)) + lines.append(r'\draw[%s,line width=.55pt,rounded corners=.7mm] (0,%s) rectangle (%s,%s);'%(col,y,w,y+8)) + lines.append(r'\node[anchor=west,font=\sffamily\fontsize{7.5}{9}\selectfont] at (2,%s) {%s};'%(y+4,lab)) + lines.append(r'\node[anchor=east,font=\sffamily\bfseries\fontsize{7.5}{9}\selectfont,text=%s] at (78,%s) {%s};'%(col,y+4,f'{n:,}')) + lines.append(r'\begin{axis}[journal,at={(88mm,0mm)},anchor=south west,width=72mm,height=52mm,xmin=0,xmax=5.1,ymin=-.5,ymax=3.6,ytick=\empty,axis y line=none,axis x line=bottom,xlabel={gIoU change (percentage points)},xmajorgrids]') + for j,(m,p,plo,phi,a,alo,ahi) in enumerate(vals): + for y,v,lo,hi,col in [(j,p,plo,phi,'muted'),(j+2,a,alo,ahi,'teal')]: + lines.append(r'\addplot[%s,line width=3pt,opacity=.18] coordinates {(%.6f,%s)(%.6f,%s)};'%(col,lo,y,hi,y)) + lines.append(r'\addplot[%s,mark=*,mark size=2pt] coordinates {(%.6f,%s)};'%(col,v,y)) + for y,lab in enumerate(['Grounded SAM pooled','CLIPSeg pooled','Grounded SAM accepted','CLIPSeg accepted']): + lines.append(r'\node[anchor=east,font=\sffamily\fontsize{6.8}{8}\selectfont,text=ink] at (axis cs:5.0,%s) {%s};'%(y+.20,lab)) + lines.append(r'\end{axis}') + lines.append(r'\node[anchor=west,text=muted,font=\sffamily\fontsize{7.3}{9}\selectfont] at (0,-11) {All 49,492 expressions; accepted subset selected by text only. Intervals resample images.};') + lines.append(r'\end{tikzpicture}');write('Fig6_natural_effects','\n'.join(lines)) +def absence_tradeoff(): + data=[('CLIPSeg','Frozen',71.158,28.397,26.686,'muted'),('CLIPSeg','Source',88.051,22.376,56.089,'rose'),('CLIPSeg',r'5\% bound',73.449,28.468,27.833,'teal'), + ('Grounded SAM','Frozen',15.333,53.308,.712,'muted'),('Grounded SAM','Source',29.702,45.132,20.146,'rose'),('Grounded SAM',r'5\% bound',16.215,53.342,.788,'teal')] + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]',r'\path[use as bounding box] (0,-14) rectangle (164,67);'] + for panel,model in enumerate(['CLIPSeg','Grounded SAM']): + dx=panel*82;lines.append(r'\node[anchor=west,font=\sffamily\bfseries\fontsize{9}{11}\selectfont] at (%s,62) {%s};'%(dx,model)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=68mm,height=49mm,xmin=0,xmax=100,ymin=0,ymax=60,xlabel={No-target accuracy (\%%)},ylabel={Positive mIoU (\%%)},xmajorgrids,ymajorgrids]'%(dx+8)) + for m,rule,x,y,fe,col in data: + if m!=model:continue + anch='north east' if rule=='Frozen' else 'south west' + shift='yshift=-1mm' if rule=='Frozen' else 'yshift=1mm' + lines.append(r'\addplot[%s,only marks,mark=*,mark size=2.6pt] coordinates {(%.4f,%.4f)} node[anchor=%s,%s,font=\sffamily\fontsize{7}{8}\selectfont,text=%s] {%s};'%(col,x,y,anch,shift,col,rule)) + lines.append(r'\end{axis}') + lines.append(r'\node[anchor=west,text=muted,font=\sffamily\fontsize{7.3}{9}\selectfont] at (0,-12) {Moving right can erase positive masks: source calibration raises N-acc but sharply lowers positive mIoU.};') + lines.append(r'\end{tikzpicture}');write('Fig7_absence_tradeoff','\n'.join(lines)) +def rich_performance(): + panels=[('Flat',[('CLIPSeg',4.5208,17.4792),('Grounded SAM',.0833,8.0),('ReLA',5.8542,None)]), + ('Rich',[('CLIPSeg',3.2708,9.0),('Grounded SAM',.5,17.3333),('ReLA',7.3958,None)])] + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]',r'\path[use as bounding box] (0,-14) rectangle (164,68);'] + for j,(title,rows) in enumerate(panels): + dx=j*82;lines.append(r'\node[anchor=west,font=\sffamily\bfseries\fontsize{9}{11}\selectfont] at (%s,63) {%s render};'%(dx,title)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=68mm,height=52mm,xmin=0,xmax=20,ymin=-.5,ymax=2.6,ytick=\empty,xlabel={PC$_{0.5}$ (\%%)},xmajorgrids]'%(dx+8)) + for y,(model,frozen,sfap) in enumerate(rows[::-1]): + lines.append(r'\node[anchor=east,font=\sffamily\fontsize{7.2}{9}\selectfont] at (axis cs:19.6,%s) {%s};'%(y+.18,model)) + if sfap is None: + lines.append(r'\addplot[violet,only marks,mark=diamond*,mark size=2.7pt] coordinates {(%.5f,%s)};'%(frozen,y)) + else: + lines.append(r'\addplot[muted,line width=2.6pt,opacity=.2] coordinates {(%.5f,%s)(%.5f,%s)};'%(frozen,y,sfap,y)) + lines.append(r'\addplot[muted,only marks,mark=*,mark size=2pt] coordinates {(%.5f,%s)};'%(frozen,y)) + lines.append(r'\addplot[teal,only marks,mark=*,mark size=2.8pt] coordinates {(%.5f,%s)};'%(sfap,y)) + lines.append(r'\end{axis}') + lines.append(r'\node[anchor=west,font=\sffamily\fontsize{7.3}{9}\selectfont,text=muted] at (0,-12) {Gray: frozen\quad Teal: SFAP\quad Violet diamond: trained ReLA native output.};') + lines.append(r'\end{tikzpicture}');write('Fig8_rich_performance','\n'.join(lines)) +if __name__=='__main__': + atlas();paired_render();method();multiplicity();thresholds();natural_effects();absence_tradeoff();rich_performance() diff --git a/source/code/figures_r3.py b/source/code/figures_r3.py new file mode 100644 index 0000000000000000000000000000000000000000..11c7105d790b2bac28bdb8aadffc03e909200a85 --- /dev/null +++ b/source/code/figures_r3.py @@ -0,0 +1,123 @@ +"""Sparse journal figures: vector mathematics and measured evidence only.""" +from pathlib import Path +import json +import figures_r2 as old +ROOT=Path(__file__).resolve().parents[1];F=ROOT/'figures' +def write(name,body):old.write(name,body) +def framework(): + write('Fig1_framework',r''' +\begin{tikzpicture}[x=1mm,y=1mm] +\path[use as bounding box] (0,-3) rectangle (164,57); +\node[anchor=west,font=\bfseries\small] at (0,54) {(a) Scope and projection}; +\node[anchor=west,font=\bfseries\small] at (99,54) {(b) Spatial eligibility}; +\node (q) at (4,34) {$I,q$}; +\node[draw,rectangle,minimum width=14mm,minimum height=10mm] (f) at (28,34) {$f_{\theta}$}; +\node (p) at (54,34) {$P_q,P_t,P_a$}; +\node[draw,rectangle,minimum width=15mm,minimum height=10mm] (proj) at (80,34) {$\Pi_r$}; +\draw[link] (q)--(f); +\draw[link] (f)--(p); +\draw[link] (p)--(proj); +\node[font=\small] at (28,43) {$\theta$ fixed}; +\node (guard) at (28,16) {$S(q)\in\{0,1\}$}; +\draw[link] (q.south)|-(guard.west); +\draw[link] (guard.north)--node[right,font=\scriptsize] {$S=1$}(f.south); +\draw[link,dashed] (guard.east)--(80,16)--(proj.south); +\node[font=\scriptsize,fill=white,inner sep=1pt] at (57,16) {fallback $M_q$}; +\node[anchor=west,font=\scriptsize] at (0,0) {$\widehat M=\Pi_r(P_q,P_t,P_a)$ if $S(q)\land V$; otherwise $M_q$.}; +\draw[rule] (95,3)--(95,49); +\draw[->,line width=.5pt] (103,8)--(162,8) node[below] {$x$}; +\draw[->,line width=.5pt] (103,8)--(103,46) node[left] {$y$}; +\fill[black!7] (131,9) rectangle (159,44); +\draw[dashed,muted] (131,8)--(131,46); +\node[anchor=south,font=\scriptsize] at (131,46) {$x_A+\epsilon_g$}; +\draw[fill=black!15,line width=.6pt] (117,25) circle (3.8); +\node at (117,25) {$A$}; +\draw[line width=.6pt] (111,37) ellipse (4 and 2.4); +\node[above] at (111,39) {$C_1$}; +\draw[teal,fill=teal!14,line width=.8pt] (141,32) ellipse (4.5 and 3); +\draw[teal,fill=teal!14,line width=.8pt] (150,18) ellipse (4 and 2.8); +\node[above] at (141,35) {$C_2$}; +\node[above] at (150,21) {$C_3$}; +\draw[link] (121,25)--(136,31); +\node[anchor=north,font=\small] at (132,3) {$\mathcal E_{\rightarrow}=\{C_2,C_3\}$}; +\end{tikzpicture}''') +def coverage(data): + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for j,(model,title) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + x=j*82 + lines.append(r'\node[anchor=west,font=\bfseries\small] at (%s,50) {%s};'%(x,title)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=64mm,height=40mm,xmin=0,xmax=6,ymin=-.02,ymax=.2,xlabel={Accepted expressions (\%%)},ylabel={$\Delta$gIoU (pp)},axis lines=left,xtick={0,1,2,3,4,5,6}]'%(x+10)) + coords=' '.join('(%.5f,%.6f)'%(z['coverage']*100,z['delta']*100) for z in data[model]['coverage']) + lines.append(r'\addplot[teal,line width=.8pt,mark=*] coordinates {'+coords+'};') + for z,label in zip(data[model]['coverage'],['R$_s$','R','S','L']): + v=z['delta']*100;lo,hi=[v*100 for v in z['ci']];xx=z['coverage']*100 + lines.append(r'\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(%.6f,%.6f) += (0,%.6f) -= (0,%.6f)};'%(xx,v,hi-v,v-lo)) + anchor='north east' if label.startswith('R$_s') else 'south west' + shift=-.004 if label.startswith('R$_s') else .003 + lines.append(r'\node[anchor=%s,font=\scriptsize] at (axis cs:%.5f,%.6f) {%s};'%(anchor,xx+.02,v+shift,label)) + lines.append(r'\end{axis}') + lines.append(r'\end{tikzpicture}');write('Fig6_natural_effects','\n'.join(lines)) +def sensitivity(data): + names=['primary','anchor_margin_0.02','anchor_margin_0.1','target_margin_0.02','target_margin_0.1','geometry_0.01','geometry_0.05','size_factor_0.5','size_factor_2.0','threshold_offset_-0.05','threshold_offset_0.05'] + labels=[r'Primary',r'$\delta_a=.02$',r'$\delta_a=.10$',r'$\delta_t=.02$',r'$\delta_t=.10$',r'$\epsilon_g=.01$',r'$\epsilon_g=.05$',r'$a_{\min}\times.5$',r'$a_{\min}\times2$',r'$t_0-.05$',r'$t_0+.05$'] + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for j,(model,title) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + dx=j*82;lines.append(r'\node[anchor=west,font=\bfseries\small] at (%s,76) {%s};'%(dx,title)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=50mm,height=65mm,xmin=0,xmax=.18,ymin=-.7,ymax=10.7,ytick=\empty,xlabel={$\Delta$gIoU (pp)},axis lines=left,xtick={0,.05,.1,.15}]'%(dx+26)) + table={r['config']:r for r in data[model]['sensitivity']} + for i,(key,label) in enumerate(zip(names,labels)): + z=table[key];y=10-i;v=z['delta']*100;lo,hi=[k*100 for k in z['ci']];col='black' if i==0 else 'teal' + lines.append(r'\node[anchor=east,font=\scriptsize] at (axis cs:-.005,%s) {%s};'%(y,label)) + lines.append(r'\addplot[%s,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(%.6f,%s) += (%.6f,0) -= (%.6f,0)};'%(col,v,y,hi-v,v-lo)) + lines.append(r'\end{axis}') + lines.append(r'\end{tikzpicture}');write('Fig9_threshold_robustness','\n'.join(lines)) +def harm(data): + keys=['harmed','plural_union','already_correct','correct_to_incorrect','boundary_sensitive','component_filter_sensitive'] + labels=['Any IoU loss','Plural union','Initially correct','Crossed below .5','Geometry sensitive','Size-filter sensitive'] + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for j,(model,title) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + dx=j*82;lines.append(r'\node[anchor=west,font=\bfseries\small] at (%s,61) {%s};'%(dx,title)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=42mm,height=51mm,xmin=0,xmax=600,ymin=-.6,ymax=5.7,ytick=\empty,xlabel={Expressions},axis lines=left,xtick={0,200,400,600}]'%(dx+38)) + for i,(key,label) in enumerate(zip(keys,labels)): + y=5-i;n=data[model]['harm']['reason_counts']['plural'] if key=='plural_union' else data[model]['harm'][key] + lines.append(r'\node[anchor=east,font=\scriptsize] at (axis cs:-12,%s) {%s};'%(y,label)) + lines.append(r'\addplot[black!60,line width=.5pt] coordinates {(0,%s)(%s,%s)};'%(y,n,y)) + lines.append(r'\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(%s,%s)};'%(n,y)) + lines.append(r'\node[anchor=south west,font=\scriptsize] at (axis cs:%s,%s) {%s};'%(n,y,n)) + lines.append(r'\end{axis}') + lines.append(r'\end{tikzpicture}');write('Fig10_harm_signatures','\n'.join(lines)) +def rich_primary(): + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for j,(title,rows) in enumerate([('Flat',[('Grounded SAM',.0833,8.0),('CLIPSeg',4.5208,17.4792)]),('Rich',[('Grounded SAM',.5,17.3333),('CLIPSeg',3.2708,9.0)])]): + dx=j*82;lines.append(r'\node[anchor=west,font=\bfseries\small] at (%s,44) {%s};'%(dx,title)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=65mm,height=32mm,xmin=0,xmax=21,ymin=-.5,ymax=1.6,ytick=\empty,xlabel={PC$_{.5}$ (\%%)},axis lines=left,xtick={0,5,10,15,20}]'%(dx+10)) + for y,(model,frozen,repaired) in enumerate(rows): + lines.append(r'\addplot[black!55,line width=.6pt] coordinates {(%.4f,%s)(%.4f,%s)};'%(frozen,y,repaired,y)) + lines.append(r'\addplot[black,only marks,mark=o,mark size=2.3pt] coordinates {(%.4f,%s)};'%(frozen,y)) + lines.append(r'\addplot[black,only marks,mark=*,mark size=2.3pt] coordinates {(%.4f,%s)};'%(repaired,y)) + lines.append(r'\node[anchor=south east,font=\scriptsize] at (axis cs:20.8,%s) {%s};'%(y+.12,model)) + lines.append(r'\end{axis}') + lines.append(r'\end{tikzpicture}');write('Fig8_rich_performance','\n'.join(lines)) +def monochrome_legend(): + p=F/'Fig5_thresholds.tex';s=p.read_text() + start=s.index(r'\node[anchor=west,font=\sffamily\fontsize{7.8}{9}\selectfont] at (0,-17)') + stop=s.index(';',start)+1 + parts=[] + for x,label,style in [(0,'Frozen','dashed'),(32,'Global','densely dotted'),(64,'Anchor PC','solid'),(100,'CACP','dashdotted'),(130,'Anchor Pr','dashed')]: + parts.append(r'\draw[black,%s,line width=.75pt] (%s,-17)--(%s,-17);\node[anchor=west,font=\scriptsize] at (%s,-17) {%s};'%(style,x,x+5,x+6,label)) + if label=='Anchor Pr':parts.append(r'\draw[fill=white] (132,-17.6) rectangle (133.2,-16.4);') + s=s[:start]+'\n'.join(parts)+s[stop:] + s=s.replace('ymax=65','ymax=80').replace('teal,dashed,opacity=.5,line width=.8pt','teal,dashed,line width=.7pt,mark=square,mark size=1.5pt,mark options={fill=white}') + p.write_text(s) +def main(): + (F/'assets').mkdir(parents=True,exist_ok=True) + old.atlas();old.paired_render();old.multiplicity();old.thresholds();old.absence_tradeoff();old.rich_performance() + framework();rich_primary();monochrome_legend() + datafile=ROOT/'results/r3/review_results.json' + if datafile.exists(): + data=json.loads(datafile.read_text());coverage(data);sensitivity(data);harm(data) + for p in F.glob('Fig*.tex'): + s=p.read_text().replace(r'\sffamily',r'\rmfamily') + s=s.replace(r'\node[anchor=west,font=\rmfamily\bfseries\fontsize{10}{12}\selectfont] at (0,5) {A richer test of the same five command regimes};','') + p.write_text(s) +if __name__=='__main__':main() diff --git a/source/code/generate_rich.py b/source/code/generate_rich.py new file mode 100644 index 0000000000000000000000000000000000000000..960ed9199c4a8844a971453af8072b47cbbfd247 --- /dev/null +++ b/source/code/generate_rich.py @@ -0,0 +1,141 @@ +"""Procedural, paired-render RefSeg-CA scenes with exact visible-instance GT. + +These are benchmark inputs, not generated illustrations or TikZ drawings. +Geometry, visibility and query targets are shared between flat/rich images. +""" +from pathlib import Path +import argparse,json,math,hashlib,collections +import numpy as np +from PIL import Image,ImageDraw,ImageFilter +ROOT=Path(__file__).resolve().parents[1] +S=384;AA=2 +COLORS={'red':(196,38,56),'blue':(38,87,176),'green':(33,139,91),'yellow':(232,188,35),'purple':(135,64,166),'orange':(223,111,38),'pink':(216,99,150),'brown':(127,83,53),'cyan':(27,160,186),'olive':(117,129,45)} +SHAPES=['circle','square','triangle','star','cross','ellipse','capsule','heart','diamond','ring','hexagon'] +PLURAL={'ellipse':'ellipses','cross':'crosses','hexagon':'hexagons'} +def plural(x):return PLURAL.get(x,x+'s') + +def object_mask(shape,size,angle): + n=128*AA;m=Image.new('L',(n,n));d=ImageDraw.Draw(m);c=n/2 + x0,y0,x1,y1=[v*AA for v in (28,28,100,100)] + if shape=='circle':d.ellipse((x0,y0,x1,y1),fill=255) + elif shape=='ellipse':d.ellipse((20*AA,37*AA,108*AA,91*AA),fill=255) + elif shape=='square':d.rectangle((x0,y0,x1,y1),fill=255) + elif shape=='capsule':d.rounded_rectangle((19*AA,40*AA,109*AA,88*AA),radius=24*AA,fill=255) + elif shape=='ring': + d.ellipse((x0,y0,x1,y1),fill=255);d.ellipse((45*AA,45*AA,83*AA,83*AA),fill=0) + elif shape=='cross': + d.rectangle((49*AA,24*AA,79*AA,104*AA),fill=255);d.rectangle((24*AA,49*AA,104*AA,79*AA),fill=255) + elif shape=='heart': + pts=[] + for t in np.linspace(0,2*math.pi,200): + x=16*math.sin(t)**3;y=13*math.cos(t)-5*math.cos(2*t)-2*math.cos(3*t)-math.cos(4*t) + pts.append((c+x*2.4*AA,c-y*2.4*AA)) + d.polygon(pts,fill=255) + else: + count={'triangle':3,'star':10,'diamond':4,'hexagon':6}[shape] + pts=[] + for j in range(count): + theta=-math.pi/2+j*2*math.pi/count;r=(43 if shape!='star' or j%2==0 else 20)*AA + pts.append((c+r*math.cos(theta),c+r*math.sin(theta))) + d.polygon(pts,fill=255) + m=m.rotate(angle,resample=Image.Resampling.BICUBIC) + bbox=m.getbbox();m=m.crop(bbox);width,height=size + return m.resize((int(width*AA),int(height*AA)),Image.Resampling.LANCZOS) + +def make_scene(seed,index): + rng=np.random.default_rng(seed*100000+index) + for attempt in range(100): + shape=SHAPES[(index+seed)%len(SHAPES)];color=str(rng.choice(list(COLORS)));other=str(rng.choice([c for c in COLORS if c!=color])) + ashape=str(rng.choice([s for s in SHAPES if s!=shape]));acolor=str(rng.choice([c for c in COLORS if c not in (color,other)])) + identities=[(color,shape)]*3+[(other,shape),(acolor,ashape)] + count=int(rng.integers(9,14)) + while len(identities)=128 + if all(np.logical_and(b,p).sum()<.22*min(b.sum(),p.sum()) for p in masks):break + else:ok=False;break + masks.append(b);specs.append(dict(id=j+1,color=c,shape=s,x=x,y=y,width=width,height=height,angle=angle,texture=str(rng.choice(['solid','stripes','dots','grid','checker','satin'])),texture_phase=int(rng.integers(0,12)))) + if not ok:continue + owner=np.zeros((S,S),np.uint8) + for j,b in enumerate(masks):owner[b]=j+1 + fractions=[(owner==j+1).sum()/b.sum() for j,b in enumerate(masks)] + if min(fractions)<.7:continue + centroids=[] + for j in range(count): + yy,xx=np.nonzero(owner==j+1);centroids.append((float(xx.mean()/S),float(yy.mean()/S))) + axes=[] + for ax in [0,1]: + ds=[centroids[j][ax]-centroids[4][ax] for j in range(3)] + if min(ds)<-.09 and max(ds)>.09 and min(abs(v) for v in ds)>.045:axes.append(ax) + if not axes:continue + axis=axes[index%len(axes)];first,second=('left','right') if axis==0 else ('above','below') + left=[j+1 for j in range(3) if centroids[j][axis]centroids[4][axis]] + target=f'{color} {plural(shape)}';atarget=f'{other} {plural(shape)}';anchor=f'{acolor} {ashape}' + relation=lambda rel:f'segment all {target} '+(f'{rel} of the {anchor}' if axis==0 else f'{rel} the {anchor}') + missing=next(c for c in COLORS if all((o['color'],o['shape'])!=(c,shape) for o in specs)) + extreme=min(range(3),key=lambda j:centroids[j][0])+1 + pair_specs=[('attribute',[f'segment all {target}',f'segment all {atarget}'],[[1,2,3],[4]]),('relational',[relation(first),relation(second)],[left,right]),('multi_target',[f'segment the leftmost {color} {shape}',f'segment all {target}'],[[extreme],[1,2,3]]),('negative_action',[f'segment all {target}',f'do not segment all {target}'],[[1,2,3],[]]),('empty_target',[f'segment all {target}',f'segment all {missing} {plural(shape)}'],[[1,2,3],[]]),('paraphrase',[f'segment all {target}',f'show every {color} {shape}'],[[1,2,3],[1,2,3]])] + meta=dict(seed=seed,index=index,objects=specs,visible_fraction=fractions,centroids=centroids,occupancy=float((owner>0).mean()),relation_axis=axis,pairs=pair_specs) + return meta,owner + raise RuntimeError((seed,index,'placement_failed')) + +def render(meta,rich): + rng=np.random.default_rng(meta['seed']*100000+meta['index']+923471) + n=S*AA;yy,xx=np.mgrid[:n,:n];base=np.array([(251,249,244),(245,249,248),(249,245,250),(246,248,253)][meta['index']%4],float) + if rich: + noise=rng.normal(0,1.15,(n,n));shade=(xx/n-.5)*1.3+(yy/n-.5)*1.8 + arr=np.clip(base[None,None,:]+(noise+shade)[...,None],0,255).astype('uint8') + else:arr=np.broadcast_to(base.astype('uint8'),(n,n,3)).copy() + image=Image.fromarray(arr).convert('RGBA') + if rich and meta['index']%3==0: + d=ImageDraw.Draw(image) + for x in range(0,n,20*AA):d.line((x,0,x,n),fill=(192,202,202,20),width=1) + for y in range(0,n,20*AA):d.line((0,y,n,y),fill=(192,202,202,20),width=1) + for o in meta['objects']: + mask=object_mask(o['shape'],(o['width'],o['height']),o['angle']);w,h=mask.size + if rich: + shadow=Image.new('RGBA',(n,n));sm=Image.new('L',(n,n));sm.paste(mask,(o['x']*AA+3*AA,o['y']*AA+4*AA));sm=sm.filter(ImageFilter.GaussianBlur(2.2*AA)).point(lambda p:int(p*.24));shadow.putalpha(sm);image=Image.alpha_composite(image,shadow) + y,x=np.mgrid[:h,:w];rgb=np.array(COLORS[o['color']],float);factor=np.zeros((h,w)) + if rich: + phase=o['texture_phase']*AA;pattern=o['texture'] + if pattern=='stripes':factor=np.where((x+y+phase)%(12*AA)<3*AA,.28,-.015) + elif pattern=='dots':factor=np.where(((x+phase)%(15*AA)-7*AA)**2+((y+phase)%(15*AA)-7*AA)**2<(2.4*AA)**2,.42,0.) + elif pattern=='grid':factor=np.where(((x+phase)%(13*AA)<2*AA)|((y+phase)%(13*AA)<2*AA),-.20,.06) + elif pattern=='checker':factor=np.where(((x//(11*AA)+y//(11*AA))%2)==0,.20,-.13) + elif pattern=='satin':factor=.22*np.cos((x+y)/(11*AA)) + factor+=.08*(1-y/max(h,1))-.025+rng.normal(0,.012,(h,w)) + pixels=np.where(factor[...,None]>=0,rgb+(255-rgb)*factor[...,None],rgb*(1+factor[...,None])) + tile=Image.fromarray(np.clip(pixels,0,255).astype('uint8')).convert('RGBA') + # A thin inset contour increases legibility without becoming GT area. + inner=mask.filter(ImageFilter.MinFilter(3));edge=(np.asarray(mask,dtype=float)-np.asarray(inner,dtype=float))/255 + a=np.asarray(tile).copy();a[...,:3]=(a[...,:3]*(1-.22*edge[...,None])).astype('uint8');tile=Image.fromarray(a);tile.putalpha(mask) + image.alpha_composite(tile,(o['x']*AA,o['y']*AA)) + return image.convert('RGB').resize((S,S),Image.Resampling.LANCZOS) + +def main(): + ap=argparse.ArgumentParser();ap.add_argument('--per-seed',type=int,default=240);ap.add_argument('--seeds',type=int,nargs='+',default=[11,23,37,53,71]);a=ap.parse_args() + dest=ROOT/'data/rich';dest.mkdir(parents=True,exist_ok=True);rows=[];scenes=[] + for seed in a.seeds: + for index in range(a.per_seed): + meta,owner=make_scene(seed,index);sid=f'r{seed}_{index:04d}';meta['scene_id']=sid;scenes.append(meta) + sd=dest/sid;sd.mkdir(exist_ok=True);Image.fromarray(owner).save(sd/'instances.png') + for style in ['flat','rich']: + ip=sd/f'{style}.png';render(meta,style=='rich').save(ip) + for family,queries,targets in meta['pairs']: + for endpoint,(query,ids) in enumerate(zip(queries,targets)): + gp=sd/f'{family}_{endpoint}.png';gt=np.isin(owner,ids) + if not gp.exists():Image.fromarray(gt.astype('uint8')*255).save(gp) + rows.append(dict(id=f'{sid}_{style}_{family}_{endpoint}',scene_id=sid,domain='rich_synthetic',split='test',mode=family,pair_id=f'{sid}_{style}_{family}',endpoint=endpoint,target_count=len(ids),query=query,image_path=str(ip.relative_to(ROOT)),gt_path=str(gp.relative_to(ROOT)),seed=seed,corruption=style,template='scene_graph',render=style,object_count=len(meta['objects']),occupancy=meta['occupancy'],target_instance_ids=ids)) + if index%40==0:print('SCENE',sid,'records',len(rows),flush=True) + p=ROOT/'data/rich_synthetic.jsonl';p.write_text(''.join(json.dumps(r)+'\n' for r in rows));(ROOT/'data/rich_scenes.jsonl').write_text(''.join(json.dumps(r)+'\n' for r in scenes)) + meta=dict(scenes=len(scenes),images=2*len(scenes),records=len(rows),args=vars(a),manifest_sha256=hashlib.sha256(p.read_bytes()).hexdigest(),mean_objects=float(np.mean([len(s['objects']) for s in scenes])),min_visible_fraction=min(min(s['visible_fraction']) for s in scenes),mean_occupancy=float(np.mean([s['occupancy'] for s in scenes])),renderer='Pillow procedural raster; no image generation model; common instance masks across render styles') + (ROOT/'protocol/rich_manifest.json').write_text(json.dumps(meta,indent=2));print(json.dumps(meta,indent=2),flush=True) +if __name__=='__main__':main() diff --git a/source/code/infer_r2.py b/source/code/infer_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..bc9b82c8ff0a2d013bbb122f0398261484f6458e --- /dev/null +++ b/source/code/infer_r2.py @@ -0,0 +1,111 @@ +"""Image-grouped R2 inference, label-isolated inference and official metrics.""" +from pathlib import Path +import argparse, json, time, os, hashlib, collections, sys, platform +import numpy as np +from PIL import Image +ROOT=Path(__file__).resolve().parents[1] +from project_paths import legacy_root;OLD=legacy_root(ROOT) +sys.path.insert(0,str(OLD/'code')) +from infer import ClipSeg,GroundedSam +import phase1_repair as p1 +from r2_repair import repair,primary_plan + +def official_score(pred,gt,pred_nt,gt_nt=None): + z=p1.score_mask(pred,gt);is_nt=not gt.any() if gt_nt is None else gt_nt + if is_nt: + z['iou']=float(pred_nt);z['intersection']=0 + if pred_nt:z['union']=0 + elif pred_nt or z['union']==0:z['intersection']=0;z['iou']=0. + z['pred_nt']=bool(pred_nt) + return z + +def main(): + ap=argparse.ArgumentParser();ap.add_argument('--model',required=True,choices=['clipseg','groundedsam','rela']);ap.add_argument('--manifest',default='natural_full');ap.add_argument('--shard',type=int,default=0);ap.add_argument('--shards',type=int,default=1);ap.add_argument('--limit',type=int,default=0);ap.add_argument('--frozen-only',action='store_true');ap.add_argument('--device',choices=['cpu','cuda'],default='cuda');a=ap.parse_args() + import torch + torch.set_num_threads(4);torch.manual_seed(20260906);np.random.seed(20260906) + def sync(): + if a.device=='cuda':torch.cuda.synchronize() + device_name=torch.cuda.get_device_name(0) if a.device=='cuda' else platform.processor()+' CPU; 4 torch threads' + rows=[json.loads(s) for s in (ROOT/'data'/f'{a.manifest}.jsonl').read_text().splitlines()] + groups=collections.defaultdict(list) + for r in rows:groups[r['image_path']].append(r) + paths=sorted(groups)[a.shard::a.shards] + if a.limit:paths=paths[:a.limit] + if a.model=='rela': + from rela_engine import ReLA + engine=ReLA(device=a.device) + else:engine=ClipSeg() if a.model=='clipseg' else GroundedSam() + name=f'{a.manifest}_{a.model}_{a.shard}of{a.shards}'+('_pilot' if a.limit else '') + cache=ROOT/'cache'/a.model;cache.mkdir(parents=True,exist_ok=True) + result=ROOT/'results'/f'{name}.jsonl';tf=ROOT/'results'/f'{name}_timings.jsonl' + done=set() + if result.exists(): + lines=result.read_text().splitlines() + parsed=[] + for line in lines: + try:parsed.append(json.loads(line)) + except json.JSONDecodeError:break + result.write_text(''.join(json.dumps(x)+'\n' for x in parsed));done={r['id'] for r in parsed} + tstart=time.time();processed=0;inference_s=0;newq=0 + print('READY',name,'images',len(paths),'device',device_name,flush=True) + with result.open('a') as out,tf.open('a') as timing: + for ix,path in enumerate(paths): + group=[r for r in groups[path] if r['id'] not in done] + if not group:continue + image=Image.open(ROOT/path).convert('RGB');texts=[] + for r in group: + q,plan=p1.query_plan(r['query']);texts.extend([r['query'] if a.model=='rela' else q.original] if a.frozen_only else plan) + texts=list(dict.fromkeys(texts));allmaps={};allnt={};allofficial={};elapsed=0.;queried=0 + for start in range(0,len(texts),12): + batch=texts[start:start+12] + digest=hashlib.sha256((path+'\n'+'\n'.join(batch)).encode()).hexdigest()[:24];cp=cache/(digest+'.npz') + if cp.exists(): + z=np.load(cp);assert z['texts'].tolist()==batch + maps={q:z[f'p{i}'].astype(np.float32) for i,q in enumerate(batch)} + nt={q:bool(z['nt'][i]) for i,q in enumerate(batch)} if 'nt' in z else {} + native_masks={q:z[f'o{i}'].astype(bool) for i,q in enumerate(batch)} if 'o0' in z else {} + else: + sync();t0=time.perf_counter();maps,stats=engine.predict(image,batch);sync();seconds=time.perf_counter()-t0 + elapsed+=seconds;queried+=len(batch) + maps={q:maps[q].astype(np.float16).astype(np.float32) for q in batch};nt=stats.get('nt',{}) + native_masks=stats.get('official_masks',{}) + assert all(np.isfinite(v).all() and 0<=v.min()<=v.max()<=1 for v in maps.values()) + arrays={f'p{i}':maps[q].astype(np.float16) for i,q in enumerate(batch)} + if nt:arrays['nt']=np.array([nt[q] for q in batch]) + if native_masks:arrays.update({f'o{i}':native_masks[q] for i,q in enumerate(batch)}) + tmp=cp.with_suffix('.partial.npz');np.savez_compressed(tmp,texts=np.array(batch),**arrays);tmp.replace(cp) + allmaps.update(maps);allnt.update(nt);allofficial.update(native_masks) + inference_s+=elapsed;newq+=queried + gt_cache={} + for r in group: + # Labels are opened only after all image/text predictions above. + if r['gt_path'] not in gt_cache:gt_cache[r['gt_path']]=np.asarray(Image.open(ROOT/r['gt_path']))>0 + gt=gt_cache[r['gt_path']];q=p1.parse_query(r['query']);original_key=r['query'] if a.model=='rela' and a.frozen_only else q.original + if a.frozen_only: + raw=allmaps[original_key]>=engine.threshold + preds={'frozen':raw};flags={} + else:preds,flags=repair(r['query'],allmaps,engine.threshold) + if a.model=='rela': + # Preserve the trained no-target head. Native raw mask has + # no connected-component filtering in the official model. + preds['frozen']=allmaps[original_key]>=.5 + nt=allnt.get(original_key,not preds['frozen'].any()) + scores={k:official_score(v,gt,nt if k=='frozen' else not v.any()) for k,v in preds.items()} + row={k:v for k,v in r.items() if k not in ('gt_path','image_path')} + row.update(model=a.model,flags=flags,scores=scores,query_count=len(p1.query_plan(r['query'])[1]),primary_query_count=len(primary_plan(r['query'])),features=p1.visual_features(allmaps[original_key],preds.get('safe_anchor',preds['frozen']),engine.threshold)) + if a.frozen_only:row.update(query_count=1,primary_query_count=1) + if r['domain']=='natural_full': + key=f"official_{r['ref_id']}" + if key not in gt_cache:gt_cache[key]=np.asarray(Image.open(ROOT/'data/natural/masks_official480'/f"ref_{r['ref_id']}.png"))>0 + ogt=gt_cache[key];oscores={} + for variant,pred in preds.items(): + opred=allofficial[original_key] if a.model=='rela' and variant=='frozen' else np.asarray(Image.fromarray(pred).resize((480,480),Image.Resampling.NEAREST)) + oscores[variant]=official_score(opred,ogt,nt if variant=='frozen' else not pred.any(),r['target_count']==0) + row['official480_scores']=oscores + if a.model=='rela':row['native_nt']=nt + out.write(json.dumps(row)+'\n');processed+=1 + out.flush();timing.write(json.dumps(dict(image_path=path,records=len(group),unique_queries=len(texts),queries_executed=queried,forward_seconds=elapsed))+'\n');timing.flush() + if ix%10==0:print(json.dumps(dict(image=ix+1,of=len(paths),records=processed,forward_seconds=inference_s,wall=time.time()-tstart)),flush=True) + meta=dict(status='COMPLETE',model=a.model,manifest=a.manifest,records_total=len({json.loads(s)['id'] for s in result.read_text().splitlines()}),records_this_run=processed,images=len(paths),new_queries=newq,forward_seconds=inference_s,wall_seconds=time.time()-tstart,gpu=device_name,torch=torch.__version__,python=platform.python_version(),slurm_job_id=os.getenv('SLURM_JOB_ID'),args=vars(a),manifest_sha256=hashlib.sha256((ROOT/'data'/f'{a.manifest}.jsonl').read_bytes()).hexdigest(),code_sha256={p.name:hashlib.sha256(p.read_bytes()).hexdigest() for p in (ROOT/'code').glob('*.py')}) + (ROOT/'results'/f'{name}_meta.json').write_text(json.dumps(meta,indent=2));print(json.dumps(meta,indent=2),flush=True) +if __name__=='__main__':main() diff --git a/source/code/package_public_source.py b/source/code/package_public_source.py new file mode 100644 index 0000000000000000000000000000000000000000..52cc8e32b0a695bb5d61b698c5309f1ad148fd1b --- /dev/null +++ b/source/code/package_public_source.py @@ -0,0 +1,88 @@ +"""Stage a source repository without credentials, upstream data, or vendored TeX.""" +from pathlib import Path +import hashlib,json,shutil,zipfile +ROOT=Path(__file__).resolve().parents[1] +DEST=ROOT.parent/'publish/RefSeg-CA' +README='''# RefSeg-CA — R3 research release + +Evaluating and repairing command compliance in generalized referring segmentation. + +The release contains the SFAP parser/projection, benchmark generator, inference/evaluation scripts, exact-score replay, Slurm examples, editable TikZ/PGFPlots sources, and a current manuscript. Human validation has **not been conducted**. No acceptance or publication claim is made. + +## Data and exact metric replay + +Data repository: https://huggingface.co/datasets/Ethosoft/RefSeg-CA + +From this directory, with Python 3.9 or newer: + +```bash +python code/download_release_data.py +python code/verify_portable_results.py +``` + +The lightweight download reconstructs 30 primary table rows and 22 reviewer-requested threshold configurations. It requires no TRUBA connection or model weights. These are derived scores; reproducing inference pixels requires upstream models and inputs. + +To obtain all 1,200 procedural scenes, both rendering styles, visible-instance maps, and command masks: + +```bash +python code/download_release_data.py --synthetic +``` + +The default data revision is the immutable release tag `r3-data-v1`. Natural images and original gRefCOCO expression text must be obtained from the pinned upstream release; model checkpoint hashes and preparation scripts are under protocol/ and legacy_project/code/. + +## Manuscript and figures + +The current PDF is distributed alongside this source archive in the data repository under `release/RefSeg_CA_MVA.pdf`. Install the official Springer Nature LaTeX template and normal TeX Live packages, placing sn-jnl.cls and sn-mathphys-num.bst alongside the manuscript as instructed by Springer. The repository does not redistribute these third-party generated files. + +```bash +python code/figures_r3.py +python code/build_latex.py +``` + +The synthetic download is required before regenerating image panels. All written figures are monochrome vector graphics; the experimental raster inputs retain their colors. + +## Human evaluation + +Read review/HUMAN_VALIDATION_PROTOCOL.md and review/INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md. Two independent readers, pre-adjudication agreement, adjudicated semantic labels, and a separate image-aware harm audit are still needed. Automated checks are not human labels. + +## Provenance and reuse + +See REPRODUCIBILITY.md, THIRD_PARTY.md, CITATION.cff, and SHA256SUMS. This public deposit establishes accessibility. Authors have not yet selected an additional blanket reuse license for original material; existing per-file third-party terms continue to apply. + +Browse all source files at https://huggingface.co/datasets/Ethosoft/RefSeg-CA/tree/main/source. This organization-owned Hugging Face source tree is the code host for this release. +''' + + +def main(): + DEST.mkdir(parents=True,exist_ok=True) + patterns=['code/*.py','legacy_project/code/*.py','legacy_project/protocol/*.json', + 'legacy_project/results/analysis/*.json','protocol/*.json','protocol/*.md', + 'results/analysis/*.json','results/r3/review_results.json','results/r3/jobs/*.json', + 'figures/*.tex','figures/*.json','latex/*.tex','latex/*.bib','slurm/*.sbatch'] + selected=set() + for pattern in patterns:selected.update(ROOT.glob(pattern)) + for p in selected: + out=DEST/p.relative_to(ROOT);out.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(p,out) + for rel in ['CITATION.cff','REPRODUCIBILITY.md','requirements-analysis.txt', + 'review/HUMAN_VALIDATION_PROTOCOL.md','review/INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md', + 'review/Response_to_Major_Revision.md']: + out=DEST/rel;out.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(ROOT/rel,out) + (DEST/'README.md').write_text(README) + (DEST/'THIRD_PARTY.md').write_text('''# Third-party materials + +Original natural images and gRefCOCO expression files are not included. Obtain them from https://huggingface.co/datasets/FudanCVL/gRefCOCO at revision 81eede59b3ac070049f597d023c0ff08d1fb80e9 and the image sources referenced by its authors. They retain their original terms. + +Model weights and ReLA source are downloaded from their authors using the revisions and hashes in protocol/. No model weights are redistributed here. + +The Springer Nature LaTeX class/bibliography style and standard algorithm packages must be installed from their official distributions. These generated third-party files are omitted from this public source archive. The user-facing manuscript source remains included. + +This repository adds no blanket license to material owned by others. The project authors have not yet assigned a blanket reuse license to their original code or procedural dataset. +''') + (DEST/'.gitignore').write_text('build/\ncache/\nassets/\nvendor/\n__pycache__/\n*.pyc\n.env*\n*.token\ndata/rich/\ndata/natural/\nresults/r3/portable/\n*.aux\n*.log\n*.out\n*.blg\n') + files=sorted(p for p in DEST.rglob('*') if p.is_file() and '.git' not in p.parts and p.name!='SHA256SUMS') + (DEST/'SHA256SUMS').write_text(''.join(hashlib.sha256(p.read_bytes()).hexdigest()+' '+p.relative_to(DEST).as_posix()+'\n' for p in files)) + archive=ROOT.parent/'RefSeg_CA_R3_Public_Source.zip' + with zipfile.ZipFile(archive,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as z: + for p in files+[DEST/'SHA256SUMS']:z.write(p,'RefSeg-CA/'+p.relative_to(DEST).as_posix()) + print(json.dumps({'source_root':str(DEST),'archive':str(archive),'files':len(files)+1,'bytes':archive.stat().st_size,'sha256':hashlib.sha256(archive.read_bytes()).hexdigest()})) +if __name__=='__main__':main() diff --git a/source/code/package_release.py b/source/code/package_release.py new file mode 100644 index 0000000000000000000000000000000000000000..7bedb81acef5eab9fdc64706c5f71f5db545b730 --- /dev/null +++ b/source/code/package_release.py @@ -0,0 +1,82 @@ +"""Package the reviewed R3 manuscript, editable source, and exact evidence.""" +from pathlib import Path +import hashlib +import json +import shutil +import zipfile + +ROOT = Path(__file__).resolve().parents[1] +EXCLUDED_DIRS = {'build', '__pycache__', 'logs'} +EXCLUDED_SUFFIXES = {'.aux', '.log', '.blg', '.out', '.eps', '.pyc', '.synctex.gz'} + + +def included(path): + rel = path.relative_to(ROOT) + return (path.is_file() and not any(part in EXCLUDED_DIRS for part in rel.parts) + and path.suffix not in EXCLUDED_SUFFIXES + and rel.as_posix() != 'latex/RefSeg_CA_MVA.pdf' + and rel.name != 'SHA256SUMS') + + +def sha256(path): + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def main(): + validation = json.loads((ROOT / 'results/r3/final_validation.json').read_text()) + assert validation['metric_replay'] == 'PASS' + assert validation['overfull_boxes'] == validation['undefined_references'] == 0 + shutil.copy2(ROOT / 'latex/RefSeg_CA_MVA.pdf', ROOT / 'RefSeg_CA_MVA.pdf') + shutil.copy2(ROOT / 'build/Fig1_framework_checked.png', ROOT / 'Preview_Fig1.png') + + files = sorted(p for p in ROOT.rglob('*') if included(p)) + sums = ROOT / 'SHA256SUMS' + sums.write_text(''.join(f'{sha256(p)} {p.relative_to(ROOT).as_posix()}\n' for p in files)) + complete = ROOT.parent / 'RefSeg_CA_R3_Complete_Package.zip' + with zipfile.ZipFile(complete, 'w', compression=zipfile.ZIP_DEFLATED, compresslevel=6) as archive: + for path in files + [sums]: + archive.write(path, 'RefSeg_CA_R3/' + path.relative_to(ROOT).as_posix()) + + kit = ROOT.parent / 'RefSeg_CA_R3_Human_Validation_Kit.zip' + with zipfile.ZipFile(kit, 'w', compression=zipfile.ZIP_DEFLATED, compresslevel=6) as archive: + for reader in ['A', 'B']: + archive.write(ROOT / f'review/human/parser_annotator_{reader}.csv', + f'annotator_{reader}/parser_annotator_{reader}.csv') + archive.write(ROOT / 'review/HUMAN_VALIDATION_PROTOCOL.md', + f'annotator_{reader}/HUMAN_VALIDATION_PROTOCOL.md') + for name in ['parser_sampling_key.json', 'annotator_metadata.json', + 'clipseg_harm_annotation.csv', 'groundedsam_harm_annotation.csv']: + archive.write(ROOT / 'review/human' / name, 'coordinator/' + name) + archive.write(ROOT / 'code/score_human_parser_audit.py', 'coordinator/score_human_parser_audit.py') + archive.write(ROOT / 'code/prepare_human_passes.py', 'coordinator/prepare_human_passes.py') + archive.write(ROOT / 'review/HUMAN_VALIDATION_PROTOCOL.md', 'coordinator/HUMAN_VALIDATION_PROTOCOL.md') + archive.write(ROOT / 'review/INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md', 'INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md') + for reader in ['A', 'B']: + for name in ['pass1_semantics', 'pass2_decomposition']: + archive.write(ROOT / f'review/human/passes/{reader}_{name}.csv', f'annotator_{reader}/{reader}_{name}.csv') + archive.writestr('README_TR.md', '''# Bağımsız insan doğrulaması — koordinatör paketi + +Bu çalışmanın insan değerlendirmesi henüz yapılmadı. Boş formlar sonuç değildir. + +1. A ve B için önce yalnızca pass1_semantics dosyasını ve protokolü dağıtın. İlk geçiş kilitlendikten sonra aynı okuyucunun pass2_decomposition dosyasını verin. Tüm ZIP dosyasını okuyuculara göndermeyin. Birleşik parser_annotator formları koordinatör içindir. +2. coordinator klasörünü siz saklayın. Örnekleme anahtarı, diğer okuyucunun formu ve önceki makine etiketleri bağımsız etiketleme sırasında paylaşılmamalı. +3. Okuyucuların gerçek uzmanlık bilgilerini ve tarihleri kaydedin. 600 ifadenin üç temel alanını bağımsız doldurmalarını isteyin. +4. Önce bağımsız anlaşmayı hesaplayın; sonra anlaşmazlıkları gerekçeli uzlaştırın. Orijinal formları değiştirmeyin. +5. Tam proje paketindeki review/human dizinine tamamlanan formları yerleştirin ve protokoldeki komutu çalıştırın. Puanlayıcı boş veya U etiketleriyle doğruluk sonucu üretmez. + +İki zarar formunda toplam 120 örnek vardır. Nedensel etiketleme için özgün görüntü ve tam/hedef/çapa/onarılmış/referans maskeleri ayrıca hazırlanmalıdır. Bu kit, görüntü incelemesinin yerine geçmez. İnsan etiketlerinden sonra örnekleme yapısını gözeten belirsizlik aralıkları ve uzlaştırılmış hata örnekleri rapora eklenmelidir. +''') + + for archive_path in [complete, kit]: + with zipfile.ZipFile(archive_path) as archive: + assert archive.testzip() is None + count = len(archive.infolist()) + print(json.dumps({'path': str(archive_path), 'files': count, + 'bytes': archive_path.stat().st_size, 'sha256': sha256(archive_path)})) + print(json.dumps({'pdf': str(ROOT / 'RefSeg_CA_MVA.pdf'), + 'sha256': sha256(ROOT / 'RefSeg_CA_MVA.pdf'), + 'pages': validation['pages']})) + + +if __name__ == '__main__': + main() diff --git a/source/code/phase1_analyze.py b/source/code/phase1_analyze.py new file mode 100644 index 0000000000000000000000000000000000000000..109d809f4d739730cf50b23cbf1f274267276142 --- /dev/null +++ b/source/code/phase1_analyze.py @@ -0,0 +1,165 @@ +"""Image-paired summaries and calibration with explicit finite-sample limits. + +The bound concerns ADDITIONAL false abstention from an already nonempty CACP +mask. It does not bound total false-empty errors and does not survive arbitrary +train-to-test distribution shift. All tested thresholds share a Bonferroni bound. +""" +from pathlib import Path +import argparse,json,collections,csv,gzip,hashlib +import numpy as np +from scipy.optimize import minimize +from scipy.special import expit +from scipy.stats import beta +ROOT=Path(__file__).resolve().parents[1];OUT=ROOT/'results/analysis' +SEEDS=[11,23,37];GRID=np.r_[np.arange(.025,1.001,.025),1.001] +FAMILY_SIZE=40*2*3*2 # thresholds x positive strata x fits x backbones + +def fit_logistic(rows,seed): + x=np.array([r['features'] for r in rows]);y=np.array([r['target_count']==0 for r in rows],float) + rng=np.random.RandomState(seed);idx=np.concatenate([rng.choice(np.flatnonzero(y==v),int((y==v).sum()),replace=True) for v in [0,1]]) + x=x[idx];y=y[idx];mu=x.mean(0);sd=x.std(0);sd[sd<1e-8]=1.;z=np.c_[(x-mu)/sd,np.ones(len(x))] + w=np.where(y==1,.5/max((y==1).mean(),1e-6),.5/max((y==0).mean(),1e-6)) + def objective(b): + v=z@b;loss=np.mean(w*(np.logaddexp(0,v)-y*v))+.01*np.dot(b[:-1],b[:-1]) + grad=z.T@(w*(expit(v)-y))/len(y);grad[:-1]+=.02*b[:-1] + return loss,grad + opt=minimize(objective,np.zeros(z.shape[1]),jac=True,method='L-BFGS-B',options={'maxiter':1000,'ftol':1e-12}) + if not opt.success:raise RuntimeError('Logistic fit failed: '+opt.message) + return dict(mean=mu.tolist(),std=sd.tolist(),coef=opt.x.tolist(),n=len(y),seed=seed,objective=float(opt.fun)) + +def probability(rows,fit): + x=np.array([r['features'] for r in rows]);return expit(np.c_[(x-np.array(fit['mean']))/np.array(fit['std']),np.ones(len(x))]@np.array(fit['coef'])) + +def cp_upper(k,n,alpha): + if n==0:return 1. + return 1. if k==n else float(beta.ppf(1-alpha,k+1,n-k)) + +def operating_table(rows,fit): + iid_images=len({r['scene_id'] for r in rows})==len(rows) + p=probability(rows,fit);y=np.array([r['target_count']==0 for r in rows]);base=np.array([r['scores']['cacp']['empty'] for r in rows]);counts=np.array([r['target_count'] for r in rows]);out=[] + for t in GRID: + reject=p>=t;empty=base|reject;additional=reject&~base;groups={} + for name,sel in [('one',counts==1),('multi',counts>1)]: + n=int(sel.sum());k=int((additional&sel).sum()) + groups[name]={'n':n,'k':k,'upper':(0. if t>1 else cp_upper(k,n,.05/FAMILY_SIZE)) if iid_images else None} + acc0=float(empty[y].mean()) if y.any() else 0.;far=float(empty[~y].mean()) if (~y).any() else 0. + out.append({'threshold':float(t),'no_target_accuracy':acc0,'false_empty':far,'additional_false_abstention':float(additional[~y].mean()),'balanced_accuracy':.5*(acc0+1-far),'groups':groups,'worst_upper':max(g['upper'] for g in groups.values()) if iid_images else None}) + return out + +def add_calibration(rows): + params={};curve=[] + for seed in SEEDS: + for domain in ['controlled','natural']: + train=[r for r in rows if r['domain']==domain and r['split']=='fit' and r['mode']!='action'] + cal=[r for r in rows if r['domain']==domain and r['split']=='cal' and r['mode']!='action'] + fit=fit_logistic(train,seed);table=operating_table(cal,fit) + uncon=max(table,key=lambda x:(x['balanced_accuracy'],x['threshold'])) + variants={('source_unconstrained' if domain=='controlled' else 'target_unconstrained'):uncon} + if domain=='natural': + for eps in [.01,.025,.05,.10]: + allowed=[x for x in table if x['worst_upper']<=eps] + variants[f'constrained_{eps:g}']=max(allowed,key=lambda x:(x['no_target_accuracy'],-x['additional_false_abstention'],x['threshold'])) + curve.extend(dict(seed=seed,**x) for x in table) + scores=probability(rows,fit) + for variant,point in variants.items(): + name=f'{variant}_s{seed}';t=point['threshold'];params[name]={'fit':fit,'operating_point':point,'calibration_domain':domain} + for r,pr in zip(rows,scores): + base=r['scores']['cacp'];reject=bool(pr>=t) + # Explicit action semantics are already handled by CACP. + val=dict(base) + if reject:val.update(iou=1. if r['target_count']==0 else 0.,intersection=0,union=base['gt_pixels'],pred_pixels=0,empty=True) + val['additional_abstention']=reject and not base['empty'];r['scores'][name]=val + if domain=='natural' and seed==11:r['absence_probability']=float(pr) + return params,curve + +def cluster_ci(values,keys,strata=None,reps=2000): + vals=np.asarray(values,float);groups=collections.defaultdict(list) + for i,k in enumerate(keys):groups[k].append(i) + ids=list(groups);arr=np.array([vals[groups[k]].mean(0) for k in ids]) + if strata is None:labels=np.zeros(len(ids),int) + else:labels=np.array([str(strata[groups[k][0]]) for k in ids]) + rng=np.random.RandomState(20260906);boot=np.zeros((reps,)+arr.shape[1:]);n=0 + for label in sorted(set(labels)): + a=arr[labels==label];draw=rng.randint(0,len(a),size=(reps,len(a)));boot+=a[draw].sum(axis=1);n+=len(a) + boot/=n + return arr.mean(axis=0),np.quantile(boot,.025,axis=0),np.quantile(boot,.975,axis=0),len(arr) + +def summarize(rows,methods): + summaries=[] + def emit(name,rr,metric,threshold=.5): + if not rr:return + if metric=='pc': + pairs=collections.defaultdict(list) + for r in rr:pairs[r['pair_id']].append(r) + assert all(len(x)==2 for x in pairs.values()) + data=[];keys=[];strata=[] + for pp in pairs.values(): + data.append([float(all(r['scores'][m]['iou']>=threshold for r in pp)) for m in methods]);keys.append(pp[0]['scene_id']);strata.append(pp[0]['seed']) + else: + data=[];keys=[];strata=[] + for r in rr: + data.append([float(r['scores'][m]['empty']) if metric in ['no_target_accuracy','false_empty'] else float(r['scores'][m].get('additional_abstention',False)) if metric=='additional_false_abstention' else r['scores'][m]['iou'] for m in methods]);keys.append(r['scene_id']);strata.append(r['seed'] if r['domain']=='controlled' else r['split']+'_'+r['mode']) + data=np.array(data);mean,lo,hi,n=cluster_ci(data,keys,strata) + delta,dlo,dhi,_=cluster_ci(data-data[:,[methods.index('frozen')]],keys,strata) + for i,m in enumerate(methods):summaries.append(dict(population=name,metric=('PC50' if threshold==.5 else 'PC70') if metric=='pc' else metric,method=m,estimate=float(mean[i]),lo=float(lo[i]),hi=float(hi[i]),gain=float(delta[i]),gain_lo=float(dlo[i]),gain_hi=float(dhi[i]),clusters=n,units=len(data))) + controlled=[r for r in rows if r['domain']=='controlled' and r['split']=='test'] + clean=[r for r in controlled if r['corruption']=='clean'] + primary=[r for r in clean if r['mode'] in ['attribute','relation','quantifier','absence']] + emit('controlled_primary',primary,'pc');emit('controlled_primary',primary,'pc',.7) + for family in ['attribute','relation','quantifier','action','absence','paraphrase']: + emit('family_'+family,[r for r in clean if r['mode']==family],'pc') + for template in ['seen','held']:emit('template_'+template,[r for r in primary if r['template']==template],'pc') + stress_ids={r['scene_id'] for r in controlled if r['corruption']!='clean'} + for corruption in ['clean','blur','noise','dim']: + rr=[r for r in controlled if r['corruption']==corruption and r['scene_id'] in stress_ids and r['mode'] in ['attribute','relation','quantifier','absence']] + emit('stress_'+corruption,rr,'pc') + for name,rr in [('controlled_clean',clean),('natural_test',[r for r in rows if r['domain']=='natural' and r['split'] in ['testA','testB']])]+[(s,[r for r in rows if r['domain']=='natural' and r['split']==s]) for s in ['val','testA','testB']]: + emit(name,rr,'gIoU');emit(name,[r for r in rr if r['target_count']>0],'positive_mIoU');emit(name,[r for r in rr if r['target_count']==0],'no_target_accuracy');emit(name,[r for r in rr if r['target_count']>0],'false_empty');emit(name,[r for r in rr if r['target_count']>0],'additional_false_abstention') + for mode in ['zero','one','multi']: + rr=[r for r in rows if r['domain']=='natural' and r['split'] in ['testA','testB'] and r['mode']==mode] + emit('natural_'+mode,rr,'gIoU') + return summaries + +def main(): + a=argparse.ArgumentParser();a.add_argument('--model',choices=['clipseg','groundedsam']);args=a.parse_args();OUT.mkdir(parents=True,exist_ok=True) + models=[args.model] if args.model else ['clipseg','groundedsam'];allsummary=[];allparam={};allcurves=[];metadata={} + main_methods=['frozen','action_only','largest','global_direction','target_only','anchor_nogate','anchor_gate','counterfactual_nogate','cacp','source_unconstrained_s11','target_unconstrained_s11','constrained_0.05_s11'] + for model in models: + shards=2 if model=='clipseg' else 8 + files=sorted((ROOT/'results').glob(model+f'_main_*of{shards}.jsonl'));metas=sorted((ROOT/'results').glob(model+f'_main_*of{shards}_meta.json')) + if len(files)!=shards or len(metas)!=shards:raise RuntimeError('Model runs are incomplete: '+model) + rows=[json.loads(l) for f in files for l in f.read_text().splitlines()];expected=json.loads((ROOT/'data/dataset_summary.json').read_text())['records'] + assert len(rows)==expected and len({r['id'] for r in rows})==expected + assert all(json.loads(m.read_text())['status']=='COMPLETE' for m in metas) + params,curves=add_calibration(rows);allparam[model]=params;allcurves.extend(dict(model=model,**c) for c in curves) + ss=summarize(rows,main_methods);allsummary.extend(dict(model=model,**s) for s in ss) + # Seed/tolerance sensitivity is a separate table, not independent evidence. + sensitivity=[] + for seed in SEEDS: + for eps in [.01,.025,.05,.1]: + name=f'constrained_{eps:g}_s{seed}' + for pop,sel in [('natural_test',[r for r in rows if r['domain']=='natural' and r['split'] in ['testA','testB']]),('val',[r for r in rows if r['domain']=='natural' and r['split']=='val'])]: + pos=[r for r in sel if r['target_count']>0];neg=[r for r in sel if r['target_count']==0] + sensitivity.append(dict(model=model,seed=seed,tolerance=eps,population=pop,threshold=params[name]['operating_point']['threshold'],cal_upper=params[name]['operating_point']['worst_upper'],positive_iou=float(np.mean([r['scores'][name]['iou'] for r in pos])),no_target_accuracy=float(np.mean([r['scores'][name]['empty'] for r in neg])),false_empty=float(np.mean([r['scores'][name]['empty'] for r in pos])),additional_false_abstention=float(np.mean([r['scores'][name]['additional_abstention'] for r in pos])))) + (OUT/f'{model}_sensitivity.json').write_text(json.dumps(sensitivity,indent=2)) + # Oracle anchor substitution: diagnostic, not a guaranteed upper bound. + oracle_rows=[r for r in rows if r['domain']=='controlled'];os=summarize(oracle_rows,['frozen','cacp','oracle_anchor']) + (OUT/f'{model}_oracle.json').write_text(json.dumps(os,indent=2)) + reasons=collections.Counter(r['flags']['reason'] for r in rows if r['split'] in ['test','testA','testB','val']);bydomain={} + for domain in ['controlled','natural']: + rr=[r for r in rows if r['domain']==domain and r['split'] in ['test','testA','testB','val'] and r['corruption']=='clean'] + bydomain[domain]={'n':len(rr),'supported':sum(r['flags']['supported'] for r in rr),'changed':sum(r['flags']['changed'] for r in rr),'harm_iou':sum(r['scores']['cacp']['iou']r['scores']['frozen']['iou'] for r in rr)} + metadata[model]={'runs':[json.loads(m.read_text()) for m in metas],'reason_counts':dict(reasons),'coverage':bydomain} + with gzip.open(OUT/f'{model}_evaluated.jsonl.gz','wt') as f: + for r in rows:f.write(json.dumps(r)+'\n') + # Test trade-off curves use the fixed calibration-trained score; no tuning. + test=[r for r in rows if r['domain']=='natural' and r['split'] in ['testA','testB']] + curve_test=operating_table(test,params['target_unconstrained_s11']['fit']) + (OUT/f'{model}_test_curve.json').write_text(json.dumps(curve_test,indent=2)) + print('ANALYZED',model,flush=True) + (OUT/'summary.json').write_text(json.dumps(allsummary,indent=2)) + with (OUT/'summary.csv').open('w') as f: + writer=csv.DictWriter(f,fieldnames=list(allsummary[0]));writer.writeheader();writer.writerows(allsummary) + (OUT/'calibration.json').write_text(json.dumps(allparam,indent=2));(OUT/'calibration_curves.json').write_text(json.dumps(allcurves,indent=2));(OUT/'run_summary.json').write_text(json.dumps(metadata,indent=2)) + (OUT/'statistical_notes.json').write_text(json.dumps({'bootstrap_replicates':2000,'interval':'95% percentile, paired image/scene clusters, stratified by seed or official split and target stratum','multiplicity':'Confidence intervals are descriptive and unadjusted; ablations are not independent replications','calibration_family_size':FAMILY_SIZE,'calibration_alpha':.05,'calibration_scope':'Simultaneous stratum-wise Clopper-Pearson bounds for additional false abstention under independent, identically distributed Bernoulli sampling within each stratum; official train/test shifts are evaluated empirically, not guaranteed','minimum_n_zero_failures':{str(eps):int(np.ceil(np.log(.05/FAMILY_SIZE)/np.log(1-eps))) for eps in [.01,.025,.05,.1]}},indent=2)) +if __name__=='__main__':main() diff --git a/source/code/phase1_infer.py b/source/code/phase1_infer.py new file mode 100644 index 0000000000000000000000000000000000000000..9036ac451263c65e1388cf74550f4b12b67341f2 --- /dev/null +++ b/source/code/phase1_infer.py @@ -0,0 +1,131 @@ +"""Frozen GPU inference, image-level caching, and label-isolated CACP evaluation.""" +from pathlib import Path +import argparse,json,time,os,hashlib,collections,platform +import numpy as np +from PIL import Image +from repair import query_plan,repaired_maps,visual_features,score_mask +ROOT=Path(__file__).resolve().parents[1] + +class ClipSeg: + threshold=.5 + def __init__(self): + import torch + from transformers import CLIPSegProcessor,CLIPSegForImageSegmentation + self.torch=torch;path=ROOT/'assets/models/clipseg' + self.processor=CLIPSegProcessor.from_pretrained(str(path),local_files_only=True) + self.model=CLIPSegForImageSegmentation.from_pretrained(str(path),local_files_only=True).eval().cuda() + def predict(self,image,texts): + t=self.torch;out={} + with t.inference_mode(): + for k in range(0,len(texts),8): + batch=texts[k:k+8] + inputs=self.processor(text=batch,images=[image]*len(batch),padding=True,truncation=True,return_tensors='pt').to('cuda') + logits=self.model(**inputs,interpolate_pos_encoding=True).logits + if logits.ndim==2:logits=logits[None] + probs=t.nn.functional.interpolate(logits[:,None],size=(image.height,image.width),mode='bilinear',align_corners=False)[:,0].sigmoid() + for q,p in zip(batch,probs):out[q]=p.float().cpu().numpy() + return out,{'language_queries':len(texts),'sam_boxes':0,'truncated_boxes':0} + +class GroundedSam: + threshold=.25 + def __init__(self): + import torch + from transformers import AutoProcessor,AutoModelForZeroShotObjectDetection,SamProcessor,SamModel,GroundingDinoConfig + self.torch=torch;p=ROOT/'assets/models/groundingdino';s=ROOT/'assets/models/sam' + self.processor=AutoProcessor.from_pretrained(str(p),local_files_only=True) + cfg=GroundingDinoConfig.from_pretrained(str(p),local_files_only=True);cfg.disable_custom_kernels=True + self.model=AutoModelForZeroShotObjectDetection.from_pretrained(str(p),config=cfg,local_files_only=True).eval().cuda() + self.samproc=SamProcessor.from_pretrained(str(s),local_files_only=True) + self.sam=SamModel.from_pretrained(str(s),local_files_only=True).eval().cuda() + def predict(self,image,texts): + t=self.torch;allboxes=[];detections={};truncated=0;out={} + with t.inference_mode(): + for k in range(0,len(texts),2): + batch=texts[k:k+2] + inputs=self.processor(images=[image]*len(batch),text=[q.strip(' .')+'.' for q in batch],padding=True,truncation=True,return_tensors='pt').to('cuda') + pred=self.model(**inputs) + det=self.processor.post_process_grounded_object_detection(pred,inputs.input_ids,box_threshold=.25,text_threshold=.25,target_sizes=[(image.height,image.width)]*len(batch)) + for q,d in zip(batch,det): + order=d['scores'].argsort(descending=True);truncated+=max(0,len(order)-30);order=order[:30] + entries=[] + for box,score in zip(d['boxes'][order].cpu().tolist(),d['scores'][order].cpu().tolist()): + box=[max(0,min(v,image.width if j%2==0 else image.height)) for j,v in enumerate(box)] + if box[2]-box[0]<1 or box[3]-box[1]<1:continue + key=tuple(round(v,1) for v in box) + if key not in allboxes:allboxes.append(key) + entries.append((allboxes.index(key),float(score))) + detections[q]=entries + masks=[] + if allboxes: + ip=self.samproc(images=image,return_tensors='pt').to('cuda') + emb=self.sam.get_image_embeddings(ip.pixel_values) + for k in range(0,len(allboxes),16): + ins=self.samproc(images=image,input_boxes=[[list(b) for b in allboxes[k:k+16]]],return_tensors='pt').to('cuda') + pr=self.sam(image_embeddings=emb,input_boxes=ins.input_boxes,multimask_output=True) + chosen=pr.iou_scores[0].argmax(dim=-1) + low=pr.pred_masks[:,t.arange(len(chosen),device='cuda'),chosen,: ,:][:,:,None] + # Official postprocessing restores original image resolution. + full=self.samproc.image_processor.post_process_masks(low,ins.original_sizes,ins.reshaped_input_sizes,binarize=True)[0] + masks.extend(full[:,0].cpu().numpy().astype(bool)) + for q in texts: + p=np.zeros((image.height,image.width),np.float32) + for idx,score in detections[q]:p=np.maximum(p,masks[idx]*score) + out[q]=p + return out,{'language_queries':len(texts),'sam_boxes':len(allboxes),'truncated_boxes':truncated} + +def main(): + p=argparse.ArgumentParser();p.add_argument('--model',choices=['clipseg','groundedsam'],required=True) + p.add_argument('--shard',type=int,default=0);p.add_argument('--shards',type=int,default=1) + p.add_argument('--pilot',action='store_true');p.add_argument('--limit',type=int,default=0) + args=p.parse_args();print('IMPORT_START',vars(args),flush=True) + import torch,transformers + torch.set_num_threads(4);torch.manual_seed(20260906);np.random.seed(20260906) + assert torch.cuda.is_available(),'GPU required: submit with Slurm' + records=[json.loads(x) for x in (ROOT/'data/manifest.jsonl').read_text().splitlines()] + if args.pilot: + # Infrastructure / implementation checks see fit examples only. + records=[r for r in records if r['split']=='fit'] + records=[r for r in records if (r['domain']=='controlled' and r['scene_id']=='s11_0000') or r['domain']=='natural'] + groups=collections.defaultdict(list) + for r in records:groups[r['image_path']].append(r) + selected=sorted(groups) + if args.pilot:selected=selected[:1]+[x for x in selected if '/natural/' in x][:3] + elif args.limit:selected=selected[:args.limit] + selected=selected[args.shard::args.shards] + suffix=f'{args.model}_{"pilot" if args.pilot else "main"}_{args.shard}of{args.shards}' + cache=ROOT/'cache'/args.model;cache.mkdir(parents=True,exist_ok=True) + resultfile=ROOT/'results'/f'{suffix}.jsonl';timingfile=ROOT/'results'/f'{suffix}_timings.jsonl' + engine=ClipSeg() if args.model=='clipseg' else GroundedSam() + print('MODEL_READY',torch.cuda.get_device_name(0),'images',len(selected),flush=True) + started=time.time();nrecord=0;queries=0;gpu_seconds=0;hits=0 + with resultfile.open('w') as result,timingfile.open('w') as timing: + for index,ipath in enumerate(selected): + group=groups[ipath];texts=[] + for r in group: + _,qs=query_plan(r['query']);texts.extend(qs) + texts=list(dict.fromkeys(texts));image=Image.open(ROOT/ipath).convert('RGB') + digest=hashlib.sha256((ipath+'\n'+'\n'.join(texts)).encode()).hexdigest()[:24];cp=cache/(digest+'.npz') + elapsed=0.;stats={'language_queries':0,'sam_boxes':0,'truncated_boxes':0} + if cp.exists(): + z=np.load(cp);assert z['texts'].tolist()==texts;maps={q:z[f'p{i}'].astype(np.float32) for i,q in enumerate(texts)};hits+=1 + else: + torch.cuda.synchronize();t0=time.perf_counter();maps,stats=engine.predict(image,texts);torch.cuda.synchronize();elapsed=time.perf_counter()-t0 + # Quantize identically before both scoring and storage, so replay + # and initial evaluation see exactly the same cached scores. + maps={q:maps[q].astype(np.float16).astype(np.float32) for q in texts} + assert all(np.isfinite(v).all() and v.min()>=0 and v.max()<=1 for v in maps.values()) + tmp=cp.with_suffix('.partial.npz');np.savez_compressed(tmp,texts=np.array(texts),**{f'p{i}':maps[q].astype(np.float16) for i,q in enumerate(texts)});tmp.replace(cp) + gpu_seconds+=elapsed;queries+=stats['language_queries'] + # Ground truth is loaded only after all model predictions are fixed. + for r in group: + gt=np.asarray(Image.open(ROOT/r['gt_path']))>0 + oracle=np.asarray(Image.open(ROOT/r['anchor_gt_path']))>0 if 'anchor_gt_path' in r else None + preds,flags=repaired_maps(r['query'],maps,engine.threshold,oracle_anchor=oracle) + row={k:r[k] for k in ['id','scene_id','domain','split','mode','pair_id','endpoint','target_count','seed','template','corruption']} + row.update(model=args.model,flags=flags,features=visual_features(maps[query_plan(r['query'])[0].original],preds['cacp'],engine.threshold),scores={m:score_mask(pred,gt) for m,pred in preds.items()},cache_path=str(cp.relative_to(ROOT)),query_count=len(query_plan(r['query'])[1])) + result.write(json.dumps(row)+'\n');nrecord+=1 + timing.write(json.dumps(dict(image_path=ipath,records=len(group),requested_unique_queries=len(texts),cached=elapsed==0,seconds=elapsed,**stats))+'\n');result.flush();timing.flush() + if index%20==0:print(json.dumps({'image':index+1,'of':len(selected),'records':nrecord,'new_queries':queries,'forward_seconds':round(gpu_seconds,2),'wall_seconds':round(time.time()-started,2)}),flush=True) + meta={'status':'COMPLETE','model':args.model,'images':len(selected),'records':nrecord,'unique_queries_executed':queries,'cache_hits':hits,'forward_seconds':gpu_seconds,'wall_seconds':time.time()-started,'gpu':torch.cuda.get_device_name(0),'torch':torch.__version__,'transformers':transformers.__version__,'numpy':np.__version__,'python':platform.python_version(),'slurm_job_id':os.getenv('SLURM_JOB_ID'),'node':os.getenv('SLURMD_NODENAME'),'args':vars(args),'manifest_sha256':hashlib.sha256((ROOT/'data/manifest.jsonl').read_bytes()).hexdigest(),'code_sha256':{x:hashlib.sha256((ROOT/'code'/x).read_bytes()).hexdigest() for x in ['infer.py','repair.py']}} + (ROOT/'results'/f'{suffix}_meta.json').write_text(json.dumps(meta,indent=2));print(json.dumps(meta,indent=2),flush=True) +if __name__=='__main__':main() diff --git a/source/code/phase1_repair.py b/source/code/phase1_repair.py new file mode 100644 index 0000000000000000000000000000000000000000..5616f1560b23cce980ee60ad5b1356c3f3754336 --- /dev/null +++ b/source/code/phase1_repair.py @@ -0,0 +1,152 @@ +"""Counterfactual Anchor-Consistent Projection (CACP). + +All primary decisions use only query text and predicted maps. The optional +oracle anchor is isolated and must never be supplied to the primary method. +Fixed defaults are declared before the evaluation predictions are observed. +""" +import re +from dataclasses import dataclass, asdict +import numpy as np +from scipy import ndimage + +@dataclass(frozen=True) +class Query: + original: str + target: str + anchor: str = '' + relation: str = '' + opposite: str = '' + plural: bool = False + negate: bool = False + supported: bool = False + +OPPOSITE = {'left':'right','right':'left','above':'below','below':'above'} +VERBS = r'(?:segment|show|select|find|highlight)' +IRREGULAR = {'people':'person','men':'man','women':'woman','children':'child'} +def noun_phrase(s): + s=re.sub(r'^(?:(?:all|every|both|two|the|a|an)\s+)+','',s.strip()) + words=s.split() + if not words:return s + w=words[-1] + if w in IRREGULAR:words[-1]=IRREGULAR[w] + elif w.endswith('s') and not w.endswith(('ss','us','is')):words[-1]=w[:-1] + return ' '.join(words) + +def parse_query(text): + q=' '.join(text.lower().strip(' .').split()) + neg=bool(re.match(r"^(?:do not|don't)\s+"+VERBS+r'\b',q)) + cleaned=re.sub(r"^(?:do not|don't)\s+",'',q) if neg else q + cleaned=re.sub(r'^'+VERBS+r'\s+','',cleaned) + plural=bool(re.search(r'\b(all|every|both|two|people|men|women|children)\b',cleaned)) + # Only a single explicit relation is supported; nested clauses fall back. + pat=r'^(.+?)\s+(?:(?:to|on)\s+the\s+)?(left|right)\s+of\s+(.+)$' + m=re.match(pat,cleaned) + if not m:m=re.match(r'^(.+?)\s+(above|below)\s+(.+)$',cleaned) + if m: + t,rel,a=m.groups() + if re.search(r'\b(left|right|above|below|that|which)\b',a): + return Query(q,q,plural=plural,negate=neg) + opp=re.sub(r'\b'+rel+r'\b',OPPOSITE[rel],q,count=1) + return Query(q,noun_phrase(t),noun_phrase(a),rel,opp,plural,neg,True) + m=re.match(r'^(?:the\s+)?(leftmost|rightmost|topmost|bottommost)\s+(.+)$',cleaned) + if m:return Query(q,noun_phrase(m[2]),relation=m[1],plural=plural,negate=neg,supported=True) + # Simple imperatives / quantified noun phrases are compositional; preserve + # unrestricted natural expressions rather than pretending a regex is a parser. + simple=bool(re.match(r'^'+VERBS+r'\s+',q) or re.match(r'^(all|every|both|two)\s+',cleaned)) + if simple and len(cleaned.split())<=5: + return Query(q,noun_phrase(cleaned),plural=plural,negate=neg,supported=True) + return Query(q,q,plural=plural,negate=neg,supported=neg) + +def query_plan(text): + q=parse_query(text) + return q,list(dict.fromkeys([q.original,q.target]+([q.anchor,q.opposite] if q.anchor else []))) + +def components(prob,threshold): + lab,n=ndimage.label(prob>=threshold,structure=np.ones((3,3),int)) + sizes=np.bincount(lab.ravel());out=[];h,w=prob.shape + for i,sl in enumerate(ndimage.find_objects(lab),1): + if sl is None or sizes[i]1 else 0) + if gate and margin<.05:return base,'target_ambiguous',None,margin + return scores[0]['mask'],'singular',None,margin + anchors=components(maps[q.anchor],threshold) + if oracle: + if oracle_anchor is None:return base,'oracle_unavailable',None,None + anchors=components(oracle_anchor.astype(float),.5) + if not anchors:return base,'anchor_missing',None,None + ac=anchors[0];am=ac['confidence']-(anchors[1]['confidence'] if len(anchors)>1 else 0) + if gate and am<.05:return base,'anchor_ambiguous',am,None + key='x' if q.relation in ('left','right') else 'y' + sign=1 if q.relation in ('right','below') else -1 + allowed=[] + for c in targets: + distance=sign*(c[key]-ac[key]) + if distance<(.03 if gate else 0):continue + residual=float((p[c['mask']]-maps[q.opposite][c['mask']]).mean()) + score=c['confidence']+(.5*residual if use_cf else 0) + allowed.append((score,c,residual)) + if not allowed:return base,'relation_unsatisfied',am,None + allowed.sort(key=lambda z:z[0],reverse=True) + sm=allowed[0][0]-(allowed[1][0] if len(allowed)>1 else 0) + # A confidently contradictory full-query response blocks a repair. + if use_cf and gate and allowed[0][2]<-.05:return base,'counterfactual_veto',am,sm + if not q.plural and gate and sm<.05:return base,'assignment_ambiguous',am,sm + return union([c for _,c,_ in allowed] if q.plural else [allowed[0][1]],p.shape),'projected',am,sm + result['anchor_nogate']=project(False,False)[0] + result['anchor_gate']=project(False,True)[0] + result['counterfactual_nogate']=project(True,False)[0] + main,reason,am,sm=project(True,True);result['cacp']=main + if oracle_anchor is not None:result['oracle_anchor']=project(True,True,True)[0] + flags.update(reason=reason,anchor_margin=am,score_margin=sm,changed=bool(np.any(main!=base))) + return result,flags + +def visual_features(prob,mask,threshold): + p=np.asarray(prob,float);k=max(1,int(p.size*.01));top=np.partition(p.ravel(),p.size-k)[-k:] + p2=np.clip(p,1e-6,1-1e-6) + return [float(p.max()),float(top.mean()),float(p.mean()),float(p.std()),float(mask.mean()), + float((-p2*np.log(p2)-(1-p2)*np.log(1-p2)).mean()),float(np.log1p(len(components(p,threshold))))] + +def score_mask(pred,gt): + intersection=int(np.logical_and(pred,gt).sum());union_n=int(np.logical_or(pred,gt).sum()) + return {'iou':intersection/union_n if union_n else 1.,'intersection':intersection,'union':union_n, + 'pred_pixels':int(pred.sum()),'gt_pixels':int(gt.sum()),'empty':not bool(pred.any())} diff --git a/source/code/prepare_d2.py b/source/code/prepare_d2.py new file mode 100644 index 0000000000000000000000000000000000000000..2d360ac6fa1e27dff25575abbcbaf4c434c9081f --- /dev/null +++ b/source/code/prepare_d2.py @@ -0,0 +1,29 @@ +"""Build Detectron2 in the isolated R2 vendor directory on a Slurm CPU node.""" +from pathlib import Path +import subprocess,urllib.request,zipfile,io,json,os,sysconfig,tarfile +ROOT=Path(__file__).resolve().parents[1];vendor=ROOT/'vendor' +url='https://download.pytorch.org/whl/cpu/torchvision-0.20.1%2Bcpu-cp39-cp39-linux_x86_64.whl' +if not (vendor/'torchvision').exists(): + with urllib.request.urlopen(url,timeout=120) as r:blob=r.read() + zipfile.ZipFile(io.BytesIO(blob)).extractall(vendor) +print('TORCH_IMPORT',flush=True) +import torch +print('TORCH',torch.__version__,torch.cuda.is_available(),flush=True) +d2=ROOT/'third_party/detectron2-0.6' +if not (Path(sysconfig.get_path('include'))/'Python.h').exists(): + headers=ROOT/'third_party/Python-3.9.16' + if not headers.exists(): + with urllib.request.urlopen('https://www.python.org/ftp/python/3.9.16/Python-3.9.16.tgz',timeout=120) as r:blob=r.read() + with tarfile.open(fileobj=io.BytesIO(blob),mode='r:gz') as archive:archive.extractall(ROOT/'third_party') + if not (headers/'pyconfig.h').exists(): + subprocess.run(['./configure','--without-ensurepip'],cwd=headers,check=True) + os.environ['CPATH']=str(headers/'Include')+':'+str(headers)+(':'+os.environ['CPATH'] if os.getenv('CPATH') else '') +subprocess.run(['python3','-m','pip','install','--target',str(vendor),'--no-deps','--no-build-isolation',str(d2)],check=True) +# Activate the official PyTorch fallback, which is already implemented in the +# unmodified MSDeformAttn.forward method. No parameter or numerical rule change. +repo=ROOT/'third_party/ReLA-3ca955198da8ace68f8980b6fcbada0791cc51c2' +p=repo/'gres_model/modeling/pixel_decoder/ops/functions/ms_deform_attn_func.py' +s=p.read_text();needle=' raise ModuleNotFoundError(info_string)' +if needle in s:p.write_text(s.replace(needle,' MSDA = None # R2: use the repository reference fallback')) +(ROOT/'protocol/rela_runtime_patch.json').write_text(json.dumps(dict(file=str(p.relative_to(ROOT)),change='Replace import-time error with MSDA=None; existing forward try/except invokes official grid_sample reference implementation',torch=torch.__version__,torchvision='0.20.1+cpu',slurm_job_id=os.getenv('SLURM_JOB_ID')),indent=2)) +print('D2_BUILD_COMPLETE',flush=True) diff --git a/source/code/prepare_full_natural.py b/source/code/prepare_full_natural.py new file mode 100644 index 0000000000000000000000000000000000000000..92d462622285d05ddd433eeda6b677ea77d7f893 --- /dev/null +++ b/source/code/prepare_full_natural.py @@ -0,0 +1,62 @@ +"""Prepare every official gRefCOCO evaluation expression, without subsampling.""" +from pathlib import Path +import json, hashlib, collections, concurrent.futures, urllib.request, time, os +import numpy as np +from PIL import Image +from pycocotools import mask as cm +ROOT=Path(__file__).resolve().parents[1] +from project_paths import legacy_root;OLD=legacy_root(ROOT) + +def main(): + refs=json.loads((OLD/'assets/grefcoco/grefs(unc).json').read_text()) + coco=json.loads((OLD/'assets/grefcoco/instances.json').read_text()) + ims={x['id']:x for x in coco['images']}; anns={x['id']:x for x in coco['annotations']} + chosen=[r for r in refs if r['split'] in ('val','testA','testB')] + idir=ROOT/'data/natural/images';mdir=ROOT/'data/natural/masks' + idir.mkdir(parents=True,exist_ok=True);mdir.mkdir(parents=True,exist_ok=True) + image_ids=sorted({r['image_id'] for r in chosen}) + def fetch(i): + name=ims[i]['file_name']; out=idir/name + if out.exists():return i,'cached' + candidates=[OLD/'data/natural/images'/name,OLD/'data/natural/images'/f'{i:012d}.jpg'] + for p in candidates: + if p.exists():out.symlink_to(p);return i,'reused' + url='https://s3.amazonaws.com/images.cocodataset.org/train2014/'+name + for attempt in range(4): + try: + with urllib.request.urlopen(url,timeout=90) as response:blob=response.read() + tmp=out.with_suffix('.partial');tmp.write_bytes(blob) + with Image.open(tmp) as image:image.verify() + tmp.replace(out);return i,'downloaded' + except Exception: + if attempt==3:raise + time.sleep(2**attempt) + counts=collections.Counter() + with concurrent.futures.ThreadPoolExecutor(max_workers=16) as pool: + for k,(iid,state) in enumerate(pool.map(fetch,image_ids)): + counts[state]+=1 + if k%100==0:print('IMAGES',k,len(image_ids),dict(counts),flush=True) + rows=[]; strata=collections.Counter() + for r in chosen: + im=ims[r['image_id']];h,w=im['height'],im['width']; gt=np.zeros((h,w),bool) + aids=[] if r['no_target'] else r['ann_id'] + if not isinstance(aids,list):aids=[aids] + for aid in aids: + seg=anns[aid]['segmentation'] + if isinstance(seg,list):z=cm.decode(cm.frPyObjects(seg,h,w)) + elif isinstance(seg['counts'],list):z=cm.decode(cm.frPyObjects(seg,h,w)) + else:z=cm.decode(seg) + gt|=z.any(axis=2) if z.ndim==3 else z.astype(bool) + assert bool(gt.any())==bool(aids),(r['ref_id'],aids) + gp=mdir/f"ref_{r['ref_id']}.png";Image.fromarray(gt.astype('uint8')*255).save(gp) + for sentence in r['sentences']: + row=dict(id=f"gref_{r['ref_id']}_{sentence['sent_id']}",scene_id=f"coco_{r['image_id']}",image_id=r['image_id'],ref_id=r['ref_id'],sent_id=sentence['sent_id'],domain='natural_full',split=r['split'],mode='zero' if not aids else 'one' if len(aids)==1 else 'multi',target_count=len(aids),query=sentence['raw'],image_path=str((idir/im['file_name']).relative_to(ROOT)),gt_path=str(gp.relative_to(ROOT)),seed=0,corruption='clean',pair_id=None,endpoint=None,template='official') + rows.append(row);strata[(r['split'],row['mode'])]+=1 + assert len(rows)==49492 and len({r['id'] for r in rows})==len(rows) + mp=ROOT/'data/natural_full.jsonl';mp.write_text(''.join(json.dumps(r)+'\n' for r in rows)) + old_rows=[json.loads(s) for s in (OLD/'data/manifest.jsonl').read_text().splitlines()] + train_ids={int(r['scene_id'].split('_')[-1]) for r in old_rows if r['domain']=='natural' and r['split'] in ('fit','cal')} + overlap=sorted(train_ids&set(image_ids)) + meta=dict(expressions=len(rows),references=len(chosen),images=len(image_ids),image_fetch=dict(counts),strata={f'{k[0]}/{k[1]}':v for k,v in strata.items()},manifest_sha256=hashlib.sha256(mp.read_bytes()).hexdigest(),old_calibration_image_overlap=overlap,source='FudanCVL/gRefCOCO; official repository-linked release',source_sha256={p.name:hashlib.sha256(p.read_bytes()).hexdigest() for p in [OLD/'assets/grefcoco/grefs(unc).json',OLD/'assets/grefcoco/instances.json']},slurm_job_id=os.getenv('SLURM_JOB_ID')) + (ROOT/'protocol/natural_full_manifest.json').write_text(json.dumps(meta,indent=2));print(json.dumps(meta,indent=2),flush=True) +if __name__=='__main__':main() diff --git a/source/code/prepare_human_passes.py b/source/code/prepare_human_passes.py new file mode 100644 index 0000000000000000000000000000000000000000..3f849fcdd650c23798420a681ce5ef9439fa8e32 --- /dev/null +++ b/source/code/prepare_human_passes.py @@ -0,0 +1,33 @@ +"""Split reader forms into ordered semantic/decomposition passes; merge complete labels.""" +from pathlib import Path +import argparse,csv +ROOT=Path(__file__).resolve().parents[1] +def read(p): + with p.open(newline='') as f:return list(csv.DictReader(f)) +def write(p,rows,fields): + p.parent.mkdir(parents=True,exist_ok=True) + with p.open('w',newline='') as f: + w=csv.DictWriter(f,fieldnames=fields,extrasaction='ignore');w.writeheader();w.writerows(rows) +def main(): + ap=argparse.ArgumentParser();ap.add_argument('--merge',choices=['A','B']);a=ap.parse_args() + home=ROOT/'review/human';dest=home/'passes' + for reader in ['A','B']: + original=home/f'parser_annotator_{reader}.csv';rows=read(original) + p1=dest/f'{reader}_pass1_semantics.csv';p2=dest/f'{reader}_pass2_decomposition.csv' + if not a.merge: + if p1.exists() or p2.exists():raise FileExistsError('Pass files already exist; preserve annotations.') + write(p1,rows,['id','query','representable','ambiguity','note']) + write(p2,rows,['id','query','proposed_target','proposed_anchor','proposed_relation','proposed_plural','decomposition_correct','error_type','note']) + elif a.merge==reader: + aa={r['id']:r for r in read(p1)};bb={r['id']:r for r in read(p2)} + assert aa.keys()==bb.keys()=={r['id'] for r in rows} + for r in rows: + x,y=aa[r['id']],bb[r['id']] + for k in ['representable','ambiguity']: + assert x[k] in ['0','1'],f'{r["id"]}: unresolved {k}';r[k]=x[k] + assert y['decomposition_correct'] in ['0','1'];r['decomposition_correct']=y['decomposition_correct'] + r['error_type']=y['error_type'];r['note']='SEMANTICS: '+x['note']+'; DECOMPOSITION: '+y['note'] + # Keep the supplied and independent source forms intact. + write(home/f'parser_annotator_{reader}_completed.csv',rows,list(rows[0])) + print('Prepared passes' if not a.merge else f'Merged completed reader {a.merge}') +if __name__=='__main__':main() diff --git a/source/code/prepare_official_masks.py b/source/code/prepare_official_masks.py new file mode 100644 index 0000000000000000000000000000000000000000..f1e612a8d8076d72e3e69a80e4131e84c42fd270 --- /dev/null +++ b/source/code/prepare_official_masks.py @@ -0,0 +1,24 @@ +"""Reproduce ReLA's 480x480 polygon-transform evaluation targets.""" +from pathlib import Path +import json,copy +import numpy as np +from PIL import Image +from pycocotools import mask as cm +ROOT=Path(__file__).resolve().parents[1];from project_paths import legacy_root;OLD=legacy_root(ROOT) +refs=json.loads((OLD/'assets/grefcoco/grefs(unc).json').read_text()) +coco=json.loads((OLD/'assets/grefcoco/instances.json').read_text());ims={x['id']:x for x in coco['images']};anns={x['id']:x for x in coco['annotations']} +dest=ROOT/'data/natural/masks_official480';dest.mkdir(parents=True,exist_ok=True) +n=0 +for r in refs: + if r['split'] not in ('val','testA','testB'):continue + gt=np.zeros((480,480),bool);im=ims[r['image_id']] + if not r['no_target']: + for aid in r['ann_id']: + if anns[aid].get('iscrowd',0):continue + seg=anns[aid]['segmentation'];assert isinstance(seg,list),'Official mapper expects polygons' + polys=[] + for polygon in seg: + p=np.asarray(polygon,float).reshape(-1,2);p[:,0]*=480/im['width'];p[:,1]*=480/im['height'];polys.append(p.ravel().tolist()) + z=cm.decode(cm.frPyObjects(polys,480,480));gt|=z.any(axis=2) + Image.fromarray(gt.astype('uint8')*255).save(dest/f"ref_{r['ref_id']}.png");n+=1 +print('OFFICIAL_MASKS_COMPLETE',n,flush=True) diff --git a/source/code/prepare_rela.py b/source/code/prepare_rela.py new file mode 100644 index 0000000000000000000000000000000000000000..aecd0d1094dc28f19378520754134c5211a0b473 --- /dev/null +++ b/source/code/prepare_rela.py @@ -0,0 +1,45 @@ +"""Download official ReLA weights and isolated compatibility dependencies.""" +from pathlib import Path +import json, subprocess, urllib.request, zipfile, io, hashlib, os, sys +ROOT=Path(__file__).resolve().parents[1] +def main(): + vendor=ROOT/'vendor';vendor.mkdir(exist_ok=True) + sys.path.insert(0,str(vendor)) + lock=json.loads((ROOT/'protocol/rela_reconstruction_lock.json').read_text()) + (ROOT/'models').mkdir(exist_ok=True);(ROOT/'third_party').mkdir(exist_ok=True) + repo=ROOT/'third_party'/('ReLA-'+lock['rela_commit']) + if not repo.exists(): + with urllib.request.urlopen('https://codeload.github.com/'+lock['rela_repository']+'/zip/'+lock['rela_commit'],timeout=120) as r:blob=r.read() + zipfile.ZipFile(io.BytesIO(blob)).extractall(ROOT/'third_party') + import importlib.util + for package,version in [('pip','25.2'),('setuptools','75.8.0'),('wheel','0.45.1')]: + if importlib.util.find_spec(package) is None: + with urllib.request.urlopen(f'https://pypi.org/pypi/{package}/{version}/json',timeout=60) as r:meta=json.load(r) + url=next(x['url'] for x in meta['urls'] if x['filename'].endswith('py3-none-any.whl')) + with urllib.request.urlopen(url,timeout=120) as r:blob=r.read() + zipfile.ZipFile(io.BytesIO(blob)).extractall(vendor) + packages=['gdown==5.2.0','timm==0.6.13','fvcore==0.1.5.post20221221','yacs==0.1.8','iopath==0.1.9','omegaconf==2.3.0','antlr4-python3-runtime==4.9.3','hydra-core==1.3.2','portalocker==2.10.1','termcolor==2.4.0','cloudpickle==3.0.0','tabulate==0.9.0','opencv-python-headless==4.10.0.84','shapely==2.0.6','h5py==3.11.0'] + subprocess.run(['python3','-m','pip','install','--target',str(vendor),'--no-deps',*packages],check=True) + import gdown + target=ROOT/'models/gres_swin_tiny.pth' + if not target.exists() or target.stat().st_size!=650774639: + gdown.download(id='1VwX3BQy6gaF38P7YL6YeF2m0prgpO-IG',output=str(target),quiet=False) + assert target.stat().st_size==650774639 + assert hashlib.sha256(target.read_bytes()).hexdigest()==lock['checkpoint_sha256'],'ReLA checkpoint mismatch' + bert=ROOT/'models/bert-base-uncased';bert.mkdir(exist_ok=True) + for f in ['config.json','vocab.txt','tokenizer_config.json','tokenizer.json','model.safetensors']: + p=bert/f + if not p.exists():urllib.request.urlretrieve('https://huggingface.co/google-bert/bert-base-uncased/resolve/main/'+f,str(p)) + assert hashlib.sha256(p.read_bytes()).hexdigest()==lock['bert_files_sha256'][f],f+' differs from executed BERT asset; obtain the recorded version' + url='https://codeload.github.com/facebookresearch/detectron2/zip/refs/tags/v0.6' + d2=ROOT/'third_party/detectron2-0.6' + if not d2.exists(): + with urllib.request.urlopen(url,timeout=120) as r:blob=r.read() + zipfile.ZipFile(io.BytesIO(blob)).extractall(ROOT/'third_party') + # CPU extension suffices for this architecture; MSDeformAttn uses the + # official repository's PyTorch reference implementation on the GPU. + if os.getenv('R2_BUILD_D2')=='1': + subprocess.run(['python3','-m','pip','install','--target',str(vendor),'--no-deps','--no-build-isolation',str(d2)],check=True) + meta=dict(checkpoint_file=target.name,checkpoint_sha256=hashlib.sha256(target.read_bytes()).hexdigest(),bytes=target.stat().st_size,official_drive_file_id='1VwX3BQy6gaF38P7YL6YeF2m0prgpO-IG',packages=packages,detectron2='v0.6',slurm_job_id=os.getenv('SLURM_JOB_ID')) + (ROOT/'protocol/rela_assets.json').write_text(json.dumps(meta,indent=2));print(json.dumps(meta,indent=2),flush=True) +if __name__=='__main__':main() diff --git a/source/code/project_paths.py b/source/code/project_paths.py new file mode 100644 index 0000000000000000000000000000000000000000..d639ddddb717871e92852db59298f2107e65b464 --- /dev/null +++ b/source/code/project_paths.py @@ -0,0 +1,9 @@ +"""Resolve bundled legacy dependencies without hard-coded cluster paths.""" +from pathlib import Path +import os +def legacy_root(root): + if os.getenv('REFSEG_LEGACY_ROOT'):return Path(os.environ['REFSEG_LEGACY_ROOT']).resolve() + root=Path(root) + for p in [root/'legacy_project',root.parent/'refseg_scale_20260906',root.parent/'RefSeg_Scale_MVA']: + if p.exists():return p + raise FileNotFoundError('Bundled legacy_project missing; set REFSEG_LEGACY_ROOT') diff --git a/source/code/publish_hf_release.py b/source/code/publish_hf_release.py new file mode 100644 index 0000000000000000000000000000000000000000..6f773f3157c010815bec8ada8537293f7c0fc574 --- /dev/null +++ b/source/code/publish_hf_release.py @@ -0,0 +1,40 @@ +"""Publish the user-authorized staged release to the Ethosoft organization.""" +from pathlib import Path +import argparse,hashlib,json,os,sys,zipfile +os.environ['HF_HUB_DISABLE_PROGRESS_BARS']='1' +from huggingface_hub import HfApi +ROOT=Path(__file__).resolve().parents[1] +REPO='Ethosoft/RefSeg-CA' + +def main(): + ap=argparse.ArgumentParser();ap.add_argument('--update-documents',action='store_true') + ap.add_argument('--publish-source',action='store_true');ap.add_argument('--release-tag');a=ap.parse_args() + source=ROOT/'release_public' + manifest=json.loads((source/'DATA_MANIFEST.json').read_text()) + for name,meta in manifest['files'].items(): + p=source/name;assert p.stat().st_size==meta['bytes'] + assert hashlib.sha256(p.read_bytes()).hexdigest()==meta['sha256'],name + with zipfile.ZipFile(source/'release/RefSeg_CA_R3_Public_Source.zip') as z:assert z.testzip() is None + assert (source/'release/RefSeg_CA_MVA.pdf').read_bytes().startswith(b'%PDF') + api=HfApi();identity=api.whoami();assert identity['name']=='nmsofficial' + assert any(o['name']=='Ethosoft' for o in identity.get('orgs',[])) + print(json.dumps({'phase':'validated','repo':REPO,'files':len(manifest['files'])}),flush=True) + api.create_repo(REPO,repo_type='dataset',private=False,exist_ok=True) + kwargs={} + if a.update_documents:kwargs['allow_patterns']=['README.md','release/**']+(['source/**'] if a.publish_source else []) + commit=api.upload_folder(repo_id=REPO,repo_type='dataset',folder_path=source, + commit_message='R3 public code, data and manuscript' if not a.update_documents else 'Add verified public availability and human-evaluation guide',**kwargs) + tag=a.release_tag or ('r3-release-v1' if a.update_documents else 'r3-data-v1') + api.create_tag(REPO,tag=tag,repo_type='dataset',revision=commit.oid,exist_ok=True) + info=api.repo_info(REPO,repo_type='dataset');assert info.private is False + receipt=dict(status='PUBLISHED',repo_id=REPO,url='https://huggingface.co/datasets/'+REPO,commit=commit.oid,tag=tag,private=info.private, + files=len(api.list_repo_files(REPO,repo_type='dataset',revision=commit.oid))) + out=ROOT/'protocol'/('public_release_receipt.json' if a.update_documents else 'public_data_receipt.json') + out.write_text(json.dumps(receipt,indent=2));print(json.dumps(receipt),flush=True) + +if __name__=='__main__': + try:main() + except Exception as e: + # Do not print credentials, request headers, environment, or full tracebacks. + print(json.dumps({'status':'FAILED','error_type':type(e).__name__,'http_status':getattr(getattr(e,'response',None),'status_code',None)}),flush=True) + sys.exit(1) diff --git a/source/code/r2_repair.py b/source/code/r2_repair.py new file mode 100644 index 0000000000000000000000000000000000000000..4f06b62156cfde4c370371716e3f69413c1f5b6f --- /dev/null +++ b/source/code/r2_repair.py @@ -0,0 +1,52 @@ +"""Scope-filtered anchor projection. Frozen before R2 predictions. + +The new primary rule removes the unhelpful counterfactual branch and refuses +clauses whose scope/cardinality cannot be represented by the original parser. +No test labels, images, or masks enter the syntax guard. +""" +import re +import phase1_repair as p1 +FORBIDDEN=re.compile(r'\b(that|which|who|whose|with|wearing|holding|carrying|standing|sitting|looking|and|or|except|without|behind|between|nearest|closest|not|no)\b') +EXACT_COUNT=re.compile(r'\b(two|three|four|five|six|seven|eight|nine|ten|[2-9])\b') +def scope_safe(text): + q=p1.parse_query(text) + if q.negate:return True,'explicit_action' + if not q.supported:return False,'outside_grammar' + if EXACT_COUNT.search(q.original):return False,'exact_cardinality_unsupported' + clauses=[q.target]+([q.anchor] if q.anchor else []) + if any(FORBIDDEN.search(c) or len(c.split())>5 for c in clauses):return False,'nested_or_modified_clause' + if any(re.search(r'\b(left|right|above|below)\b',c) for c in clauses):return False,'nested_relation' + return True,'accepted' +def repair(text,maps,threshold): + preds,flags=p1.repaired_maps(text,maps,threshold) + safe,reason=scope_safe(text) + preds['safe_anchor']=preds['anchor_gate'] if safe else preds['frozen'] + flags.update(scope_safe=safe,scope_reason=reason,cf_vs_anchor_changed=bool((preds['cacp']!=preds['anchor_gate']).any()),nogate_cf_changed=bool((preds['anchor_nogate']!=preds['counterfactual_nogate']).any()),safe_vs_frozen_changed=bool((preds['safe_anchor']!=preds['frozen']).any())) + return preds,flags +def primary_plan(text): + q=p1.parse_query(text);safe,_=scope_safe(text) + return list(dict.fromkeys([q.original]+([q.target,q.anchor] if safe and q.anchor else [q.target] if safe and not q.negate else []))) + +def primary_mask(text,maps,threshold): + """The primary rule alone, without computing any ablated branches.""" + q=p1.parse_query(text);p=maps[q.original];base=p1.native(p,threshold) + if q.negate:return base & False + safe,_=scope_safe(text) + if not safe:return base + targets=p1.components(maps.get(q.target,p),threshold) + if not targets:return base + if q.relation.endswith('most'):return p1.global_component(targets,q.relation)['mask'] + if not q.anchor: + if q.plural:return p1.union(targets,p.shape) + margin=targets[0]['confidence']-(targets[1]['confidence'] if len(targets)>1 else 0) + return base if margin<.05 else targets[0]['mask'] + anchors=p1.components(maps[q.anchor],threshold) + if not anchors:return base + ac=anchors[0];margin=ac['confidence']-(anchors[1]['confidence'] if len(anchors)>1 else 0) + if margin<.05:return base + key='x' if q.relation in ('left','right') else 'y';sign=1 if q.relation in ('right','below') else -1 + allowed=[c for c in targets if sign*(c[key]-ac[key])>=.03] + if not allowed:return base + margin=allowed[0]['confidence']-(allowed[1]['confidence'] if len(allowed)>1 else 0) + if not q.plural and margin<.05:return base + return p1.union(allowed if q.plural else [allowed[0]],p.shape) diff --git a/source/code/r3_replay.py b/source/code/r3_replay.py new file mode 100644 index 0000000000000000000000000000000000000000..c9298cb00b4c438120477eba54d904771de84275 --- /dev/null +++ b/source/code/r3_replay.py @@ -0,0 +1,106 @@ +"""Reviewer-requested cache replay; no model fitting or additional language queries. + +The R2 rule remains primary. All sweeps are post-review diagnostics. GT is used +only by score(), never by projection(). Each threshold sweep has a matched +native comparator. Rejected expressions contribute exactly zero paired delta. +""" +from pathlib import Path +import argparse, collections, hashlib, json, os, time +import numpy as np +from PIL import Image +from scipy import ndimage +import phase1_repair as p1 +from r2_repair import scope_safe + +ROOT=Path(os.getenv('REFSEG_ROOT',Path(__file__).resolve().parents[1])) +BASE=dict(anchor_margin=.05,target_margin=.05,geometry=.03,size_factor=1.,threshold_offset=0.) +CONFIGS={'primary':BASE.copy()} +for key,values in [('anchor_margin',[.02,.10]),('target_margin',[.02,.10]),('geometry',[.01,.05]),('size_factor',[.5,2.]),('threshold_offset',[-.05,.05])]: + for v in values:CONFIGS[key+'_'+str(v)]={**BASE,key:v} + +def components(prob,t,factor): + lab,n=ndimage.label(prob>=t,structure=np.ones((3,3),int));h,w=prob.shape + sizes=np.bincount(lab.ravel());out=[];minimum=max(1,int(max(16,int(.0002*h*w))*factor)) + for i,sl in enumerate(ndimage.find_objects(lab),1): + if sl is None or sizes[i]1 else 0);trace['target_margin']=tm + return finish(base,'target_ambiguous') if tm1 else 0);trace['anchor_margin']=am + if am=cfg['geometry']];trace['eligible_components']=len(allowed) + if not allowed:return finish(base,'relation_unsatisfied') + tm=allowed[0]['confidence']-(allowed[1]['confidence'] if len(allowed)>1 else 0);trace['target_margin']=tm + if not q.plural and tm0 + gt=gtcache[r['ref_id']];allres={};tr=None;primary_mask=None + for nameconf,cfg in CONFIGS.items(): + threshold=native_t+cfg['threshold_offset'];cs={} + for key in keys: + ck=(key,threshold,cfg['size_factor']) + if ck not in cc:cc[ck]=components(maps[key],threshold,cfg['size_factor']) + cs[key]=cc[ck] + shape=maps[q.original].shape;base=p1.union(cs[q.original],shape) + pred,trace=projection(q,cs,shape,cfg) + allres[nameconf]=dict(frozen=score(base,gt,r['target_count']==0),sfap=score(pred,gt,r['target_count']==0),changed=bool((base!=pred).any())) + if nameconf=='primary':tr=trace;primary_mask=pred.copy() + else:allres[nameconf]['different_from_primary']=bool((primary_mask!=pred).any()) + row={k:r[k] for k in ['id','scene_id','split','query','target_count']} + row.update(model=a.model,trace=tr,configs=allres) + out.write(json.dumps(row)+'\n');count+=1 + out.flush() + if idx%10==0:print(json.dumps(dict(image=idx,images=len(paths),records=count,seconds=time.time()-t0)),flush=True) + meta=dict(status='COMPLETE',records=count,images=len(paths),seconds=time.time()-t0,args=vars(a),configs=CONFIGS,job_id=os.getenv('SLURM_JOB_ID')) + output.with_suffix('.meta.json').write_text(json.dumps(meta,indent=2));print(json.dumps(meta),flush=True) +if __name__=='__main__':main() diff --git a/source/code/r3_summarize.py b/source/code/r3_summarize.py new file mode 100644 index 0000000000000000000000000000000000000000..9856042f0525960af6b846665497d8c2988529a5 --- /dev/null +++ b/source/code/r3_summarize.py @@ -0,0 +1,97 @@ +"""Coverage, sensitivity and harm diagnostics; exports portable exact score rows.""" +from pathlib import Path +import argparse,collections,csv,gzip,hashlib,json,os,tarfile +import numpy as np +import phase1_repair as p1 +from r2_repair import scope_safe +ROOT=Path(os.getenv('REFSEG_ROOT',Path(__file__).resolve().parents[1])) +DEST=ROOT/'results/r3';DEST.mkdir(parents=True,exist_ok=True) +def read(p): + with (gzip.open(p,'rt') if str(p).endswith('.gz') else p.open()) as f:return [json.loads(x) for x in f] +def ci(rows,d): + groups=collections.defaultdict(lambda:[0.,0]) + for r,x in zip(rows,d):g=groups[r['scene_id']];g[0]+=x;g[1]+=1 + v=np.array(list(groups.values()));rng=np.random.default_rng(31073);vals=[] + for _ in range(2000): + z=v[rng.integers(0,len(v),len(v))];vals.append(z[:,0].sum()/z[:,1].sum()) + return np.quantile(vals,[.025,.975]).tolist() +def compare(rows,d): + d=np.array(d);return dict(n=len(d),delta=float(d.mean()),ci=ci(rows,d),helped=int((d>1e-12).sum()),harmed=int((d< -1e-12).sum()),tied=int((abs(d)<=1e-12).sum())) +def predicate(q,safe,level): + if level=='short_relations':return safe and bool(q.anchor) and max(len(q.target.split()),len(q.anchor.split()))<=3 + if level=='relations':return safe and bool(q.anchor) + return safe if level=='primary' else q.supported +def main(): + ap=argparse.ArgumentParser();ap.add_argument('--export-only',action='store_true');a=ap.parse_args() + result={};native={} + for model in ['clipseg','groundedsam']: + rows=read(ROOT/'results/analysis'/('natural_'+model+'_evaluated.jsonl.gz'));native[model]=rows + coverage=[] + for level in ['short_relations','relations','primary','legacy']: + accepted=[predicate(p1.parse_query(r['query']),scope_safe(r['query'])[0],level) for r in rows] + d=[r['official480_scores']['anchor_gate']['iou']-r['official480_scores']['frozen']['iou'] if yes else 0. for r,yes in zip(rows,accepted)] + z=compare(rows,d);z.update(scope=level,accepted=sum(accepted),coverage=sum(accepted)/len(rows),conditional_delta=sum(d)/sum(accepted),gIoU=float(np.mean([r['official480_scores']['frozen']['iou'] for r in rows]))+z['delta']) + z['accepted_tied']=sum(accepted)-z['helped']-z['harmed'];coverage.append(z) + result[model]=dict(coverage=coverage) + (DEST/'coverage.json').write_text(json.dumps(result,indent=2)) + if not a.export_only: + for model,rows in native.items(): + paths=[DEST/f'{model}_{i}of16.jsonl' for i in range(16)] + assert all(p.with_suffix('.meta.json').exists() for p in paths),'incomplete replay shards' + replay=[r for p in paths for r in read(p)];assert len(replay)==1557 and len({r['id'] for r in replay})==1557 + orig={r['id']:r for r in rows};byid={r['id']:r for r in replay} + maxerr=0. + for r in replay: + for k,v in [('frozen','frozen'),('sfap','safe_anchor')]: + maxerr=max(maxerr,abs(r['configs']['primary'][k]['iou']-orig[r['id']]['official480_scores'][v]['iou'])) + assert maxerr<1e-12,('primary replay mismatch',model,maxerr) + sensitivity=[] + for c in replay[0]['configs']: + dd={r['id']:r['configs'][c]['sfap']['iou']-r['configs'][c]['frozen']['iou'] for r in replay} + full=[dd.get(r['id'],0.) for r in rows];z=compare(rows,full);z.update(config=c,accepted=1557,conditional_delta=sum(full)/1557) + z['changed']=sum(r['configs'][c]['changed'] for r in replay);sensitivity.append(z) + harm=[r for r in replay if r['configs']['primary']['sfap']['iou']=.5 for r in harm),correct_to_incorrect=sum(before(r)>=.5 and after(r)<.5 for r in harm),to_empty=sum(r['target_count']>0 and r['configs']['primary']['sfap']['pred_nt'] for r in harm),empty_gt_harmed=sum(r['target_count']==0 for r in harm),plural_flag_mismatch=sum(r['target_count']>1 and not p1.parse_query(r['query']).plural for r in harm),relation_cases=sum(bool(r['trace']['relation']) for r in harm),anchor_cases=sum(bool(p1.parse_query(r['query']).anchor) for r in harm),boundary_sensitive=sum(any(r['configs'][c].get('different_from_primary') for c in ['geometry_0.01','geometry_0.05']) for r in harm),component_filter_sensitive=sum(any(r['configs'][c].get('different_from_primary') for c in ['size_factor_0.5','size_factor_2.0']) for r in harm),threshold_sensitive=sum(any(r['configs'][c].get('different_from_primary') for c in ['threshold_offset_-0.05','threshold_offset_0.05']) for r in harm),reason_counts=dict(collections.Counter(r['trace']['reason'] for r in harm))) + result[model].update(sensitivity=sensitivity,harm=metrics,primary_replay_max_error=maxerr) + with gzip.open(DEST/f'{model}_replay.jsonl.gz','wt') as f: + for r in replay:f.write(json.dumps(r)+'\n') + cases=sorted(harm,key=lambda r:hashlib.sha256(r['id'].encode()).hexdigest())[:60] + with (DEST/f'{model}_harm_annotation.csv').open('w',newline='') as f: + w=csv.writer(f);w.writerow(['id','query','image_id','baseline_iou','sfap_iou','anchor_grounding_error','target_decomposition_error','merged_components','relation_boundary_error','plurality_error','other','evidence_note']) + for r in cases:w.writerow([r['id'],r['query'],r['scene_id'].split('_')[-1],before(r),after(r)]+['']*7) + (DEST/'review_results.json').write_text(json.dumps(result,indent=2)) + # Portable primary-record tables contain the exact float and integer scores. + portable=DEST/'portable';portable.mkdir(exist_ok=True) + for dataset in ['natural','rich']: + for model in ['clipseg','groundedsam','rela']: + rows=read(ROOT/'results/analysis'/f'{dataset}_{model}_evaluated.jsonl.gz') + key='official480_scores' if dataset=='natural' else 'scores' + variants=['frozen'] if model=='rela' else ['frozen','safe_anchor' if dataset=='natural' else 'anchor_gate'] + dest=portable/f'{dataset}_{model}_primary.csv.gz' + with gzip.open(dest,'wt',newline='') as f: + w=csv.writer(f);w.writerow(['id','scene_id','split','seed','corruption','pair_id','endpoint','template','mode','target_count','variant','iou','intersection','union','pred_nt']) + for r in rows: + for v in variants: + z=r[key][v];w.writerow([r.get(k,'') for k in ['id','scene_id','split','seed','corruption','pair_id','endpoint','template','mode','target_count']]+[v,z['iou'],z['intersection'],z['union'],int(z.get('pred_nt',z['empty']))]) + # Stratified audit; reviewers see query and proposal but not acceptance/outcome. + manifest=read(ROOT/'data/natural_full.jsonl');strata=collections.defaultdict(list) + for r in manifest: + q=p1.parse_query(r['query']);safe=scope_safe(r['query'])[0];strata['accepted' if safe else 'legacy_rejected' if q.supported else 'outside'].append(r) + rng=np.random.default_rng(913);sample=[];keyrows=[] + for name,rs in strata.items(): + chosen=rng.choice(len(rs),200,replace=False) + for j in chosen: + r=rs[j];q=p1.parse_query(r['query']);keyrows.append(dict(id=r['id'],stratum=name,N=len(rs),n=200,weight=len(rs)/200,accepted=scope_safe(r['query'])[0])) + sample.append([r['id'],r['query'],r['image_id'],q.target,q.anchor,q.relation,int(q.plural)]+['']*5) + rng.shuffle(sample) + for who in ['A','B']: + with (portable/f'parser_annotator_{who}.csv').open('w',newline='') as f: + w=csv.writer(f);w.writerow(['id','query','image_id','proposed_target','proposed_anchor','proposed_relation','proposed_plural','representable','decomposition_correct','ambiguity','error_type','note']);w.writerows(sample) + (portable/'parser_sampling_key.json').write_text(json.dumps(keyrows,indent=2)) + with gzip.open(portable/'natural_full_manifest.jsonl.gz','wt') as f: + for r in manifest:f.write(json.dumps(r)+'\n') + archive=DEST/'portable_primary_results.tar.gz' + with tarfile.open(archive,'w:gz',compresslevel=9) as tar:tar.add(portable,arcname='portable') + print(json.dumps(dict(archive=str(archive),bytes=archive.stat().st_size,sha256=hashlib.sha256(archive.read_bytes()).hexdigest())),flush=True) +if __name__=='__main__':main() diff --git a/source/code/rela_engine.py b/source/code/rela_engine.py new file mode 100644 index 0000000000000000000000000000000000000000..3c566d32087c7fcf64ee45e2a1064e1c10ee1913 --- /dev/null +++ b/source/code/rela_engine.py @@ -0,0 +1,64 @@ +"""Official ReLA Swin-Tiny architecture and trained checkpoint adapter.""" +from pathlib import Path +import sys,json,os +import numpy as np +from PIL import Image +ROOT=Path(__file__).resolve().parents[1] +class ReLA: + threshold=.5 + def __init__(self,device='cuda'): + import torch + self.torch=torch;self.device=device + repo=ROOT/'third_party/ReLA-3ca955198da8ace68f8980b6fcbada0791cc51c2';sys.path.insert(0,str(repo)) + if not hasattr(Image, "LINEAR"):Image.LINEAR=Image.Resampling.BILINEAR + from detectron2.config import get_cfg + from detectron2.modeling import build_model + from detectron2.data import transforms as T + from gres_model import add_maskformer2_config,add_refcoco_config + from transformers import BertTokenizer + from detectron2.projects.deeplab import add_deeplab_config + cfg=get_cfg();add_deeplab_config(cfg);add_maskformer2_config(cfg);add_refcoco_config(cfg) + cfg.merge_from_file(str(repo/'configs/referring_swin_tiny.yaml')) + cfg.MODEL.DEVICE=device;cfg.REFERRING.BERT_TYPE=str(ROOT/'models/bert-base-uncased') + self.model=build_model(cfg).eval() + checkpoint=torch.load(ROOT/'models/gres_swin_tiny.pth',map_location='cpu',weights_only=False) + state=checkpoint['model'] if 'model' in checkpoint else checkpoint + key='text_encoder.embeddings.position_ids' + if key in state: + assert torch.equal(state[key],self.model.text_encoder.embeddings.position_ids.cpu()) + state.pop(key) # Identical deterministic buffer is nonpersistent in current Transformers. + incompat=self.model.load_state_dict(state,strict=True) + self.model.to(device);self.tokenizer=BertTokenizer.from_pretrained(cfg.REFERRING.BERT_TYPE,local_files_only=True) + self.max_tokens=cfg.REFERRING.MAX_TOKENS;self.size=cfg.INPUT.IMAGE_SIZE + self.resize=T.Resize((self.size,self.size)) + print('RELA_STRICT_LOAD_OK',len(state),self.size,self.max_tokens,str(incompat),flush=True) + def predict(self,image,texts): + t=self.torch;arr=np.array(image);resized=self.resize.get_transform(arr).apply_image(arr) + rgb=t.as_tensor(np.ascontiguousarray(resized.transpose(2,0,1))) + out={};nt={};official={} + with t.inference_mode(): + for start in range(0,len(texts),2): + batch=texts[start:start+2];inputs=[] + for q in batch: + ids=self.tokenizer.encode(text=q,add_special_tokens=True)[:self.max_tokens] + padding=[0]*(self.max_tokens-len(ids)) + inputs.append(dict(image=rgb,lang_tokens=t.tensor(ids+padding).unsqueeze(0),lang_mask=t.tensor([1]*len(ids)+padding).unsqueeze(0))) + outputs=self.model(inputs) + for q,p in zip(batch,outputs): + official[q]=p['ref_seg'].argmax(dim=0).bool().cpu().numpy() + nt[q]=bool(p['nt_label'].argmax(dim=0).item()) + # Monotone foreground/background margin for the optional + # shared repair interface. Native scores use exact argmax. + margin=(p['ref_seg'][1]-p['ref_seg'][0]+1)/2 + out[q]=t.nn.functional.interpolate(margin[None,None],size=(image.height,image.width),mode='bilinear',align_corners=False)[0,0].float().cpu().numpy() + return out,dict(language_queries=len(texts),nt=nt,official_masks=official,sam_boxes=0,truncated_boxes=0) + +if __name__=='__main__': + import torch + torch.set_num_threads(4) + engine=ReLA(device=os.getenv('R2_DEVICE','cuda')) + old=ROOT.parent/'refseg_scale_20260906' + row=next(json.loads(s) for s in (old/'data/manifest.jsonl').read_text().splitlines() if json.loads(s)['domain']=='natural' and json.loads(s)['split']=='fit') + image=Image.open(old/row['image_path']).convert('RGB') + maps,stats=engine.predict(image,[row['query']]) + print('RELA_PILOT_OK',image.size,row['query'],{q:dict(shape=v.shape,min=float(v.min()),max=float(v.max())) for q,v in maps.items()},stats['nt'],flush=True) diff --git a/source/code/score_human_parser_audit.py b/source/code/score_human_parser_audit.py new file mode 100644 index 0000000000000000000000000000000000000000..575028cbf5d35805f3afb37a137a2a76a4c159dc --- /dev/null +++ b/source/code/score_human_parser_audit.py @@ -0,0 +1,33 @@ +"""Score only complete independent human labels; never fill missing labels.""" +from pathlib import Path +import argparse,csv,json,collections +FIELDS=['representable','decomposition_correct','ambiguity'] +def read(p): + with Path(p).open(newline='') as f:rows=list(csv.DictReader(f)) + assert len({r['id'] for r in rows})==len(rows),'duplicate ids' + return {r['id']:r for r in rows} +def main(): + a=argparse.ArgumentParser();a.add_argument('--a',required=True);a.add_argument('--b',required=True);a.add_argument('--key',required=True);a.add_argument('--adjudicated');a.add_argument('--output',required=True);p=a.parse_args() + aa,bb=read(p.a),read(p.b);key={r['id']:r for r in json.loads(Path(p.key).read_text())} + assert aa.keys()==bb.keys()==key.keys(),'unaligned forms' + missing=[(i,f) for i in key for f in FIELDS if aa[i][f] not in ['0','1'] or bb[i][f] not in ['0','1']] + if missing: + report=dict(status='INCOMPLETE',items=len(key),missing_or_unresolved_fields=len(missing),reason='Human 0/1 labels required; no statistics estimated.') + else: + agreement={} + for field in FIELDS: + x=[int(aa[i][field]) for i in key];y=[int(bb[i][field]) for i in key];n=len(x);po=sum(a==b for a,b in zip(x,y))/n;px=sum(x)/n;py=sum(y)/n;pe=px*py+(1-px)*(1-py) + agreement[field]=dict(raw_agreement=po,kappa=(po-pe)/(1-pe) if pe<1 else None,scope='unweighted stratified audit sample') + disagreements=[i for i in key if any(aa[i][f]!=bb[i][f] for f in FIELDS)] + report=dict(status='AWAITING_ADJUDICATION',agreement=agreement,disagreement_ids=disagreements) + if p.adjudicated: + gold=read(p.adjudicated);assert gold.keys()==key.keys() + assert all(gold[i][f] in ['0','1'] for i in key for f in FIELDS),'unresolved adjudication' + counts=collections.defaultdict(float) + for i,k in key.items(): + pred=bool(k['accepted']);truth=gold[i]['representable']=='1';weight=k['weight'];counts[('T' if pred==truth else 'F')+('P' if pred else 'N')]+=weight + tp,fp,tn,fn=[counts[k] for k in ['TP','FP','TN','FN']] + ratio=lambda a,b:a/b if b else None + report.update(status='COMPLETE',weighted_counts=dict(counts),precision=ratio(tp,tp+fp),recall=ratio(tp,tp+fn),false_acceptance_rate=ratio(fp,fp+tn),false_rejection_rate=ratio(fn,tp+fn),target='semantic representability under documented grammar',decomposition_precision_among_accepted=ratio(sum(key[i]['weight'] for i in key if key[i]['accepted'] and gold[i]['decomposition_correct']=='1'),sum(key[i]['weight'] for i in key if key[i]['accepted']))) + Path(p.output).write_text(json.dumps(report,indent=2));print(json.dumps(report,indent=2)) +if __name__=='__main__':main() diff --git a/source/code/timing_r2.py b/source/code/timing_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..616a9c40380f9360440e6728fc13b03389f5fd37 --- /dev/null +++ b/source/code/timing_r2.py @@ -0,0 +1,36 @@ +"""Paired warmed latency, same images/GPU, balanced plan order, no GT use.""" +from pathlib import Path +import sys,json,time,os +import numpy as np +from PIL import Image +ROOT=Path(__file__).resolve().parents[1];from project_paths import legacy_root;OLD=legacy_root(ROOT);sys.path.insert(0,str(OLD/'code')) +from infer import ClipSeg,GroundedSam +import phase1_repair as p +from r2_repair import primary_plan,primary_mask,repair +import torch +torch.set_num_threads(4) +rows=[json.loads(s) for s in (ROOT/'data/rich_synthetic.jsonl').read_text().splitlines()] +chosen=[r for r in rows if r['render']=='rich' and r['mode']=='relational' and r['endpoint']==0][:12] +output=[] +for model,cls in [('clipseg',ClipSeg),('groundedsam',GroundedSam)]: + engine=cls() + image=Image.open(ROOT/chosen[0]['image_path']).convert('RGB');q=p.parse_query(chosen[0]['query']);engine.predict(image,p.query_plan(chosen[0]['query'])[1]);torch.cuda.synchronize() + for i,r in enumerate(chosen): + image=Image.open(ROOT/r['image_path']).convert('RGB');q=p.parse_query(r['query']) + plans={'frozen':[q.original],'sfap':primary_plan(r['query']),'cacp':p.query_plan(r['query'])[1]} + for rep in range(3): + order=['frozen','sfap','cacp'];shift=(i+rep)%3;order=order[shift:]+order[:shift] + for variant in order: + torch.cuda.synchronize();start=time.perf_counter();maps,stats=engine.predict(image,plans[variant]);torch.cuda.synchronize();forward=time.perf_counter()-start + maps={k:v.astype(np.float16).astype(np.float32) for k,v in maps.items()} + start=time.perf_counter() + if variant=='frozen':mask=p.native(maps[q.original],engine.threshold) + elif variant=='sfap':mask=primary_mask(r['query'],maps,engine.threshold) + else:mask=repair(r['query'],maps,engine.threshold)[0]['cacp'] + cpu=time.perf_counter()-start + if variant=='cacp':assert np.array_equal(primary_mask(r['query'],maps,engine.threshold),repair(r['query'],maps,engine.threshold)[0]['safe_anchor']) + output.append(dict(model=model,image=r['image_path'],scene_id=r['scene_id'],repeat=rep,order=order,variant=variant,queries=len(plans[variant]),forward_seconds=forward,postprocess_seconds=cpu,total_seconds=forward+cpu)) + print('TIMING',model,i+1,len(chosen),flush=True) + del engine;torch.cuda.empty_cache() +dest=ROOT/'results/paired_timing.json';dest.write_text(json.dumps(dict(gpu=torch.cuda.get_device_name(0),slurm_job_id=os.getenv('SLURM_JOB_ID'),records=output,warmup='One complete four-query plan per model before timing',cache='Disabled',repeats=3,selection='First twelve rich relational scene records, text/ID selection; no label or score selection'),indent=2)) +print('PAIRED_TIMING_COMPLETE',flush=True) diff --git a/source/code/verify_portable_results.py b/source/code/verify_portable_results.py new file mode 100644 index 0000000000000000000000000000000000000000..40b965be8506f696d52c80f85f1a47a1d924485f --- /dev/null +++ b/source/code/verify_portable_results.py @@ -0,0 +1,44 @@ +"""Rebuild primary paper metrics from shipped per-record scores, without TRUBA.""" +from pathlib import Path +import csv,gzip,json,math,collections +ROOT=Path(__file__).resolve().parents[1] +def describe(rows): + pos=[r for r in rows if int(r['target_count'])>0];neg=[r for r in rows if int(r['target_count'])==0] + mean=lambda xs:sum(xs)/len(xs) if xs else None + return dict(n=len(rows),gIoU=mean([float(r['iou']) for r in rows]),cIoU=sum(int(r['intersection']) for r in rows)/max(1,sum(int(r['union']) for r in rows)),positive_mIoU=mean([float(r['iou']) for r in pos]),Nacc=mean([int(r['pred_nt']) for r in neg]),false_empty=mean([int(r['pred_nt']) for r in pos]),Pr50=mean([float(r['iou'])>=.5 for r in pos])) +def main(): + expected=json.loads((ROOT/'results/analysis/paper_results.json').read_text());reports=[];maxerr=0. + for dataset in ['natural','rich']: + for model in ['clipseg','groundedsam','rela']: + p=ROOT/'results/r3/portable'/f'{dataset}_{model}_primary.csv.gz' + with gzip.open(p,'rt') as f:allrows=list(csv.DictReader(f)) + for e in expected[dataset][model]['tables']: + if e['variant'] not in ['frozen','safe_anchor']:continue + variant='anchor_gate' if dataset=='rich' and e['variant']=='safe_anchor' else e['variant'] + rows=[r for r in allrows if r['variant']==variant] + if dataset=='natural':rows=[r for r in rows if e['split']=='all' or r['split']==e['split']] + else:rows=[r for r in rows if r['corruption']==e['render'] and r['mode'] in ['attribute','relational','multi_target','empty_target']] + assert len(rows)==e['n'],(dataset,model,variant,len(rows),e['n']) + z=describe(rows) + if dataset=='rich': + pairs=collections.defaultdict(list) + for r in rows:pairs[r['pair_id']].append(float(r['iou'])) + assert all(len(v)==2 for v in pairs.values()) + z['PC50']=sum(all(x>=.5 for x in v) for v in pairs.values())/len(pairs) + for k,v in z.items(): + if k in e and v is not None: + err=abs(v-e[k]);maxerr=max(maxerr,err);assert err<1e-10,(dataset,model,variant,k,v,e[k]) + reports.append(dict(dataset=dataset,model=model,variant=e['variant'],split=e.get('split',e.get('render')),**z)) + # Exact primary replay and every sensitivity mean from shipped trace records. + summaries=json.loads((ROOT/'results/r3/review_results.json').read_text()) + for model in ['clipseg','groundedsam']: + with gzip.open(ROOT/'results/r3'/f'{model}_replay.jsonl.gz','rt') as f:rows=[json.loads(s) for s in f] + assert len(rows)==1557 + for e in summaries[model]['sensitivity']: + d=[r['configs'][e['config']]['sfap']['iou']-r['configs'][e['config']]['frozen']['iou'] for r in rows] + assert abs(sum(d)/49492-e['delta'])<1e-12 + assert sum(v< -1e-12 for v in d)==e['harmed'] + report=dict(status='PASS',metric_rows=len(reports),max_absolute_error=maxerr,primary_tables=reports,sensitivity_settings_replayed=22) + out=ROOT/'results/r3/portable_verification.json';out.write_text(json.dumps(report,indent=2)) + print(json.dumps({k:v for k,v in report.items() if k!='primary_tables'},indent=2)) +if __name__=='__main__':main() diff --git a/source/code/verify_rela_metrics.py b/source/code/verify_rela_metrics.py new file mode 100644 index 0000000000000000000000000000000000000000..ffa60c2d41845c4549f92beeaf797b12292443ec --- /dev/null +++ b/source/code/verify_rela_metrics.py @@ -0,0 +1,42 @@ +"""Independent reproduction of the released ReLA evaluator equations.""" +from pathlib import Path +import gzip,json,math +ROOT=Path(__file__).resolve().parents[1] +def official(rows): + si=su=sg=0.;n=ntn=ntok=pos=fe=pr50=0 + for r in rows: + z=r['official480_scores']['frozen'];gt_nt=r['target_count']==0 + pred_nt=bool(z.get('pred_nt',z['empty'])) + n+=1 + if gt_nt: + ntn+=1;ntok+=pred_nt;sg+=float(pred_nt) + if not pred_nt:su+=z['union'] + else: + pos+=1;fe+=pred_nt + i=0 if pred_nt else z['intersection'];u=z['union'] + si+=i;su+=u;sg+=0 if u==0 else i/u;pr50+=(0 if u==0 else i/u)>=.5 + return dict(n=n,gIoU=sg/n,cIoU=si/su,Nacc=ntok/ntn, + positive_mIoU=(sg-(ntok))/pos,false_empty=fe/pos,Pr50=pr50/pos) +def fixtures(): + # (gt_nt,pred_nt,I,U) includes both no-target branches and positive errors. + cases=[(1,1,0,0),(1,0,0,9),(0,0,5,10),(0,1,7,10),(0,0,0,0),(0,0,9,9)] + sg=si=su=0 + for gt,nt,i,u in cases: + if gt:sg+=nt;su+=0 if nt else u + else: + i=0 if nt else i;sg+=0 if u==0 else i/u;si+=i;su+=u + assert math.isclose(sg/6,(1+.5+0+0+1)/6) + assert math.isclose(si/su,14/38) + return {'fixtures':6,'gIoU':sg/6,'cIoU':si/su} +def main(): + p=ROOT/'results/analysis/natural_rela_evaluated.jsonl.gz' + with gzip.open(p,'rt') as f:rows=[json.loads(x) for x in f] + got=official(rows);summary=json.loads((ROOT/'results/analysis/natural_rela.json').read_text()) + ref=next(x for x in summary['tables'] if x['split']=='all' and x['grid']=='official480_scores' and x['variant']=='frozen') + for k in ['gIoU','cIoU','Nacc','positive_mIoU','false_empty','Pr50']: + assert math.isclose(got[k],ref[k],rel_tol=0,abs_tol=1e-12),(k,got[k],ref[k]) + out={'status':'PASS','independent_equation_replay':got,'fixture_check':fixtures(), + 'reference':'ReLA gres_model/evaluation/refer_evaluation.py'} + (ROOT/'results/analysis/rela_metric_verification.json').write_text(json.dumps(out,indent=2)) + print(json.dumps(out)) +if __name__=='__main__':main() diff --git a/source/figures/Fig10_harm_signatures.tex b/source/figures/Fig10_harm_signatures.tex new file mode 100644 index 0000000000000000000000000000000000000000..3377449e2497ff92b85ee30b98a9e9a187eb1661 --- /dev/null +++ b/source/figures/Fig10_harm_signatures.tex @@ -0,0 +1,60 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\node[anchor=west,font=\bfseries\small] at (0,61) {CLIPSeg}; +\begin{axis}[journal,at={(38 mm,0mm)},anchor=south west,width=42mm,height=51mm,xmin=0,xmax=600,ymin=-.6,ymax=5.7,ytick=\empty,xlabel={Expressions},axis lines=left,xtick={0,200,400,600}] +\node[anchor=east,font=\scriptsize] at (axis cs:-12,5) {Any IoU loss}; +\addplot[black!60,line width=.5pt] coordinates {(0,5)(364,5)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(364,5)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:364,5) {364}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,4) {Plural union}; +\addplot[black!60,line width=.5pt] coordinates {(0,4)(339,4)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(339,4)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:339,4) {339}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,3) {Initially correct}; +\addplot[black!60,line width=.5pt] coordinates {(0,3)(242,3)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(242,3)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:242,3) {242}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,2) {Crossed below .5}; +\addplot[black!60,line width=.5pt] coordinates {(0,2)(64,2)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(64,2)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:64,2) {64}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,1) {Geometry sensitive}; +\addplot[black!60,line width=.5pt] coordinates {(0,1)(1,1)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(1,1)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:1,1) {1}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,0) {Size-filter sensitive}; +\addplot[black!60,line width=.5pt] coordinates {(0,0)(77,0)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(77,0)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:77,0) {77}; +\end{axis} +\node[anchor=west,font=\bfseries\small] at (82,61) {Grounded SAM}; +\begin{axis}[journal,at={(120 mm,0mm)},anchor=south west,width=42mm,height=51mm,xmin=0,xmax=600,ymin=-.6,ymax=5.7,ytick=\empty,xlabel={Expressions},axis lines=left,xtick={0,200,400,600}] +\node[anchor=east,font=\scriptsize] at (axis cs:-12,5) {Any IoU loss}; +\addplot[black!60,line width=.5pt] coordinates {(0,5)(497,5)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(497,5)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:497,5) {497}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,4) {Plural union}; +\addplot[black!60,line width=.5pt] coordinates {(0,4)(474,4)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(474,4)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:474,4) {474}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,3) {Initially correct}; +\addplot[black!60,line width=.5pt] coordinates {(0,3)(392,3)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(392,3)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:392,3) {392}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,2) {Crossed below .5}; +\addplot[black!60,line width=.5pt] coordinates {(0,2)(112,2)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(112,2)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:112,2) {112}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,1) {Geometry sensitive}; +\addplot[black!60,line width=.5pt] coordinates {(0,1)(0,1)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(0,1)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:0,1) {0}; +\node[anchor=east,font=\scriptsize] at (axis cs:-12,0) {Size-filter sensitive}; +\addplot[black!60,line width=.5pt] coordinates {(0,0)(175,0)}; +\addplot[black,only marks,mark=*,mark size=2pt] coordinates {(175,0)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:175,0) {175}; +\end{axis} +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig1_framework.tex b/source/figures/Fig1_framework.tex new file mode 100644 index 0000000000000000000000000000000000000000..211fc93ac189aa6b0959eebb0dffc6c7b3111212 --- /dev/null +++ b/source/figures/Fig1_framework.tex @@ -0,0 +1,40 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} + +\begin{tikzpicture}[x=1mm,y=1mm] +\path[use as bounding box] (0,-3) rectangle (164,57); +\node[anchor=west,font=\bfseries\small] at (0,54) {(a) Scope and projection}; +\node[anchor=west,font=\bfseries\small] at (99,54) {(b) Spatial eligibility}; +\node (q) at (4,34) {$I,q$}; +\node[draw,rectangle,minimum width=14mm,minimum height=10mm] (f) at (28,34) {$f_{\theta}$}; +\node (p) at (54,34) {$P_q,P_t,P_a$}; +\node[draw,rectangle,minimum width=15mm,minimum height=10mm] (proj) at (80,34) {$\Pi_r$}; +\draw[link] (q)--(f); +\draw[link] (f)--(p); +\draw[link] (p)--(proj); +\node[font=\small] at (28,43) {$\theta$ fixed}; +\node (guard) at (28,16) {$S(q)\in\{0,1\}$}; +\draw[link] (q.south)|-(guard.west); +\draw[link] (guard.north)--node[right,font=\scriptsize] {$S=1$}(f.south); +\draw[link,dashed] (guard.east)--(80,16)--(proj.south); +\node[font=\scriptsize,fill=white,inner sep=1pt] at (57,16) {fallback $M_q$}; +\node[anchor=west,font=\scriptsize] at (0,0) {$\widehat M=\Pi_r(P_q,P_t,P_a)$ if $S(q)\land V$; otherwise $M_q$.}; +\draw[rule] (95,3)--(95,49); +\draw[->,line width=.5pt] (103,8)--(162,8) node[below] {$x$}; +\draw[->,line width=.5pt] (103,8)--(103,46) node[left] {$y$}; +\fill[black!7] (131,9) rectangle (159,44); +\draw[dashed,muted] (131,8)--(131,46); +\node[anchor=south,font=\scriptsize] at (131,46) {$x_A+\epsilon_g$}; +\draw[fill=black!15,line width=.6pt] (117,25) circle (3.8); +\node at (117,25) {$A$}; +\draw[line width=.6pt] (111,37) ellipse (4 and 2.4); +\node[above] at (111,39) {$C_1$}; +\draw[teal,fill=teal!14,line width=.8pt] (141,32) ellipse (4.5 and 3); +\draw[teal,fill=teal!14,line width=.8pt] (150,18) ellipse (4 and 2.8); +\node[above] at (141,35) {$C_2$}; +\node[above] at (150,21) {$C_3$}; +\draw[link] (121,25)--(136,31); +\node[anchor=north,font=\small] at (132,3) {$\mathcal E_{\rightarrow}=\{C_2,C_3\}$}; +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig2_rich_atlas.tex b/source/figures/Fig2_rich_atlas.tex new file mode 100644 index 0000000000000000000000000000000000000000..7c5d2168182ba72ff5f2b7de16cf586733dda1f6 --- /dev/null +++ b/source/figures/Fig2_rich_atlas.tex @@ -0,0 +1,58 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\path[use as bounding box] (0,-108) rectangle (164,8); + +\fill[teal] (0,0) rectangle (31,-1); +\node[anchor=north,font=\rmfamily\bfseries\fontsize{7.5}{9}\selectfont,text=teal] at (15.5,-2) {ATTRIBUTE}; +\node[anchor=north west,inner sep=0] at (0,-10) {\includegraphics[width=31mm]{assets/atlas_0_0.png}}; +\draw[rule,line width=.3pt] (0,-10) rectangle (31,-41); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (30.5,-40.5) {$|G|=3$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (0,-43) {\textbf{a}\enspace segment all orange circles}; +\node[anchor=north west,inner sep=0] at (0,-59) {\includegraphics[width=31mm]{assets/atlas_1_0.png}}; +\draw[rule,line width=.3pt] (0,-59) rectangle (31,-90); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (30.5,-89.5) {$|G|=1$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (0,-92) {\textbf{f}\enspace segment all green ellipses}; +\fill[violet] (33,0) rectangle (64,-1); +\node[anchor=north,font=\rmfamily\bfseries\fontsize{7.5}{9}\selectfont,text=violet] at (48.5,-2) {RELATION}; +\node[anchor=north west,inner sep=0] at (33,-10) {\includegraphics[width=31mm]{assets/atlas_0_1.png}}; +\draw[rule,line width=.3pt] (33,-10) rectangle (64,-41); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (63.5,-40.5) {$|G|=2$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (33,-43) {\textbf{b}\enspace segment all cyan squares above the brown ring}; +\node[anchor=north west,inner sep=0] at (33,-59) {\includegraphics[width=31mm]{assets/atlas_1_1.png}}; +\draw[rule,line width=.3pt] (33,-59) rectangle (64,-90); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (63.5,-89.5) {$|G|=2$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (33,-92) {\textbf{g}\enspace segment all olive capsules right of the yellow cross}; +\fill[ochre] (66,0) rectangle (97,-1); +\node[anchor=north,font=\rmfamily\bfseries\fontsize{7.5}{9}\selectfont,text=ochre] at (81.5,-2) {TARGET SET}; +\node[anchor=north west,inner sep=0] at (66,-10) {\includegraphics[width=31mm]{assets/atlas_0_2.png}}; +\draw[rule,line width=.3pt] (66,-10) rectangle (97,-41); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (96.5,-40.5) {$|G|=1$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (66,-43) {\textbf{c}\enspace segment the leftmost cyan triangle}; +\node[anchor=north west,inner sep=0] at (66,-59) {\includegraphics[width=31mm]{assets/atlas_1_2.png}}; +\draw[rule,line width=.3pt] (66,-59) rectangle (97,-90); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (96.5,-89.5) {$|G|=3$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (66,-92) {\textbf{h}\enspace segment all cyan hearts}; +\fill[rose] (99,0) rectangle (130,-1); +\node[anchor=north,font=\rmfamily\bfseries\fontsize{7.5}{9}\selectfont,text=rose] at (114.5,-2) {ACTION}; +\node[anchor=north west,inner sep=0] at (99,-10) {\includegraphics[width=31mm]{assets/atlas_0_3.png}}; +\draw[rule,line width=.3pt] (99,-10) rectangle (130,-41); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (129.5,-40.5) {$|G|=0$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (99,-43) {\textbf{d}\enspace do not segment all pink stars}; +\node[anchor=north west,inner sep=0] at (99,-59) {\includegraphics[width=31mm]{assets/atlas_1_3.png}}; +\draw[rule,line width=.3pt] (99,-59) rectangle (130,-90); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (129.5,-89.5) {$|G|=0$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (99,-92) {\textbf{i}\enspace do not segment all yellow diamonds}; +\fill[ink] (132,0) rectangle (163,-1); +\node[anchor=north,font=\rmfamily\bfseries\fontsize{7.5}{9}\selectfont,text=ink] at (147.5,-2) {ABSENCE}; +\node[anchor=north west,inner sep=0] at (132,-10) {\includegraphics[width=31mm]{assets/atlas_0_4.png}}; +\draw[rule,line width=.3pt] (132,-10) rectangle (163,-41); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (162.5,-40.5) {$|G|=0$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (132,-43) {\textbf{e}\enspace segment all red crosses}; +\node[anchor=north west,inner sep=0] at (132,-59) {\includegraphics[width=31mm]{assets/atlas_1_4.png}}; +\draw[rule,line width=.3pt] (132,-59) rectangle (163,-90); +\node[anchor=south east,fill=white,inner sep=.7mm,font=\rmfamily\bfseries\fontsize{7}{8}\selectfont] at (162.5,-89.5) {$|G|=0$}; +\node[anchor=north west,text width=30mm,align=left,font=\rmfamily\fontsize{7.3}{8.8}\selectfont] at (132,-92) {\textbf{j}\enspace segment all red rings}; +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig3_paired_render.tex b/source/figures/Fig3_paired_render.tex new file mode 100644 index 0000000000000000000000000000000000000000..e3eaec49d54a614f32877ecf0e371b345eb42e1b --- /dev/null +++ b/source/figures/Fig3_paired_render.tex @@ -0,0 +1,28 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\path[use as bounding box] (-2,-13) rectangle (164,108); +\node[anchor=south,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont] at (24,100) {Flat surface}; +\node[anchor=south,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont] at (75,100) {Rich surface}; +\node[anchor=south,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont] at (126,100) {Shared target mask}; +\node[anchor=north west,inner sep=0] at (8,98) {\includegraphics[width=31mm]{assets/paired_0_flat.png}}; +\draw[link,draw=muted] (41,82.5)--(54,82.5); +\node[anchor=north west,inner sep=0] at (59,98) {\includegraphics[width=31mm]{assets/paired_0_rich.png}}; +\draw[link,draw=muted] (92,82.5)--(105,82.5); +\node[anchor=north west,inner sep=0] at (110,98) {\includegraphics[width=31mm]{assets/paired_0_relational_0.png}}; +\node[anchor=west,text width=150mm,font=\rmfamily\fontsize{7.6}{9}\selectfont] at (0,65) {\textbf{a}\enspace segment all pink stars left of the red diamond}; +\node[anchor=north west,inner sep=0] at (8,63) {\includegraphics[width=31mm]{assets/paired_1_flat.png}}; +\draw[link,draw=muted] (41,47.5)--(54,47.5); +\node[anchor=north west,inner sep=0] at (59,63) {\includegraphics[width=31mm]{assets/paired_1_rich.png}}; +\draw[link,draw=muted] (92,47.5)--(105,47.5); +\node[anchor=north west,inner sep=0] at (110,63) {\includegraphics[width=31mm]{assets/paired_1_relational_0.png}}; +\node[anchor=west,text width=150mm,font=\rmfamily\fontsize{7.6}{9}\selectfont] at (0,30) {\textbf{b}\enspace segment all olive capsules left of the yellow cross}; +\node[anchor=north west,inner sep=0] at (8,28) {\includegraphics[width=31mm]{assets/paired_2_flat.png}}; +\draw[link,draw=muted] (41,12.5)--(54,12.5); +\node[anchor=north west,inner sep=0] at (59,28) {\includegraphics[width=31mm]{assets/paired_2_rich.png}}; +\draw[link,draw=muted] (92,12.5)--(105,12.5); +\node[anchor=north west,inner sep=0] at (110,28) {\includegraphics[width=31mm]{assets/paired_2_relational_0.png}}; +\node[anchor=west,text width=150mm,font=\rmfamily\fontsize{7.6}{9}\selectfont] at (0,-5) {\textbf{c}\enspace segment all yellow diamonds left of the blue circle}; +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig4_corrected_contrasts.tex b/source/figures/Fig4_corrected_contrasts.tex new file mode 100644 index 0000000000000000000000000000000000000000..454ced19b90ed0674516b27ca599f55daa300748 --- /dev/null +++ b/source/figures/Fig4_corrected_contrasts.tex @@ -0,0 +1,40 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\path[use as bounding box] (0,-14) rectangle (163,78); +\node[anchor=west,font=\rmfamily\bfseries\fontsize{9}{11}\selectfont] at (0,73) {a\enspace CLIPSeg}; +\begin{axis}[journal,at={(20 mm,0mm)},anchor=south west,width=55mm,height=57mm,xmin=-2,xmax=29,ymin=-.5,ymax=2.7,ytick=\empty,axis y line=none,axis x line=bottom,xlabel={Paired-correctness change (pp)},xmajorgrids,xtick={0,10,20}] +\addplot[muted,dashed] coordinates {(0,-.5)(0,2.7)}; +\addplot[teal,line width=2.4pt,opacity=.22] coordinates {(23.197786,2)(27.500000,2)}; +\addplot[teal,mark=*,mark size=2pt,line width=.8pt,error bars/.cd,x dir=both,x explicit] coordinates {(25.312500,2) += (2.187500,0) -= (2.114714,0)}; +\node[anchor=south west,font=\rmfamily\fontsize{7.8}{9}\selectfont] at (axis cs:-1.5,2.18) {CACP $-$ frozen}; +\node[anchor=north,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont,text=teal] at (axis cs:25.312500,1.87) {+25.31}; +\addplot[teal,line width=2.4pt,opacity=.22] coordinates {(6.312500,1)(10.562500,1)}; +\addplot[teal,mark=*,mark size=2pt,line width=.8pt,error bars/.cd,x dir=both,x explicit] coordinates {(8.468750,1) += (2.093750,0) -= (2.156250,0)}; +\node[anchor=south west,font=\rmfamily\fontsize{7.8}{9}\selectfont] at (axis cs:-1.5,1.18) {CACP $-$ global rule}; +\node[anchor=north,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont,text=teal] at (axis cs:8.468750,0.87) {+8.47}; +\addplot[rose,line width=2.4pt,opacity=.22] coordinates {(-0.406250,0)(-0.031250,0)}; +\addplot[rose,mark=*,mark size=2pt,line width=.8pt,error bars/.cd,x dir=both,x explicit] coordinates {(-0.187500,0) += (0.156250,0) -= (0.218750,0)}; +\node[anchor=south west,font=\rmfamily\fontsize{7.8}{9}\selectfont] at (axis cs:-1.5,0.18) {CACP $-$ anchor only}; +\node[anchor=north,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont,text=rose] at (axis cs:-0.187500,-0.13) {-0.19}; +\end{axis} +\node[anchor=west,font=\rmfamily\bfseries\fontsize{9}{11}\selectfont] at (83,73) {b\enspace Grounded SAM}; +\begin{axis}[journal,at={(103 mm,0mm)},anchor=south west,width=55mm,height=57mm,xmin=-2,xmax=29,ymin=-.5,ymax=2.7,ytick=\empty,axis y line=none,axis x line=bottom,xlabel={Paired-correctness change (pp)},xmajorgrids,xtick={0,10,20}] +\addplot[muted,dashed] coordinates {(0,-.5)(0,2.7)}; +\addplot[teal,line width=2.4pt,opacity=.22] coordinates {(16.583073,2)(19.958464,2)}; +\addplot[teal,mark=*,mark size=2pt,line width=.8pt,error bars/.cd,x dir=both,x explicit] coordinates {(18.312500,2) += (1.645964,0) -= (1.729427,0)}; +\node[anchor=south west,font=\rmfamily\fontsize{7.8}{9}\selectfont] at (axis cs:-1.5,2.18) {CACP $-$ frozen}; +\node[anchor=north,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont,text=teal] at (axis cs:18.312500,1.87) {+18.31}; +\addplot[teal,line width=2.4pt,opacity=.22] coordinates {(0.854036,1)(4.208464,1)}; +\addplot[teal,mark=*,mark size=2pt,line width=.8pt,error bars/.cd,x dir=both,x explicit] coordinates {(2.500000,1) += (1.708464,0) -= (1.645964,0)}; +\node[anchor=south west,font=\rmfamily\fontsize{7.8}{9}\selectfont] at (axis cs:-1.5,1.18) {CACP $-$ global rule}; +\node[anchor=north,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont,text=teal] at (axis cs:2.500000,0.87) {+2.50}; +\addplot[rose,line width=2.4pt,opacity=.22] coordinates {(-0.125000,0)(0.000000,0)}; +\addplot[rose,mark=*,mark size=2pt,line width=.8pt,error bars/.cd,x dir=both,x explicit] coordinates {(-0.031250,0) += (0.031250,0) -= (0.093750,0)}; +\node[anchor=south west,font=\rmfamily\fontsize{7.8}{9}\selectfont] at (axis cs:-1.5,0.18) {CACP $-$ anchor only}; +\node[anchor=north,font=\rmfamily\bfseries\fontsize{8}{10}\selectfont,text=rose] at (axis cs:-0.031250,-0.13) {-0.03}; +\end{axis} +\node[anchor=west,text=muted] at (0,-13) {Six contrasts; image-cluster bootstrap with Bonferroni-adjusted intervals}; +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig5_thresholds.tex b/source/figures/Fig5_thresholds.tex new file mode 100644 index 0000000000000000000000000000000000000000..935964bb7d3ac01d1cf5200a2de50c66d8e43863 --- /dev/null +++ b/source/figures/Fig5_thresholds.tex @@ -0,0 +1,28 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\node[anchor=west,font=\rmfamily\bfseries\fontsize{9}{11}\selectfont] at (0,61) {CLIPSeg}; +\begin{axis}[journal,at={(10 mm,0mm)},anchor=south west,width=64mm,height=48mm,xmin=.3,xmax=.9,ymin=0,ymax=80,xlabel={IoU threshold $\tau$},ylabel={Correct (\%)},ymajorgrids,xtick={.3,.5,.7,.9}] +\addplot[muted,dashed,line width=1pt] coordinates {(0.300,26.21875) (0.350,19.18750) (0.400,15.34375) (0.450,13.03125) (0.500,10.40625) (0.550,8.46875) (0.600,6.53125) (0.650,4.87500) (0.700,3.59375) (0.750,2.46875) (0.800,1.50000) (0.850,0.59375) (0.900,0.03125)}; +\addplot[ochre,densely dotted,line width=1pt] coordinates {(0.300,43.40625) (0.350,40.06250) (0.400,36.25000) (0.450,32.46875) (0.500,27.25000) (0.550,23.37500) (0.600,19.21875) (0.650,15.15625) (0.700,11.75000) (0.750,8.59375) (0.800,5.68750) (0.850,2.71875) (0.900,0.46875)}; +\addplot[teal,solid,line width=1pt] coordinates {(0.300,48.84375) (0.350,45.96875) (0.400,42.53125) (0.450,39.50000) (0.500,35.90625) (0.550,32.21875) (0.600,28.06250) (0.650,23.59375) (0.700,19.43750) (0.750,14.18750) (0.800,9.15625) (0.850,4.81250) (0.900,0.09375)}; +\addplot[violet,dashdotted,line width=1pt] coordinates {(0.300,48.65625) (0.350,45.81250) (0.400,42.37500) (0.450,39.34375) (0.500,35.71875) (0.550,32.06250) (0.600,28.00000) (0.650,23.56250) (0.700,19.40625) (0.750,14.15625) (0.800,9.12500) (0.850,4.78125) (0.900,0.09375)}; +\addplot[teal,dashed,line width=.7pt,mark=square,mark size=1.5pt,mark options={fill=white}] coordinates {(0.300,70.31250) (0.350,67.93750) (0.400,65.17188) (0.450,62.34375) (0.500,58.76562) (0.550,54.60938) (0.600,50.01562) (0.650,44.70312) (0.700,39.17188) (0.750,31.90625) (0.800,23.50000) (0.850,14.87500) (0.900,4.03125)}; +\end{axis} +\node[anchor=west,font=\rmfamily\bfseries\fontsize{9}{11}\selectfont] at (82,61) {Grounded SAM}; +\begin{axis}[journal,at={(92 mm,0mm)},anchor=south west,width=64mm,height=48mm,xmin=.3,xmax=.9,ymin=0,ymax=80,xlabel={IoU threshold $\tau$},ylabel={Correct (\%)},ymajorgrids,xtick={.3,.5,.7,.9}] +\addplot[muted,dashed,line width=1pt] coordinates {(0.300,7.09375) (0.350,2.31250) (0.400,0.43750) (0.450,0.06250) (0.500,0.03125) (0.550,0.00000) (0.600,0.00000) (0.650,0.00000) (0.700,0.00000) (0.750,0.00000) (0.800,0.00000) (0.850,0.00000) (0.900,0.00000)}; +\addplot[ochre,densely dotted,line width=1pt] coordinates {(0.300,35.34375) (0.350,32.78125) (0.400,29.03125) (0.450,22.68750) (0.500,15.84375) (0.550,8.53125) (0.600,3.65625) (0.650,1.50000) (0.700,0.75000) (0.750,0.50000) (0.800,0.15625) (0.850,0.06250) (0.900,0.03125)}; +\addplot[teal,solid,line width=1pt] coordinates {(0.300,31.15625) (0.350,28.62500) (0.400,25.93750) (0.450,22.12500) (0.500,18.37500) (0.550,13.28125) (0.600,8.68750) (0.650,5.50000) (0.700,3.53125) (0.750,2.21875) (0.800,1.00000) (0.850,0.31250) (0.900,0.28125)}; +\addplot[violet,dashdotted,line width=1pt] coordinates {(0.300,31.12500) (0.350,28.59375) (0.400,25.90625) (0.450,22.09375) (0.500,18.34375) (0.550,13.25000) (0.600,8.65625) (0.650,5.46875) (0.700,3.53125) (0.750,2.21875) (0.800,1.00000) (0.850,0.31250) (0.900,0.28125)}; +\addplot[teal,dashed,line width=.7pt,mark=square,mark size=1.5pt,mark options={fill=white}] coordinates {(0.300,63.28125) (0.350,59.46875) (0.400,55.00000) (0.450,48.89062) (0.500,42.89062) (0.550,35.26562) (0.600,28.01562) (0.650,22.21875) (0.700,18.95312) (0.750,16.51562) (0.800,14.32812) (0.850,13.09375) (0.900,13.01562)}; +\end{axis} +\draw[black,dashed,line width=.75pt] (0,-17)--(5,-17);\node[anchor=west,font=\scriptsize] at (6,-17) {Frozen}; +\draw[black,densely dotted,line width=.75pt] (32,-17)--(37,-17);\node[anchor=west,font=\scriptsize] at (38,-17) {Global}; +\draw[black,solid,line width=.75pt] (64,-17)--(69,-17);\node[anchor=west,font=\scriptsize] at (70,-17) {Anchor PC}; +\draw[black,dashdotted,line width=.75pt] (100,-17)--(105,-17);\node[anchor=west,font=\scriptsize] at (106,-17) {CACP}; +\draw[black,dashed,line width=.75pt] (130,-17)--(135,-17);\node[anchor=west,font=\scriptsize] at (136,-17) {Anchor Pr}; +\draw[fill=white] (132,-17.6) rectangle (133.2,-16.4); +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig6_natural_effects.tex b/source/figures/Fig6_natural_effects.tex new file mode 100644 index 0000000000000000000000000000000000000000..83ec678b62c5932081c97d17095125356f24fd91 --- /dev/null +++ b/source/figures/Fig6_natural_effects.tex @@ -0,0 +1,30 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\node[anchor=west,font=\bfseries\small] at (0,50) {CLIPSeg}; +\begin{axis}[journal,at={(10 mm,0mm)},anchor=south west,width=64mm,height=40mm,xmin=0,xmax=6,ymin=-.02,ymax=.2,xlabel={Accepted expressions (\%)},ylabel={$\Delta$gIoU (pp)},axis lines=left,xtick={0,1,2,3,4,5,6}] +\addplot[teal,line width=.8pt,mark=*] coordinates {(0.58999,0.006588) (0.77184,0.013447) (3.14596,0.108134) (5.67566,0.117834)}; +\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(0.589994,0.006588) += (0,0.013111) -= (0,0.013460)}; +\node[anchor=north east,font=\scriptsize] at (axis cs:0.60999,0.002588) {R$_s$}; +\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(0.771842,0.013447) += (0,0.013946) -= (0,0.014924)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:0.79184,0.016447) {R}; +\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(3.145963,0.108134) += (0,0.033173) -= (0,0.033344)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:3.16596,0.111134) {S}; +\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(5.675665,0.117834) += (0,0.047349) -= (0,0.047607)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:5.69566,0.120834) {L}; +\end{axis} +\node[anchor=west,font=\bfseries\small] at (82,50) {Grounded SAM}; +\begin{axis}[journal,at={(92 mm,0mm)},anchor=south west,width=64mm,height=40mm,xmin=0,xmax=6,ymin=-.02,ymax=.2,xlabel={Accepted expressions (\%)},ylabel={$\Delta$gIoU (pp)},axis lines=left,xtick={0,1,2,3,4,5,6}] +\addplot[teal,line width=.8pt,mark=*] coordinates {(0.58999,0.013778) (0.77184,0.015319) (3.14596,0.071546) (5.67566,0.029429)}; +\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(0.589994,0.013778) += (0,0.010175) -= (0,0.008849)}; +\node[anchor=north east,font=\scriptsize] at (axis cs:0.60999,0.009778) {R$_s$}; +\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(0.771842,0.015319) += (0,0.011307) -= (0,0.010274)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:0.79184,0.018319) {R}; +\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(3.145963,0.071546) += (0,0.036149) -= (0,0.039415)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:3.16596,0.074546) {S}; +\addplot[teal,error bars/.cd,y dir=both,y explicit] coordinates {(5.675665,0.029429) += (0,0.045644) -= (0,0.050688)}; +\node[anchor=south west,font=\scriptsize] at (axis cs:5.69566,0.032429) {L}; +\end{axis} +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig7_absence_tradeoff.tex b/source/figures/Fig7_absence_tradeoff.tex new file mode 100644 index 0000000000000000000000000000000000000000..b7bd86ba3d972811ec8bd8c5d8d411362fc999ba --- /dev/null +++ b/source/figures/Fig7_absence_tradeoff.tex @@ -0,0 +1,20 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\path[use as bounding box] (0,-14) rectangle (164,67); +\node[anchor=west,font=\rmfamily\bfseries\fontsize{9}{11}\selectfont] at (0,62) {CLIPSeg}; +\begin{axis}[journal,at={(8 mm,0mm)},anchor=south west,width=68mm,height=49mm,xmin=0,xmax=100,ymin=0,ymax=60,xlabel={No-target accuracy (\%)},ylabel={Positive mIoU (\%)},xmajorgrids,ymajorgrids] +\addplot[muted,only marks,mark=*,mark size=2.6pt] coordinates {(71.1580,28.3970)} node[anchor=north east,yshift=-1mm,font=\rmfamily\fontsize{7}{8}\selectfont,text=muted] {Frozen}; +\addplot[rose,only marks,mark=*,mark size=2.6pt] coordinates {(88.0510,22.3760)} node[anchor=south west,yshift=1mm,font=\rmfamily\fontsize{7}{8}\selectfont,text=rose] {Source}; +\addplot[teal,only marks,mark=*,mark size=2.6pt] coordinates {(73.4490,28.4680)} node[anchor=south west,yshift=1mm,font=\rmfamily\fontsize{7}{8}\selectfont,text=teal] {5\% bound}; +\end{axis} +\node[anchor=west,font=\rmfamily\bfseries\fontsize{9}{11}\selectfont] at (82,62) {Grounded SAM}; +\begin{axis}[journal,at={(90 mm,0mm)},anchor=south west,width=68mm,height=49mm,xmin=0,xmax=100,ymin=0,ymax=60,xlabel={No-target accuracy (\%)},ylabel={Positive mIoU (\%)},xmajorgrids,ymajorgrids] +\addplot[muted,only marks,mark=*,mark size=2.6pt] coordinates {(15.3330,53.3080)} node[anchor=north east,yshift=-1mm,font=\rmfamily\fontsize{7}{8}\selectfont,text=muted] {Frozen}; +\addplot[rose,only marks,mark=*,mark size=2.6pt] coordinates {(29.7020,45.1320)} node[anchor=south west,yshift=1mm,font=\rmfamily\fontsize{7}{8}\selectfont,text=rose] {Source}; +\addplot[teal,only marks,mark=*,mark size=2.6pt] coordinates {(16.2150,53.3420)} node[anchor=south west,yshift=1mm,font=\rmfamily\fontsize{7}{8}\selectfont,text=teal] {5\% bound}; +\end{axis} +\node[anchor=west,text=muted,font=\rmfamily\fontsize{7.3}{9}\selectfont] at (0,-12) {Moving right can erase positive masks: source calibration raises N-acc but sharply lowers positive mIoU.}; +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig8_rich_performance.tex b/source/figures/Fig8_rich_performance.tex new file mode 100644 index 0000000000000000000000000000000000000000..c94493cda212b6ea3a2711be68f04b151db76e6d --- /dev/null +++ b/source/figures/Fig8_rich_performance.tex @@ -0,0 +1,28 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\node[anchor=west,font=\bfseries\small] at (0,44) {Flat}; +\begin{axis}[journal,at={(10 mm,0mm)},anchor=south west,width=65mm,height=32mm,xmin=0,xmax=21,ymin=-.5,ymax=1.6,ytick=\empty,xlabel={PC$_{.5}$ (\%)},axis lines=left,xtick={0,5,10,15,20}] +\addplot[black!55,line width=.6pt] coordinates {(0.0833,0)(8.0000,0)}; +\addplot[black,only marks,mark=o,mark size=2.3pt] coordinates {(0.0833,0)}; +\addplot[black,only marks,mark=*,mark size=2.3pt] coordinates {(8.0000,0)}; +\node[anchor=south east,font=\scriptsize] at (axis cs:20.8,0.12) {Grounded SAM}; +\addplot[black!55,line width=.6pt] coordinates {(4.5208,1)(17.4792,1)}; +\addplot[black,only marks,mark=o,mark size=2.3pt] coordinates {(4.5208,1)}; +\addplot[black,only marks,mark=*,mark size=2.3pt] coordinates {(17.4792,1)}; +\node[anchor=south east,font=\scriptsize] at (axis cs:20.8,1.12) {CLIPSeg}; +\end{axis} +\node[anchor=west,font=\bfseries\small] at (82,44) {Rich}; +\begin{axis}[journal,at={(92 mm,0mm)},anchor=south west,width=65mm,height=32mm,xmin=0,xmax=21,ymin=-.5,ymax=1.6,ytick=\empty,xlabel={PC$_{.5}$ (\%)},axis lines=left,xtick={0,5,10,15,20}] +\addplot[black!55,line width=.6pt] coordinates {(0.5000,0)(17.3333,0)}; +\addplot[black,only marks,mark=o,mark size=2.3pt] coordinates {(0.5000,0)}; +\addplot[black,only marks,mark=*,mark size=2.3pt] coordinates {(17.3333,0)}; +\node[anchor=south east,font=\scriptsize] at (axis cs:20.8,0.12) {Grounded SAM}; +\addplot[black!55,line width=.6pt] coordinates {(3.2708,1)(9.0000,1)}; +\addplot[black,only marks,mark=o,mark size=2.3pt] coordinates {(3.2708,1)}; +\addplot[black,only marks,mark=*,mark size=2.3pt] coordinates {(9.0000,1)}; +\node[anchor=south east,font=\scriptsize] at (axis cs:20.8,1.12) {CLIPSeg}; +\end{axis} +\end{tikzpicture} +\end{document} diff --git a/source/figures/Fig9_threshold_robustness.tex b/source/figures/Fig9_threshold_robustness.tex new file mode 100644 index 0000000000000000000000000000000000000000..371ab624775543f5039c7859fb5814e9af108b42 --- /dev/null +++ b/source/figures/Fig9_threshold_robustness.tex @@ -0,0 +1,56 @@ +\documentclass[tikz,border=1.5pt]{standalone} +\input{style} +\begin{document} +\begin{tikzpicture}[x=1mm,y=1mm] +\node[anchor=west,font=\bfseries\small] at (0,76) {CLIPSeg}; +\begin{axis}[journal,at={(26 mm,0mm)},anchor=south west,width=50mm,height=65mm,xmin=0,xmax=.18,ymin=-.7,ymax=10.7,ytick=\empty,xlabel={$\Delta$gIoU (pp)},axis lines=left,xtick={0,.05,.1,.15}] +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,10) {Primary}; +\addplot[black,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.108134,10) += (0.033173,0) -= (0.033344,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,9) {$\delta_a=.02$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.110654,9) += (0.034363,0) -= (0.033817,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,8) {$\delta_a=.10$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.107714,8) += (0.033203,0) -= (0.033546,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,7) {$\delta_t=.02$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.108965,7) += (0.033125,0) -= (0.033342,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,6) {$\delta_t=.10$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.105164,6) += (0.033294,0) -= (0.032671,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,5) {$\epsilon_g=.01$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.108607,5) += (0.033268,0) -= (0.033608,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,4) {$\epsilon_g=.05$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.108899,4) += (0.033126,0) -= (0.033323,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,3) {$a_{\min}\times.5$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.107847,3) += (0.032703,0) -= (0.033137,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,2) {$a_{\min}\times2$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.111440,2) += (0.032679,0) -= (0.032702,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,1) {$t_0-.05$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.106074,1) += (0.031520,0) -= (0.031451,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,0) {$t_0+.05$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.105752,0) += (0.032759,0) -= (0.033400,0)}; +\end{axis} +\node[anchor=west,font=\bfseries\small] at (82,76) {Grounded SAM}; +\begin{axis}[journal,at={(108 mm,0mm)},anchor=south west,width=50mm,height=65mm,xmin=0,xmax=.18,ymin=-.7,ymax=10.7,ytick=\empty,xlabel={$\Delta$gIoU (pp)},axis lines=left,xtick={0,.05,.1,.15}] +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,10) {Primary}; +\addplot[black,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.071546,10) += (0.036149,0) -= (0.039415,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,9) {$\delta_a=.02$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.069326,9) += (0.036746,0) -= (0.039467,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,8) {$\delta_a=.10$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.070596,8) += (0.036522,0) -= (0.038942,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,7) {$\delta_t=.02$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.069838,7) += (0.036347,0) -= (0.038941,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,6) {$\delta_t=.10$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.073230,6) += (0.036431,0) -= (0.038994,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,5) {$\epsilon_g=.01$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.073022,5) += (0.037390,0) -= (0.039008,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,4) {$\epsilon_g=.05$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.070984,4) += (0.036045,0) -= (0.039434,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,3) {$a_{\min}\times.5$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.068147,3) += (0.036245,0) -= (0.038972,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,2) {$a_{\min}\times2$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.076628,2) += (0.036978,0) -= (0.038982,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,1) {$t_0-.05$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.071546,1) += (0.036149,0) -= (0.039415,0)}; +\node[anchor=east,font=\scriptsize] at (axis cs:-.005,0) {$t_0+.05$}; +\addplot[teal,mark=*,mark size=1.5pt,error bars/.cd,x dir=both,x explicit] coordinates {(0.102102,0) += (0.041258,0) -= (0.038146,0)}; +\end{axis} +\end{tikzpicture} +\end{document} diff --git a/source/figures/atlas_manifest.json b/source/figures/atlas_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..2882dad6de228abff0ed92f339289b28abb6dab5 --- /dev/null +++ b/source/figures/atlas_manifest.json @@ -0,0 +1,82 @@ +[ + { + "panel": "a", + "scene_id": "r11_0000", + "family": "attribute", + "query": "segment all orange circles", + "target_count": 3, + "raster": "data/rich/r11_0000/rich.png" + }, + { + "panel": "f", + "scene_id": "r11_0005", + "family": "attribute", + "query": "segment all green ellipses", + "target_count": 1, + "raster": "data/rich/r11_0005/rich.png" + }, + { + "panel": "b", + "scene_id": "r11_0001", + "family": "relational", + "query": "segment all cyan squares above the brown ring", + "target_count": 2, + "raster": "data/rich/r11_0001/rich.png" + }, + { + "panel": "g", + "scene_id": "r11_0006", + "family": "relational", + "query": "segment all olive capsules right of the yellow cross", + "target_count": 2, + "raster": "data/rich/r11_0006/rich.png" + }, + { + "panel": "c", + "scene_id": "r11_0002", + "family": "multi_target", + "query": "segment the leftmost cyan triangle", + "target_count": 1, + "raster": "data/rich/r11_0002/rich.png" + }, + { + "panel": "h", + "scene_id": "r11_0007", + "family": "multi_target", + "query": "segment all cyan hearts", + "target_count": 3, + "raster": "data/rich/r11_0007/rich.png" + }, + { + "panel": "d", + "scene_id": "r11_0003", + "family": "negative_action", + "query": "do not segment all pink stars", + "target_count": 0, + "raster": "data/rich/r11_0003/rich.png" + }, + { + "panel": "i", + "scene_id": "r11_0008", + "family": "negative_action", + "query": "do not segment all yellow diamonds", + "target_count": 0, + "raster": "data/rich/r11_0008/rich.png" + }, + { + "panel": "e", + "scene_id": "r11_0004", + "family": "empty_target", + "query": "segment all red crosses", + "target_count": 0, + "raster": "data/rich/r11_0004/rich.png" + }, + { + "panel": "j", + "scene_id": "r11_0009", + "family": "empty_target", + "query": "segment all red rings", + "target_count": 0, + "raster": "data/rich/r11_0009/rich.png" + } +] \ No newline at end of file diff --git a/source/figures/style.tex b/source/figures/style.tex new file mode 100644 index 0000000000000000000000000000000000000000..0399a315da891248c35e8ab10f738e4f425ceab6 --- /dev/null +++ b/source/figures/style.tex @@ -0,0 +1,35 @@ +\usepackage{tikz,pgfplots,graphicx,amsmath,amssymb} +\usepackage[scaled=.96]{helvet} +% Embed Nimbus Sans outlines for Helvetica-compatible figure lettering. +\ifdefined\pdfmapline +\pdfmapline{=phvr8r NimbusSanL-Regu "TeXBase1Encoding ReEncodeFont" <8r.enc ssub*uhv/m/n}{} +\DeclareFontShape{TS1}{cmr}{m}{sl}{<->ssub*uhv/m/sl}{} +\DeclareFontShape{TS1}{cmr}{bx}{n}{<->ssub*uhv/b/n}{} +\hypersetup{hypertexnames=false} +\graphicspath{{../figures/}} +\newcommand{\SFAP}{\textsc{SFAP}} +\newcommand{\CACP}{\textsc{CACP}} +\newcommand{\ind}{\mathbf{1}} +\begin{document} + +\title[RefSeg-CA]{RefSeg-CA: evaluating and repairing command compliance in generalized referring segmentation} +\author*[1]{\fnm{Ya\u{g}{\i}z Ekrem} \sur{Dalar}}\email{ekrem@ethosoft.org} +\author[1]{\fnm{Nedim Mutlu} \sur{Sezer}} +\author[1]{\fnm{\"Omer Faruk} \sur{Aksoy}} +\author[1]{\fnm{Feyzi Arda} \sur{Saliho\u{g}lu}} +\author[1]{\fnm{Ahmet R{\i}fat} \sur{\"Ozt\"urk}} +\affil[1]{\orgname{Pertevniyal High School},\orgaddress{\city{Istanbul},\country{T\"urkiye}}} + +\abstract{Generalized referring segmentation requires compliance with attributes, relations, multiplicity, action polarity, and empty requests. RefSeg-CA evaluates these requirements using paired correctness and a conservative inference-time rule, scope-filtered anchor projection (SFAP). SFAP uses frozen target/anchor predictions and explicit ambiguity fallback. Evaluation covers 49,492 gRefCOCO expressions and a 1,200-scene matched flat/rich benchmark. The scope guard accepts only 1,557 natural expressions (3.15\%): conditional gIoU gains of 3.44 and 2.27 percentage points for CLIPSeg and Grounded SAM translate to pooled gains of just 0.108 and 0.072 points. Reviewer-requested replay retains positive mean gains across eleven operating points, but broader grammar reduces the Grounded-SAM gain and harmful interventions concentrate in plural unions. A trained ReLA model supplies external performance context, not a paired SFAP comparison. The historical counterfactual branch contributes no benefit and remains an ablation. The principal contribution is auditable evaluation of a narrow repair; unrestricted-language utility and independently annotated parser validity remain unresolved.} +\keywords{Referring segmentation, Generalized segmentation, Command compliance, Compositional evaluation, Output repair, Reliability} +\maketitle + +\section{Introduction}\label{sec:intro} +A referring segmentation model receives an image $I$ and an expression $q$, then returns a pixel mask. In an instruction such as ``segment all red capsules to the left of the blue triangle'', success requires identifying the requested class and attributes, grounding the anchor, applying the relation, and retaining every qualifying instance. A request may also denote no object. Mask overlap alone can hide violations of these requirements. + +Generalized referring expression segmentation (GRES) explicitly includes zero, one, and multiple targets \cite{gres,grex}. RefSeg-CA complements this setting with two questions: does an output comply with a command, and does it remain correct after one requirement changes? The latter is evaluated on paired expressions over the same image. Figure~\ref{fig:framework} shows how these questions connect to the repair studied here. + +This manuscript unifies the complete RefSeg-CA investigation. The development phase introduced five command regimes, paired correctness, a procedural diagnostic suite, and interpretable component rules. Those unpublished experiments identified anchor grounding and empty-output decisions as distinct bottlenecks. The confirmatory phase therefore scales evaluation to every expression in the three official gRefCOCO evaluation splits, introduces a richer nuisance-controlled scene generator, adds a trained ReLA comparator, and replaces the earlier counterfactual repair with the simpler \emph{scope-filtered anchor projection} (\SFAP). The frozen full-query prediction is preserved whenever the language scope or visual decision is uncertain. + +SFAP is the proposed rule throughout this paper. The historical counterfactual anchor-consistent projection (CACP) adds an opposite-relation query; it is retained only to document a negative ablation. Neither method updates learned weights. Fallback limits the domain of intervention, but does not certify that an accepted intervention improves a mask. + +The contributions are: +\begin{itemize} +\item a unified command-compliance framework spanning attribute, relation, target set, action, and absence regimes; +\item a rich paired benchmark with exact instance masks, textured and occluded objects, matched flat/rich renders, five seeds, and 28,800 records per model; +\item \SFAP, a transparent one-to-three-query inference rule whose syntax guard, geometric margins, fallback, and exact pixel changes are audited; +\item full-split natural-image evaluation with expression-weighted, image-cluster uncertainty, multiplicity-adjusted ablations, absence-risk accounting, and explicit cost; and +\item negative evidence: the counterfactual branch adds computation but does not improve the primary controlled endpoint, so it is retained only as an ablation. +\end{itemize} + +\begin{figure*}[!t] +\centering\includegraphics[width=\textwidth]{Fig1_framework.pdf} +\caption{SFAP applies a projection only when text scope $S(q)$ and visual gates $V$ permit it. (a) The original mask $M_q$ remains the fallback; $f_\theta$ has fixed weights. (b) For a right-of relation, only components beyond $x_A+\epsilon_g$ are eligible. Plural commands return their union; singular commands additionally require a score margin. Action prohibition is handled separately.}\label{fig:framework} +\end{figure*} + +\section{Related work} +GRES introduced gRefCOCO and the ReLA baseline for arbitrary target cardinality \cite{gres}; GREx expands generalized referring segmentation, comprehension, and generation \cite{grex}. GSVA uses multimodal language models for generalized segmentation \cite{gsva}, while phrase-instance alignment explicitly connects phrases to candidate instances \cite{phrasealign}. Unlike a trained architecture contribution, SFAP is a diagnostic inference interface applicable to frozen score maps. + +Modular grounding has long separated subject, location, and relationship evidence \cite{mattnet}, and counterfactual resilience has been investigated in textual grounding \cite{fang}. CLIPSeg produces dense masks from prompts \cite{clipseg}; Grounding DINO \cite{dino} and SAM \cite{sam} form a detector-to-mask pipeline. Global-local context and primary-word emphasis are also established zero-shot RIS strategies \cite{glclip,iterprime}. We therefore claim neither decomposition nor anchor reasoning as new in isolation. The contribution is the controlled evaluation, explicit fallback, and evidence about where such repair does and does not help. + +Controlled visual reasoning datasets such as CLEVR-Ref+ diagnose failures that aggregate natural-image scores can conceal \cite{clevrref}. RefSeg-CA uses a deliberately inspectable two-dimensional generator, then tests the same rule on full natural splits. Its optional absence threshold follows fit-then-test risk control \cite{ltt}, using exact binomial bounds \cite{cp}; this controls only the defined additional-abstention event under its sampling assumptions. + +\input{design_comparison} +\section{Task and metrics}\label{sec:metrics} +Let $G\subseteq\Omega$ be the union of all target instances on pixel lattice $\Omega$, and $M$ a prediction. We define +\begin{equation} +J(M,G)=\begin{cases}1,&M=G=\varnothing,\\ |M\cap G|/|M\cup G|,&\text{otherwise}. +\end{cases} +\end{equation} +Generalized IoU (gIoU) averages $J$ across expressions. Cumulative IoU (cIoU) is the ratio of summed intersections to summed unions. Positive mIoU excludes empty targets. No-target accuracy (N-acc) is the fraction of empty targets predicted empty; false-empty rate (FE) is the fraction of positive targets predicted empty. These quantities are reported separately because an aggressive empty-output policy can raise gIoU or N-acc while erasing real targets. + +For paired expressions $q_0,q_1$ on the same image, paired correctness at threshold $\tau$ is +\begin{equation} +\mathrm{PC}_{\tau}=\ind[J(M_0,G_0)\ge\tau]\ind[J(M_1,G_1)\ge\tau]. +\end{equation} +PC requires both endpoints to be correct; it does not reward mask change by itself. PC$_{0.5}$ is primary, while curves from $\tau=.3$ to $.9$ show threshold dependence. Single-expression precision-at-threshold is denoted Pr$_\tau$. + +\section{Evaluation resources}\label{sec:data} +\subsection{Five command regimes} +The original controlled suite defines six paired query families: attribute substitution, relation reversal, target-set change, action negation, empty-target substitution, and paraphrase. The primary family average uses attribute, relation, target set, and absence; the action and paraphrase pairs remain separate diagnostics. This preserves the core design of the earlier rejected manuscript while removing unsupported scale and capacity claims. + +\subsection{Rich paired scenes} +The new generator creates 1,200 scenes across seeds 11, 23, 37, 53, and 71. Each $384\times384$ scene contains 9--13 objects (mean 10.96) drawn from 11 shapes and 10 colors. Objects have random positions, scale, and rotation; visibility is at least 0.70 after partial occlusion. Rich renders add stripes, dots, grids, checks, satin patterns, shadows, and a lightly textured background. Each scene also has a geometry-identical flat render. The query graph and every visible instance mask are shared, isolating the rendering nuisance. + +There are six pairs, two endpoints, two renders, and 1,200 scenes, for 28,800 records per model. Figure~\ref{fig:atlas} shows actual experimental inputs, not diagrammatic reconstructions. Figure~\ref{fig:paired} demonstrates matched render pairs and their common ground truth. + +\begin{figure*}[!t] +\centering\includegraphics[width=\textwidth]{Fig2_rich_atlas.pdf} +\caption{Actual rich benchmark inputs across the five command regimes. Queries and target cardinalities are printed below each image. Raster scenes are generated procedurally; TikZ supplies only the publication layout.}\label{fig:atlas} +\end{figure*} + +\begin{figure*}[!t] +\centering\includegraphics[width=\textwidth]{Fig3_paired_render.pdf} +\caption{Matched flat and rich renders. Geometry, query, visible-instance mask, and occlusion order are identical within each row, so performance differences isolate surface and background complexity.}\label{fig:paired} +\end{figure*} + +\subsection{Full gRefCOCO evaluation} +We use all 49,492 expressions for 15,120 references over 3,000 distinct COCO images in the pinned public gRefCOCO release: 14,229 validation, 19,200 testA, and 16,063 testB expressions. There are 31,466 positive and 18,026 empty-target expressions. The official 480-pixel ReLA mask transformation excludes crowd annotations, matching its released loader; we additionally retain an original-grid diagnostic for the frozen pipelines. The full evaluation images do not overlap the 1,500 natural training images used in the earlier fit/calibration phase. + +\begin{table}[t] +\caption{Confirmatory evaluation scale per model.}\label{tab:scale} +\centering\scriptsize\setlength{\tabcolsep}{2.5pt}\begin{tabular}{lrrr} +\toprule Dataset & Images & Expr. & Records\\\midrule +gRefCOCO val & -- & 14,229 & 14,229\\ +gRefCOCO testA & -- & 19,200 & 19,200\\ +gRefCOCO testB & -- & 16,063 & 16,063\\ +gRefCOCO total & 3,000 & 49,492 & 49,492\\ +Rich suite & 2,400 & -- & 28,800\\\bottomrule +\end{tabular} +\end{table} + +\section{Scope-filtered anchor projection}\label{sec:method} +Let $P_q=f(I,q)$ be a frozen model score map. A deterministic parser extracts target phrase $q_t$, optional anchor phrase $q_a$, relation $r$, plurality, and explicit action polarity. The scope guard rejects unsupported grammar, exact counts from two to ten, nested relative or modifying clauses, conjunctions, and nested relation tokens. Rejection returns the native mask from $P_q$. The guard uses text alone and was frozen before confirmatory predictions. + +Accepted expressions require at most three unique queries: $q$, $q_t$, and $q_a$. Eight-connected components are extracted after each model's fixed native threshold; components smaller than $\max(16,\lfloor0.0002|\Omega|\rfloor)$ pixels are removed consistently. A component $C$ has centroid $(x_C,y_C)$ and mean score $s_C$. An anchor $A$ is admissible only if its confidence exceeds its runner-up by $\delta_a=.05$. For a right relation, candidates satisfy +\begin{equation} +x_C-x_A\ge\epsilon_g,\qquad \epsilon_g=.03, +\end{equation} +with the corresponding sign and coordinate for left, above, and below. A singular result requires a target-component margin of $.05$; plural requests union all eligible components. Empty candidate sets, ambiguous anchors, unsupported scopes, and inadequate margins all return the full-query mask. Explicit action prohibition returns the empty mask and is evaluated outside the primary paired average. + +\begin{algorithm}[t] +\caption{Scope-filtered anchor projection (SFAP)} +\begin{algorithmic}[1] +\Require Image $I$, expression $q$, frozen interface $f$ +\State Obtain native full-query mask $M_q$ +\If{scope guard rejects $q$} \State \Return $M_q$ \EndIf +\State Query target $q_t$ and optional anchor $q_a$ +\State Extract components; verify anchor and target margins +\State Filter targets by predicted relation and $\epsilon_g$ +\If{any decision is unsupported or ambiguous} \State \Return $M_q$ \EndIf +\State \Return eligible union for plural, else top target +\end{algorithmic} +\end{algorithm} + +The earlier counterfactual anchor-consistent projection (CACP) also queried the opposite relation $\bar q$ and ranked target components by $s_i=\bar P_t(C_i)+\lambda[\bar P_q(C_i)-\bar P_{\bar q}(C_i)]$, with a veto when the residual was below $-.05$. Exact cache replay evaluates $\lambda\in\{0,.25,.5,1\}$ and $\epsilon_g\in\{0,.015,.03,.06\}$. Because the branch did not improve the primary comparison, CACP is an ablation rather than the proposed solution. + +\section{Models and statistical protocol}\label{sec:protocol} +CLIPSeg uses the refined RD64 checkpoint and a $.5$ threshold. Grounded SAM combines Grounding DINO-T with SAM ViT-B, $.25$ box and text thresholds, at most 30 boxes, and a $.25$ dense-mask threshold. ReLA uses the authors' released Swin-Tiny checkpoint and official $480\times480$ two-channel and no-target heads. All learned weights are frozen. The ReLA checkpoint loads strictly after removing only an identical non-persistent BERT position buffer; on CPU, its deformable-attention operator uses the repository's mathematically equivalent PyTorch reference path. + +The analysis plan, fixed thresholds, parser, manifests, hashes, and split logic were recorded before confirmatory predictions. We use 2,000 image-cluster bootstrap replicates, stratified by official split for natural data and seed for controlled data. Expressions remain weighted equally while all expressions from an image resample together. Six planned first-phase contrasts receive Bonferroni-adjusted 99.1667\% marginal intervals. Help/harm counts and exact pixel identity accompany mean differences. + +The earlier 122-item parser audit is a machine-assisted diagnostic restricted to previously supported expressions. It cannot estimate recall over unrestricted language. We provide a new stratified human-validation protocol: 200 expressions sampled from each of accepted, legacy-supported/rejected, and outside-grammar strata, with stored inclusion probabilities. Two independent readers with English-language and referring-segmentation expertise should label semantic representability, decomposition correctness, ambiguity, and error type while blinded to acceptance decisions and model scores; disagreements then require adjudication. Weighted acceptance precision/recall, false acceptance/rejection, raw agreement, and Cohen's $\kappa$ can be computed by the supplied scorer. No completed human forms or adjudications have been supplied, so annotator identities, agreement, and parser-accuracy statistics remain unavailable. This is an unresolved validation requirement. + +The coverage and robustness analyses below were specified after the R2 results and reviewer report. They are exploratory diagnostics, not a new primary operating-point selection. Their 2,000-replicate intervals resample complete images and are descriptive, without a multiple-testing superiority claim. + +\section{Results}\label{sec:results} +\subsection{Original controlled phase} +Across 800 clean held-out scenes and 3,200 primary pairs, CACP improved PC$_{.5}$ over frozen output by 25.31 points for CLIPSeg and 18.31 for Grounded SAM. Relative to a global-direction rule, gains were 8.47 and 2.50 points. However, relative to anchor-only repair, CACP changed PC$_{.5}$ by $-0.19$ and $-0.03$ points. The multiplicity-adjusted intervals in Fig.~\ref{fig:contrasts} therefore support predicted anchor geometry, but not the counterfactual addition. + +\begin{figure*}[!t] +\centering\includegraphics[width=\textwidth]{Fig4_corrected_contrasts.pdf} +\caption{First-phase paired-correctness contrasts with image-cluster bootstrap intervals simultaneously adjusted across six planned comparisons. Large gains over frozen/global rules arise before the counterfactual branch; CACP is slightly worse than anchor-only repair.}\label{fig:contrasts} +\end{figure*} + +Exact mask replay reinforces this finding. Among 1,600 clean controlled anchor records, counterfactual CACP changed 18 CLIPSeg masks (0 helpful, 15 harmful, 3 IoU ties) and one Grounded-SAM mask (harmful). Across all 3,660 anchor records per model, only 44 CLIPSeg and one Grounded-SAM masks changed. For controlled plural queries without the veto, $\lambda$ cannot change the union of fixed eligible components; the observed pixel identity follows directly from the algorithm. Varying $\lambda$ did not change PC$_{.5}$ at any tested geometry margin. Geometry sensitivity was modest for CLIPSeg and larger for Grounded SAM, but the preregistered $.03$ margin is retained. + +\begin{figure*}[!t] +\centering\includegraphics[width=\textwidth]{Fig5_thresholds.pdf} +\caption{PC$_\tau$ from $.3$ to $.9$ for the first-phase primary pairs. The curves distinguish strict paired correctness from single-expression Pr$_\tau$.}\label{fig:thresholds} +\end{figure*} + +\subsection{Full natural-image evaluation} +Table~\ref{tab:natural} reports pooled official-grid results. SFAP accepts 1,557 of 49,492 expressions (3.15\%) across 973 images. On all expressions, its gIoU improvement is small but precisely estimated: $+0.00108$ for CLIPSeg (95\% image-cluster CI $[0.00077,0.00140]$) and $+0.00072$ for Grounded SAM ($[0.00035,0.00108]$). On the accepted subset, gains are $+0.0344$ ($[0.0237,0.0447]$) and $+0.0227$ ($[0.0118,0.0331]$). CLIPSeg records 517 helped, 364 harmed, and 676 tied accepted expressions; Grounded SAM records 590, 497, and 470. A positive conditional mean does not imply reliable individual interventions: 23.38\% and 31.92\% of accepted expressions lose IoU. Since the original output is preserved outside the guard, +\begin{equation} +\Delta_{\rm all}=\Pr[S(q)=1]\,\Delta_{\rm accepted}. +\end{equation} +Only 3.15\% of the conditional gain reaches the benchmark mean. Neither this coverage nor this conditional effect is established for unrestricted deployment language. + +\begin{table*}[!t] +\caption{All 49,492 official gRefCOCO evaluation expressions. Values are proportions. Source and constrained rows add the separately fitted empty-output classifier to CACP and illustrate its trade-off.}\label{tab:natural} +\centering\begin{tabular}{llrrrrr} +\toprule Model & Output rule & gIoU & cIoU & positive mIoU & N-acc & FE\\\midrule +CLIPSeg & Frozen & .43972 & .30334 & .28397 & .71158 & .26686\\ +CLIPSeg & SFAP & \textbf{.44080} & \textbf{.30522} & \textbf{.28593} & .71114 & .26286\\ +CLIPSeg & Source absence & .46296 & .27432 & .22376 & .88051 & .56089\\ +CLIPSeg & Constrained 5\% & .44851 & .30477 & .28468 & .73449 & .27833\\\midrule +Grounded SAM & Frozen & .39477 & .37849 & .53308 & .15333 & .00712\\ +Grounded SAM & SFAP & .39548 & \textbf{.37913} & \textbf{.53430} & .15317 & \textbf{.00686}\\ +Grounded SAM & Source absence & .39512 & .35916 & .45132 & .29702 & .20146\\ +Grounded SAM & Constrained 5\% & \textbf{.39820} & .37894 & .53342 & \textbf{.16215} & .00788\\\bottomrule +\end{tabular} +\end{table*} + +The 382 accepted simple relational expressions form a text-selected natural composition subset independent of the scene generator. SFAP gains 1.74 points for CLIPSeg (CI approximately $[0.00,3.50]$) and 1.98 for Grounded SAM ($[0.63,3.44]$). This is descriptive corroboration, not a separately multiplicity-adjusted confirmatory test. + +\begin{figure*}[!t] +\centering\includegraphics[width=\textwidth]{Fig6_natural_effects.pdf} +\caption{Broader scope does not guarantee greater utility. R$_s$: short relations; R: all simple relations; S: primary SFAP; L: legacy grammar. Bars show descriptive image-cluster 95\% intervals. Grounded SAM loses pooled benefit from S to L.}\label{fig:natural-effects} +\end{figure*} + +The absence rows expose a central failure mode. Source calibration raises CLIPSeg N-acc from .712 to .881 and pooled gIoU, yet lowers positive mIoU from .284 to .224 and raises FE from .267 to .561. For Grounded SAM it raises N-acc from .153 to .297 but FE from .007 to .201. Therefore the apparent pooled improvement is not a uniformly better segmenter. Under the specified Bonferroni construction, $n=300$ positive calibration images per stratum yields a 3.01\% zero-error upper bound; nontrivial 1\% and 2.5\% rules are infeasible at this sample size, whereas 5\% and 10\% rules can be active. + +\begin{figure*}[!t] +\centering\includegraphics[width=\textwidth]{Fig7_absence_tradeoff.pdf} +\caption{No-target accuracy versus positive-mask overlap. Source-calibrated decisions move right but also downward; the separately constrained 5\% decision stays close to the native positive-mask quality.}\label{fig:absence} +\end{figure*} + +\subsection{Rich nuisance-controlled benchmark} +Table~\ref{tab:rich} isolates the paired frozen-interface experiment; the native trained model is reported separately below. Together these evaluations contain 86,400 rich-suite records. SFAP raises PC$_{.5}$ over frozen CLIPSeg by 12.96 points on flat scenes and 5.73 on rich scenes; the corresponding Grounded-SAM gains are 7.92 and 16.83 points. The effect therefore survives texture, rotation and partial occlusion, but its magnitude and even the direction of the nuisance shift depend on the frozen interface. + +\begin{table*}[!t] +\caption{Paired SFAP comparisons, with 1,200 scene clusters per render and model and 95\% seed-stratified scene-cluster PC intervals. ReLA is separated in Table~\ref{tab:rela}.}\label{tab:rich} +\centering\begin{tabular}{lllrrrr} +\toprule Model & Render & Rule & PC$_{.5}$ & 95\% CI & gIoU & Pr$_{.5}$\\\midrule +CLIPSeg & Flat & Frozen & .0452 & [.0392,.0519] & .2550 & .2230\\ +CLIPSeg & Flat & SFAP & .1748 & [.1608,.1892] & .3527 & .3902\\ +CLIPSeg & Rich & Frozen & .0327 & [.0273,.0390] & .2286 & .1807\\ +CLIPSeg & Rich & SFAP & .0900 & [.0794,.1015] & .2935 & .2843\\\midrule +Grounded SAM & Flat & Frozen & .0008 & [.0000,.0021] & .1835 & .0389\\ +Grounded SAM & Flat & SFAP & .0800 & [.0710,.0894] & .3315 & .2708\\ +Grounded SAM & Rich & Frozen & .0050 & [.0031,.0071] & .2205 & .1086\\ +Grounded SAM & Rich & SFAP & .1733 & [.1608,.1858] & .4263 & .4456\\\bottomrule + +\end{tabular} +\end{table*} + +\begin{figure*}[!t] +\centering\includegraphics[width=\textwidth]{Fig8_rich_performance.pdf} +\caption{Paired correctness increases under SFAP for both frozen interfaces, but rich rendering changes the gain differently for each model. Open and filled markers indicate native and repaired predictions. This is a within-interface comparison.}\label{fig:rich-results} +\end{figure*} + +\input{review_extensions} + +The official trained ReLA comparator reaches pooled gIoU $.60365$, cIoU $.60413$, positive mIoU $.66799$, N-acc $.49135$, and FE $.01268$ over all 49,492 expressions. Its split gIoU values are $.55756$ (validation), $.65039$ (testA), and $.58861$ (testB). This establishes that the evaluation pipeline includes a substantially stronger generalized model; it does not convert SFAP's small frozen-interface improvement into a leaderboard claim. + +Paired same-GPU timing uses 12 text-selected rich relational images, three balanced-order repetitions, a complete warm-up, and disabled caches. Median end-to-end time per query record is 33.8/78.7/107.9 ms for CLIPSeg frozen/SFAP/CACP and 559/1083/1303 ms for Grounded SAM. SFAP removes one model query relative to CACP and lowers median time by 27\% and 17\%, respectively, although it remains slower than the one-query native output. + +\section{Discussion}\label{sec:discussion} +The cumulative evidence changes the technical conclusion of the earlier manuscript. Component rules and predicted anchors can repair a narrow class of command-compliance failures. Opposite-relation counterfactual scoring, however, is not the source of the gain and occasionally vetoes correct masks. SFAP removes that branch, strengthens text-only scope filtering, and makes the default response to uncertainty conservative: preserve the model's original full-expression output. + +Deployment interpretation has three levels. Conditional effectiveness is positive on the guard-accepted benchmark subset. Benchmark-level benefit is below .11 percentage point because coverage is 3.15\%. Practical applicability to unrestricted user language remains unestablished: both command distribution and semantic acceptance precision may differ. Harm incidence rules out treating acceptance as a safety certificate. The plural-union branch in particular merits independent gating before wider use. + +Limitations are substantive. The procedural suite cannot represent photorealistic semantics, although paired rich/flat renders make texture sensitivity measurable. The syntax guard is not a semantic certificate: examples such as morphology errors and implicit exact counts remain. Connected components can merge touching instances. CLIPSeg and Grounded SAM share broad pretraining sources with many public models, so they are interfaces rather than independent statistical replications. ReLA provides a trained comparator but only one architecture/checkpoint. Foundation-model exposure to evaluation images is not fully known. Finally, the binomial risk statement is conditional on independent calibration observations and the specified additional-abstention event; it does not certify total segmentation reliability or distribution shift. + +Each limitation motivates a concrete next experiment: independently adjudicated accepted/rejected expressions for parser validity; instance-level masks and oracle-anchor substitutions for causal failure attribution; joint proposal, detector, and geometry perturbations for robustness; photorealistic matched scenes for transfer; and several trained checkpoints with a separately preregistered SFAP intervention for architectural generality. These experiments remain unexecuted. + +\section{Conclusion} +RefSeg-CA makes command-compliance failures and intervention costs measurable. SFAP yields positive conditional mean effects, but its 3.15\% natural-language coverage limits benchmark improvement to 0.108/0.072 percentage points, and 364/497 accepted expressions are harmed. Coverage relaxation and failure signatures explain why individual reliability cannot be inferred from a positive mean. Local threshold replay supports the effect's sign; independent human parser validation remains necessary. The evidence supports a narrow diagnostic correction, not a generally reliable unrestricted-language segmentation system. + +\backmatter +\section*{Data and code availability} +The versioned public release is available at \href{https://huggingface.co/datasets/Ethosoft/RefSeg-CA}{Hugging Face: Ethosoft/RefSeg-CA}, with data tag \texttt{r3-data-v1}. It contains all 1,200 procedural scenes in both rendering styles, visible-instance and command masks, exact primary score records, reviewer replay traces, a natural-expression index, and \href{https://huggingface.co/datasets/Ethosoft/RefSeg-CA/tree/main/source}{code, editable figure sources, and the manuscript}. An unauthenticated fresh download reproduced 30 primary table rows and 22 sensitivity settings, with maximum numerical discrepancy below $4\times10^{-15}$. Original natural-image pixels, gRefCOCO expression text, and pretrained weights are reconstructed from the pinned upstream sources; their terms remain unchanged. Large score-map caches are retained separately. A DOI has not been assigned. Independent human annotations are not part of this release. + +\section*{Research and author declarations} +The study uses procedural scenes and existing public benchmarks; no participants were recruited. AI-assisted tools supported software implementation, experiment orchestration, analysis, drafting, and LaTeX preparation. Human authors remain responsible for verification and the final manuscript. Funding, competing interests, author contributions, and final approval must be confirmed by the authors before submission; this draft does not invent those declarations. + +\bibliography{references} +\end{document} diff --git a/source/latex/design_comparison.tex b/source/latex/design_comparison.tex new file mode 100644 index 0000000000000000000000000000000000000000..ffa5efb297bf606adffeb8e92cef18a39982a72d --- /dev/null +++ b/source/latex/design_comparison.tex @@ -0,0 +1,15 @@ +\begin{table*}[tb] +\caption{Architectural differences from modular grounding and trained GRES methods. This is not a shared-training performance comparison. Query counts refer to distinct language inputs, not transformer object slots.}\label{tab:novelty} +\centering\small\setlength{\tabcolsep}{4pt} +\begin{tabular}{p{30mm}p{27mm}p{26mm}p{28mm}p{32mm}} +\toprule Property & MAttNet \cite{mattnet} & ReLA \cite{gres} & InstAlign \cite{phrasealign} & SFAP\\\midrule +Task-specific training & Yes & Yes & Yes & No\\ +Target/anchor structure & Subject, location, relation modules & Region--language attention & Learned phrase--instance alignment & Explicit text decomposition\\ +Relation decision & Learned relational score & Learned dependencies & Learned alignment & Fixed centroid filter\\ +Ambiguity fallback & No SFAP-style fallback & No SFAP-style fallback & No SFAP-style fallback & Original full-query mask\\ +Plurality & Single referent & Generalized mask & Instance aggregation & Component union\\ +Empty targets & No dedicated GRES rule & No-target head & Relevance/head & Native emptiness; action rule\\ +Language queries & One & One & One & One to three\\ +Weight updates & In training & In training & In training & None\\\bottomrule +\end{tabular} +\end{table*} diff --git a/source/latex/references.bib b/source/latex/references.bib new file mode 100644 index 0000000000000000000000000000000000000000..d90eedc0bc04069b559993c5e399d6806dac42db --- /dev/null +++ b/source/latex/references.bib @@ -0,0 +1,88 @@ +@inproceedings{gres, + author={Liu, Chang and Ding, Henghui and Jiang, Xudong}, + title={{GRES}: Generalized Referring Expression Segmentation}, + booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, + year={2023}, url={https://arxiv.org/abs/2306.00968} +} +@article{grex, + author={Ding, Henghui and Liu, Chang and He, Shuting and Jiang, Xudong and Jiang, Yu-Gang}, + title={{GREx}: Generalized Referring Expression Segmentation, Comprehension, and Generation}, + journal={International Journal of Computer Vision}, volume={134}, + year={2026}, pages={79}, + doi={10.1007/s11263-026-02729-y}, url={https://doi.org/10.1007/s11263-026-02729-y} +} +@inproceedings{gsva, + author={Xia, Zhuofan and Han, Dongchen and Han, Yizeng and Pan, Xuran and Song, Shiji and Huang, Gao}, + title={{GSVA}: Generalized Segmentation via Multimodal Large Language Models}, + booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, + year={2024}, url={https://arxiv.org/abs/2312.10103} +} +@inproceedings{phrasealign, + author={Nguyen, E-Ro and Le, Hieu and Samaras, Dimitris and Ryoo, Michael S.}, + title={Phrase-Instance Alignment for Generalized Referring Segmentation}, + booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops}, + year={2026}, url={https://eronguyen.me/InstAlign/} +} +@inproceedings{mattnet, + author={Yu, Licheng and Lin, Zhe and Shen, Xiaohui and Yang, Jimei and Lu, Xin and Bansal, Mohit and Berg, Tamara L.}, + title={{MAttNet}: Modular Attention Network for Referring Expression Comprehension}, + booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition}, + year={2018}, url={https://arxiv.org/abs/1801.08186} +} +@inproceedings{fang, + author={Fang, Zhiyuan and Kong, Shu and Fowlkes, Charless and Yang, Yezhou}, + title={Modularized Textual Grounding for Counterfactual Resilience}, + booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, + year={2019}, url={https://arxiv.org/abs/1904.03589} +} +@inproceedings{clipseg, + author={L{\"u}ddecke, Timo and Ecker, Alexander S.}, + title={Image Segmentation Using Text and Image Prompts}, + booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, + year={2022}, url={https://arxiv.org/abs/2112.10003} +} +@inproceedings{dino, + author={Liu, Shilong and Zeng, Zhaoyang and Ren, Tianhe and Li, Feng and Zhang, Hao and Yang, Jie and Jiang, Qing and Li, Chunyuan and Yang, Jianwei and Su, Hang and Zhu, Jun and Zhang, Lei}, + title={Grounding {DINO}: Marrying {DINO} with Grounded Pre-Training for Open-Set Object Detection}, + booktitle={Computer Vision -- ECCV 2024}, series={Lecture Notes in Computer Science}, + volume={15105}, pages={38--55}, year={2024}, + doi={10.1007/978-3-031-72970-6\_3} +} +@inproceedings{sam, + author={Kirillov, Alexander and Mintun, Eric and Ravi, Nikhila and Mao, Hanzi and Rolland, Chloe and Gustafson, Laura and Xiao, Tete and Whitehead, Spencer and Berg, Alexander C. and Lo, Wan-Yen and Doll{\'a}r, Piotr and Girshick, Ross}, + title={Segment Anything}, + booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision}, + year={2023}, url={https://arxiv.org/abs/2304.02643} +} +@inproceedings{glclip, + author={Yu, Seonghoon and Seo, Paul Hongsuck and Son, Jeany}, + title={Zero-shot Referring Image Segmentation with Global-Local Context Features}, + booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, + year={2023}, url={https://arxiv.org/abs/2303.17811} +} +@article{iterprime, + author={Wang, Yuji and Ni, Jingchen and Liu, Yong and Yuan, Chun and Tang, Yansong}, + title={Zero-shot Referring Image Segmentation with Iterative {Grad-CAM} Refinement and Primary Word Emphasis}, + journal={Proceedings of the AAAI Conference on Artificial Intelligence}, + year={2025}, volume={39}, number={8}, pages={8159--8168}, + doi={10.1609/aaai.v39i8.32880}, url={https://ojs.aaai.org/index.php/AAAI/article/view/32880} +} +@inproceedings{clevrref, + author={Liu, Runtao and Liu, Chenxi and Bai, Yutong and Yuille, Alan}, + title={{CLEVR-Ref+}: Diagnosing Visual Reasoning with Referring Expressions}, + booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, + year={2019}, url={https://arxiv.org/abs/1901.00850} +} +@article{ltt, + author={Angelopoulos, Anastasios N. and Bates, Stephen and Cand{\`e}s, Emmanuel J. and Jordan, Michael I. and Lei, Lihua}, + title={Learn then Test: Calibrating Predictive Algorithms to Achieve Risk Control}, + journal={The Annals of Applied Statistics}, volume={19}, number={2}, + year={2025}, doi={10.1214/24-AOAS1998}, + url={https://doi.org/10.1214/24-AOAS1998} +} +@article{cp, + author={Clopper, C. J. and Pearson, E. S.}, + title={The use of confidence or fiducial limits illustrated in the case of the binomial}, + journal={Biometrika}, year={1934}, volume={26}, number={4}, pages={404--413}, + doi={10.1093/biomet/26.4.404} +} diff --git a/source/latex/review_extensions.tex b/source/latex/review_extensions.tex new file mode 100644 index 0000000000000000000000000000000000000000..1c783957cc5960270aef2f764771b96c8c92f1c7 --- /dev/null +++ b/source/latex/review_extensions.tex @@ -0,0 +1,53 @@ +\subsection{Coverage--performance trade-off}\label{sec:coverage} +We apply four nested text-only guards to identical cached anchor-only predictions: short simple relations (target and anchor at most three tokens), all simple relations, the primary scope, and the legacy supported grammar. Coverage is 292, 382, 1,557, and 2,809 expressions, respectively. Table~\ref{tab:coverage} reports exact help/harm counts. Relaxing the primary guard raises CLIPSeg's pooled gain only from .108 to .118 points while almost doubling harms (364 to 722). For Grounded SAM, the same relaxation lowers gain from .072 to .029 points and raises harms from 497 to 936. Restricting to simple relations produces only 10 harmed expressions per model but reaches less than .8\% coverage. Broader parsing is therefore not intrinsically more useful. + +\begin{table*}[tb] +\caption{Coverage and performance under nested guards. $\Delta$ values are gIoU percentage points; H+/H-/= denote helped, harmed, and tied among accepted expressions.}\label{tab:coverage} +\centering\small\begin{tabular}{llrrrrrr} +\toprule Model & Guard & Accepted (\%) & $\Delta_{\rm all}$ & $\Delta_{\rm accepted}$ & H+ & H- & =\\\midrule +CLIPSeg & Short relations & 292 (0.59) & .0066 & 1.12 & 23 & 10 & 259\\ +CLIPSeg & Relations & 382 (0.77) & .0134 & 1.74 & 33 & 10 & 339\\ +CLIPSeg & Primary & 1,557 (3.15) & .1081 & 3.44 & 517 & 364 & 676\\ +CLIPSeg & Legacy & 2,809 (5.68) & .1178 & 2.08 & 871 & 722 & 1,216\\\midrule +Grounded SAM & Short relations & 292 (0.59) & .0138 & 2.34 & 16 & 7 & 269\\ +Grounded SAM & Relations & 382 (0.77) & .0153 & 1.98 & 19 & 10 & 353\\ +Grounded SAM & Primary & 1,557 (3.15) & .0715 & 2.27 & 590 & 497 & 470\\ +Grounded SAM & Legacy & 2,809 (5.68) & .0294 & .52 & 962 & 936 & 911\\\bottomrule +\end{tabular} +\end{table*} + +\subsection{Harmful intervention signatures}\label{sec:harm} +The independently implemented primary replay exactly matches archived official-grid IoUs (maximum difference zero). Of 364 CLIPSeg harms, 339 occur on the plural-union branch, 15 on extreme-position selection, and 10 on anchor projection. Grounded SAM has 474 plural-union, 13 extreme-position, and 10 anchor-projection harms among 497 total. Thus 93.1\% and 95.4\% of observed harms arise without anchor filtering. Anchor-based repair alone is an incomplete description of the operational risk. + +Scope acceptance and actual intervention are distinct: 950 CLIPSeg and 1,185 Grounded-SAM masks change, of which 38.3\% and 41.9\% lose IoU. Among harmed outputs, 242 and 392 native masks already have IoU at least .5; 64 and 112 fall below .5 after intervention. Conditional mean IoU losses are .120 and .153. No positive-target harm is caused by returning an empty mask. Changes to component-size filtering alter 77 and 175 harmed outputs; geometry perturbations alter only one and zero. These sensitivities identify where outputs move, not which error caused the movement. + +\begin{figure*}[tb] +\centering\includegraphics[width=\textwidth]{Fig10_harm_signatures.pdf} +\caption{Harm concentrates in plural unions and can damage already-correct predictions. Rows overlap and are not causal categories. Initially correct means native IoU $\ge .5$ among harmed cases; crossed below .5 is its failure subset. Sensitivity means a changed mask under either tested perturbation.}\label{fig:harm} +\end{figure*} + +The failure protocol separates six potential causes: incorrect anchor grounding, target decomposition, merged components, relation boundaries, singular/plural selection, and modification of an already-correct original mask. Only the last category and operational sensitivities are fully measurable from the present reference masks. Anchor identity, linguistic correctness, and component-to-instance correspondence require image-aware adjudication. The supplied 120-case harm forms remain unlabeled; automated signatures are not verified causal labels. + +\subsection{Operating-point robustness}\label{sec:robustness} +We replay all 1,557 accepted expressions for eleven one-factor-at-a-time settings: anchor and target margins $.02,.05,.10$; geometry $.01,.03,.05$; component-area threshold multiplied by $.5,1,2$; and dense-map threshold $t_0-.05,t_0,t_0+.05$, where $t_0=.5$ for CLIPSeg and $.25$ for Grounded SAM. Each repair is paired with native output using the same threshold and size filter. Rejected expressions contribute zero paired difference. Detector box/text thresholds and learned weights remain fixed. + +\begin{figure*}[tb] +\centering\includegraphics[width=\textwidth]{Fig9_threshold_robustness.pdf} +\caption{SFAP's mean paired effect stays positive at all eleven operating points. Points and descriptive 95\% image-cluster intervals use matched native output. They do not establish equivalence between settings or joint robustness outside this local grid.}\label{fig:robustness} +\end{figure*} + +Pooled gains span $[.1052,.1114]$ percentage points for CLIPSeg and $[.0681,.1021]$ for Grounded SAM. The mean effect's sign is stable over this grid. Grounded SAM's higher dense threshold changes the magnitude appreciably, so this is not threshold independence. We retain the original primary setting. Joint perturbations, detector thresholds, and distribution shifts remain untested. + +\subsection{Trained-model context}\label{sec:rela} +The paired question above is whether SFAP improves a fixed interface. A separate question is the absolute performance of a task-trained generalized model. ReLA is included only for the latter (Table~\ref{tab:rela}); no ReLA+SFAP result is claimed. All weights are fixed during evaluation, but ReLA has GRES training and a native no-target head, so absolute rankings do not identify an SFAP treatment effect. + +\begin{table}[tb] +\caption{Native trained ReLA Swin-Tiny context; no SFAP comparison is made.}\label{tab:rela} +\centering\small\setlength{\tabcolsep}{4pt} +\begin{tabular}{lrrr} +\toprule Evaluation & gIoU & cIoU & PC$_{.5}$\\\midrule +gRefCOCO pooled & .6036 & .6041 & --\\ +Flat synthetic & .2535 & -- & .0585\\ +Rich synthetic & .3012 & -- & .0740\\\bottomrule +\end{tabular} +\end{table} diff --git a/source/legacy_project/code/analyze.py b/source/legacy_project/code/analyze.py new file mode 100644 index 0000000000000000000000000000000000000000..109d809f4d739730cf50b23cbf1f274267276142 --- /dev/null +++ b/source/legacy_project/code/analyze.py @@ -0,0 +1,165 @@ +"""Image-paired summaries and calibration with explicit finite-sample limits. + +The bound concerns ADDITIONAL false abstention from an already nonempty CACP +mask. It does not bound total false-empty errors and does not survive arbitrary +train-to-test distribution shift. All tested thresholds share a Bonferroni bound. +""" +from pathlib import Path +import argparse,json,collections,csv,gzip,hashlib +import numpy as np +from scipy.optimize import minimize +from scipy.special import expit +from scipy.stats import beta +ROOT=Path(__file__).resolve().parents[1];OUT=ROOT/'results/analysis' +SEEDS=[11,23,37];GRID=np.r_[np.arange(.025,1.001,.025),1.001] +FAMILY_SIZE=40*2*3*2 # thresholds x positive strata x fits x backbones + +def fit_logistic(rows,seed): + x=np.array([r['features'] for r in rows]);y=np.array([r['target_count']==0 for r in rows],float) + rng=np.random.RandomState(seed);idx=np.concatenate([rng.choice(np.flatnonzero(y==v),int((y==v).sum()),replace=True) for v in [0,1]]) + x=x[idx];y=y[idx];mu=x.mean(0);sd=x.std(0);sd[sd<1e-8]=1.;z=np.c_[(x-mu)/sd,np.ones(len(x))] + w=np.where(y==1,.5/max((y==1).mean(),1e-6),.5/max((y==0).mean(),1e-6)) + def objective(b): + v=z@b;loss=np.mean(w*(np.logaddexp(0,v)-y*v))+.01*np.dot(b[:-1],b[:-1]) + grad=z.T@(w*(expit(v)-y))/len(y);grad[:-1]+=.02*b[:-1] + return loss,grad + opt=minimize(objective,np.zeros(z.shape[1]),jac=True,method='L-BFGS-B',options={'maxiter':1000,'ftol':1e-12}) + if not opt.success:raise RuntimeError('Logistic fit failed: '+opt.message) + return dict(mean=mu.tolist(),std=sd.tolist(),coef=opt.x.tolist(),n=len(y),seed=seed,objective=float(opt.fun)) + +def probability(rows,fit): + x=np.array([r['features'] for r in rows]);return expit(np.c_[(x-np.array(fit['mean']))/np.array(fit['std']),np.ones(len(x))]@np.array(fit['coef'])) + +def cp_upper(k,n,alpha): + if n==0:return 1. + return 1. if k==n else float(beta.ppf(1-alpha,k+1,n-k)) + +def operating_table(rows,fit): + iid_images=len({r['scene_id'] for r in rows})==len(rows) + p=probability(rows,fit);y=np.array([r['target_count']==0 for r in rows]);base=np.array([r['scores']['cacp']['empty'] for r in rows]);counts=np.array([r['target_count'] for r in rows]);out=[] + for t in GRID: + reject=p>=t;empty=base|reject;additional=reject&~base;groups={} + for name,sel in [('one',counts==1),('multi',counts>1)]: + n=int(sel.sum());k=int((additional&sel).sum()) + groups[name]={'n':n,'k':k,'upper':(0. if t>1 else cp_upper(k,n,.05/FAMILY_SIZE)) if iid_images else None} + acc0=float(empty[y].mean()) if y.any() else 0.;far=float(empty[~y].mean()) if (~y).any() else 0. + out.append({'threshold':float(t),'no_target_accuracy':acc0,'false_empty':far,'additional_false_abstention':float(additional[~y].mean()),'balanced_accuracy':.5*(acc0+1-far),'groups':groups,'worst_upper':max(g['upper'] for g in groups.values()) if iid_images else None}) + return out + +def add_calibration(rows): + params={};curve=[] + for seed in SEEDS: + for domain in ['controlled','natural']: + train=[r for r in rows if r['domain']==domain and r['split']=='fit' and r['mode']!='action'] + cal=[r for r in rows if r['domain']==domain and r['split']=='cal' and r['mode']!='action'] + fit=fit_logistic(train,seed);table=operating_table(cal,fit) + uncon=max(table,key=lambda x:(x['balanced_accuracy'],x['threshold'])) + variants={('source_unconstrained' if domain=='controlled' else 'target_unconstrained'):uncon} + if domain=='natural': + for eps in [.01,.025,.05,.10]: + allowed=[x for x in table if x['worst_upper']<=eps] + variants[f'constrained_{eps:g}']=max(allowed,key=lambda x:(x['no_target_accuracy'],-x['additional_false_abstention'],x['threshold'])) + curve.extend(dict(seed=seed,**x) for x in table) + scores=probability(rows,fit) + for variant,point in variants.items(): + name=f'{variant}_s{seed}';t=point['threshold'];params[name]={'fit':fit,'operating_point':point,'calibration_domain':domain} + for r,pr in zip(rows,scores): + base=r['scores']['cacp'];reject=bool(pr>=t) + # Explicit action semantics are already handled by CACP. + val=dict(base) + if reject:val.update(iou=1. if r['target_count']==0 else 0.,intersection=0,union=base['gt_pixels'],pred_pixels=0,empty=True) + val['additional_abstention']=reject and not base['empty'];r['scores'][name]=val + if domain=='natural' and seed==11:r['absence_probability']=float(pr) + return params,curve + +def cluster_ci(values,keys,strata=None,reps=2000): + vals=np.asarray(values,float);groups=collections.defaultdict(list) + for i,k in enumerate(keys):groups[k].append(i) + ids=list(groups);arr=np.array([vals[groups[k]].mean(0) for k in ids]) + if strata is None:labels=np.zeros(len(ids),int) + else:labels=np.array([str(strata[groups[k][0]]) for k in ids]) + rng=np.random.RandomState(20260906);boot=np.zeros((reps,)+arr.shape[1:]);n=0 + for label in sorted(set(labels)): + a=arr[labels==label];draw=rng.randint(0,len(a),size=(reps,len(a)));boot+=a[draw].sum(axis=1);n+=len(a) + boot/=n + return arr.mean(axis=0),np.quantile(boot,.025,axis=0),np.quantile(boot,.975,axis=0),len(arr) + +def summarize(rows,methods): + summaries=[] + def emit(name,rr,metric,threshold=.5): + if not rr:return + if metric=='pc': + pairs=collections.defaultdict(list) + for r in rr:pairs[r['pair_id']].append(r) + assert all(len(x)==2 for x in pairs.values()) + data=[];keys=[];strata=[] + for pp in pairs.values(): + data.append([float(all(r['scores'][m]['iou']>=threshold for r in pp)) for m in methods]);keys.append(pp[0]['scene_id']);strata.append(pp[0]['seed']) + else: + data=[];keys=[];strata=[] + for r in rr: + data.append([float(r['scores'][m]['empty']) if metric in ['no_target_accuracy','false_empty'] else float(r['scores'][m].get('additional_abstention',False)) if metric=='additional_false_abstention' else r['scores'][m]['iou'] for m in methods]);keys.append(r['scene_id']);strata.append(r['seed'] if r['domain']=='controlled' else r['split']+'_'+r['mode']) + data=np.array(data);mean,lo,hi,n=cluster_ci(data,keys,strata) + delta,dlo,dhi,_=cluster_ci(data-data[:,[methods.index('frozen')]],keys,strata) + for i,m in enumerate(methods):summaries.append(dict(population=name,metric=('PC50' if threshold==.5 else 'PC70') if metric=='pc' else metric,method=m,estimate=float(mean[i]),lo=float(lo[i]),hi=float(hi[i]),gain=float(delta[i]),gain_lo=float(dlo[i]),gain_hi=float(dhi[i]),clusters=n,units=len(data))) + controlled=[r for r in rows if r['domain']=='controlled' and r['split']=='test'] + clean=[r for r in controlled if r['corruption']=='clean'] + primary=[r for r in clean if r['mode'] in ['attribute','relation','quantifier','absence']] + emit('controlled_primary',primary,'pc');emit('controlled_primary',primary,'pc',.7) + for family in ['attribute','relation','quantifier','action','absence','paraphrase']: + emit('family_'+family,[r for r in clean if r['mode']==family],'pc') + for template in ['seen','held']:emit('template_'+template,[r for r in primary if r['template']==template],'pc') + stress_ids={r['scene_id'] for r in controlled if r['corruption']!='clean'} + for corruption in ['clean','blur','noise','dim']: + rr=[r for r in controlled if r['corruption']==corruption and r['scene_id'] in stress_ids and r['mode'] in ['attribute','relation','quantifier','absence']] + emit('stress_'+corruption,rr,'pc') + for name,rr in [('controlled_clean',clean),('natural_test',[r for r in rows if r['domain']=='natural' and r['split'] in ['testA','testB']])]+[(s,[r for r in rows if r['domain']=='natural' and r['split']==s]) for s in ['val','testA','testB']]: + emit(name,rr,'gIoU');emit(name,[r for r in rr if r['target_count']>0],'positive_mIoU');emit(name,[r for r in rr if r['target_count']==0],'no_target_accuracy');emit(name,[r for r in rr if r['target_count']>0],'false_empty');emit(name,[r for r in rr if r['target_count']>0],'additional_false_abstention') + for mode in ['zero','one','multi']: + rr=[r for r in rows if r['domain']=='natural' and r['split'] in ['testA','testB'] and r['mode']==mode] + emit('natural_'+mode,rr,'gIoU') + return summaries + +def main(): + a=argparse.ArgumentParser();a.add_argument('--model',choices=['clipseg','groundedsam']);args=a.parse_args();OUT.mkdir(parents=True,exist_ok=True) + models=[args.model] if args.model else ['clipseg','groundedsam'];allsummary=[];allparam={};allcurves=[];metadata={} + main_methods=['frozen','action_only','largest','global_direction','target_only','anchor_nogate','anchor_gate','counterfactual_nogate','cacp','source_unconstrained_s11','target_unconstrained_s11','constrained_0.05_s11'] + for model in models: + shards=2 if model=='clipseg' else 8 + files=sorted((ROOT/'results').glob(model+f'_main_*of{shards}.jsonl'));metas=sorted((ROOT/'results').glob(model+f'_main_*of{shards}_meta.json')) + if len(files)!=shards or len(metas)!=shards:raise RuntimeError('Model runs are incomplete: '+model) + rows=[json.loads(l) for f in files for l in f.read_text().splitlines()];expected=json.loads((ROOT/'data/dataset_summary.json').read_text())['records'] + assert len(rows)==expected and len({r['id'] for r in rows})==expected + assert all(json.loads(m.read_text())['status']=='COMPLETE' for m in metas) + params,curves=add_calibration(rows);allparam[model]=params;allcurves.extend(dict(model=model,**c) for c in curves) + ss=summarize(rows,main_methods);allsummary.extend(dict(model=model,**s) for s in ss) + # Seed/tolerance sensitivity is a separate table, not independent evidence. + sensitivity=[] + for seed in SEEDS: + for eps in [.01,.025,.05,.1]: + name=f'constrained_{eps:g}_s{seed}' + for pop,sel in [('natural_test',[r for r in rows if r['domain']=='natural' and r['split'] in ['testA','testB']]),('val',[r for r in rows if r['domain']=='natural' and r['split']=='val'])]: + pos=[r for r in sel if r['target_count']>0];neg=[r for r in sel if r['target_count']==0] + sensitivity.append(dict(model=model,seed=seed,tolerance=eps,population=pop,threshold=params[name]['operating_point']['threshold'],cal_upper=params[name]['operating_point']['worst_upper'],positive_iou=float(np.mean([r['scores'][name]['iou'] for r in pos])),no_target_accuracy=float(np.mean([r['scores'][name]['empty'] for r in neg])),false_empty=float(np.mean([r['scores'][name]['empty'] for r in pos])),additional_false_abstention=float(np.mean([r['scores'][name]['additional_abstention'] for r in pos])))) + (OUT/f'{model}_sensitivity.json').write_text(json.dumps(sensitivity,indent=2)) + # Oracle anchor substitution: diagnostic, not a guaranteed upper bound. + oracle_rows=[r for r in rows if r['domain']=='controlled'];os=summarize(oracle_rows,['frozen','cacp','oracle_anchor']) + (OUT/f'{model}_oracle.json').write_text(json.dumps(os,indent=2)) + reasons=collections.Counter(r['flags']['reason'] for r in rows if r['split'] in ['test','testA','testB','val']);bydomain={} + for domain in ['controlled','natural']: + rr=[r for r in rows if r['domain']==domain and r['split'] in ['test','testA','testB','val'] and r['corruption']=='clean'] + bydomain[domain]={'n':len(rr),'supported':sum(r['flags']['supported'] for r in rr),'changed':sum(r['flags']['changed'] for r in rr),'harm_iou':sum(r['scores']['cacp']['iou']r['scores']['frozen']['iou'] for r in rr)} + metadata[model]={'runs':[json.loads(m.read_text()) for m in metas],'reason_counts':dict(reasons),'coverage':bydomain} + with gzip.open(OUT/f'{model}_evaluated.jsonl.gz','wt') as f: + for r in rows:f.write(json.dumps(r)+'\n') + # Test trade-off curves use the fixed calibration-trained score; no tuning. + test=[r for r in rows if r['domain']=='natural' and r['split'] in ['testA','testB']] + curve_test=operating_table(test,params['target_unconstrained_s11']['fit']) + (OUT/f'{model}_test_curve.json').write_text(json.dumps(curve_test,indent=2)) + print('ANALYZED',model,flush=True) + (OUT/'summary.json').write_text(json.dumps(allsummary,indent=2)) + with (OUT/'summary.csv').open('w') as f: + writer=csv.DictWriter(f,fieldnames=list(allsummary[0]));writer.writeheader();writer.writerows(allsummary) + (OUT/'calibration.json').write_text(json.dumps(allparam,indent=2));(OUT/'calibration_curves.json').write_text(json.dumps(allcurves,indent=2));(OUT/'run_summary.json').write_text(json.dumps(metadata,indent=2)) + (OUT/'statistical_notes.json').write_text(json.dumps({'bootstrap_replicates':2000,'interval':'95% percentile, paired image/scene clusters, stratified by seed or official split and target stratum','multiplicity':'Confidence intervals are descriptive and unadjusted; ablations are not independent replications','calibration_family_size':FAMILY_SIZE,'calibration_alpha':.05,'calibration_scope':'Simultaneous stratum-wise Clopper-Pearson bounds for additional false abstention under independent, identically distributed Bernoulli sampling within each stratum; official train/test shifts are evaluated empirically, not guaranteed','minimum_n_zero_failures':{str(eps):int(np.ceil(np.log(.05/FAMILY_SIZE)/np.log(1-eps))) for eps in [.01,.025,.05,.1]}},indent=2)) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/build_latex.py b/source/legacy_project/code/build_latex.py new file mode 100644 index 0000000000000000000000000000000000000000..17ef3bf488cb09f9a39003ec343e028210872292 --- /dev/null +++ b/source/legacy_project/code/build_latex.py @@ -0,0 +1,43 @@ +"""Compile vector figures and the unmodified Springer Nature journal template. +Uses an existing TeX installation; the fallback only creates a local format/map +when a workspace runtime has TeX sources but no configured format database. +""" +from pathlib import Path +import os,subprocess,argparse +ROOT=Path(__file__).resolve().parents[1] +def environment(): + env=os.environ.copy() + if subprocess.run(['kpsewhich','article.cls'],capture_output=True,text=True).stdout.strip():return env + tex=Path('/usr/share/texlive/texmf-dist') + if not (tex/'tex/latex/base/article.cls').exists():raise RuntimeError('Install a standard TeX Live distribution with pgfplots, standalone and Springer dependencies') + aux=ROOT/'build/texlocal';aux.mkdir(parents=True,exist_ok=True) + env.update(TEXMF=str(tex),TEXMFVAR=str(aux),TEXMFCONFIG=str(aux),TEXFORMATS=str(aux)+'//:',TEXFONTMAPS=str(aux)+'//:'+str(tex/'fonts/map')+'//:') + if not (aux/'pdflatex.fmt').exists(): + run(['pdftex','-ini','-interaction=batchmode','-halt-on-error','-jobname=pdflatex','-progname=pdflatex','-output-directory='+str(aux),'-etex','pdflatex.ini'],ROOT,env) + maps=tex/'fonts/map/dvips';files=list((maps/'amsfonts').glob('*.map'))+[maps/'helvetic/uhv.map',maps/'psnfss/psnfss.map'] + (aux/'pdftex.map').write_text('\n'.join(f.read_text() for f in files)) + return env +def run(cmd,cwd,env): + p=subprocess.run(cmd,cwd=cwd,env=env,capture_output=True,text=True) + if p.returncode: + print(p.stdout[-4000:]);print(p.stderr[-1000:]) + if cmd[0]=='pdflatex': + log=Path(cwd)/Path(cmd[-1]).with_suffix('.log') + if log.exists():print(log.read_text(errors='replace')[-5000:]) + raise RuntimeError('Command failed: '+' '.join(cmd)) + return p +def main(): + a=argparse.ArgumentParser();a.add_argument('--figures-only',action='store_true');a.add_argument('--manuscript-only',action='store_true');args=a.parse_args();env=environment() + for f in ([] if args.manuscript_only else sorted((ROOT/'figures').glob('Fig*.tex'))): + run(['pdflatex','-interaction=batchmode','-halt-on-error',f.name],f.parent,env);print('Compiled',f.name,flush=True) + # Standard EPS export retains vector paths and embedded outlines. + eps=f.with_suffix('.eps') + try:run(['pdftops','-eps',str(f.with_suffix('.pdf')),str(eps)],ROOT,env) + except (FileNotFoundError,RuntimeError):pass + main=ROOT/'latex/RefSeg_CACP_MVA.tex' + if not args.figures_only and main.exists(): + run(['pdflatex','-interaction=batchmode','-halt-on-error',main.name],main.parent,env) + run(['bibtex',main.stem],main.parent,env) + for _ in range(2):run(['pdflatex','-interaction=batchmode','-halt-on-error',main.name],main.parent,env) + print('Compiled manuscript',flush=True) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/export_qualitative.py b/source/legacy_project/code/export_qualitative.py new file mode 100644 index 0000000000000000000000000000000000000000..f3df4553269095b533f1cf1f92d3f63b27c62646 --- /dev/null +++ b/source/legacy_project/code/export_qualitative.py @@ -0,0 +1,37 @@ +"""Reconstruct extremal controlled examples from stored predictions, without GPU. + +Selection is deliberately outcome-based and is disclosed in the figure caption. +It never alters evaluation metrics. RGB and masks are actual experiment files. +""" +from pathlib import Path +import json,gzip,zipfile,io,base64 +import numpy as np +from PIL import Image +from repair import repaired_maps,score_mask +ROOT=Path(__file__).resolve().parents[1] +def main(): + manifest={r['id']:r for r in map(json.loads,(ROOT/'data/manifest.jsonl').read_text().splitlines())} + out=ROOT/'results/qualitative';out.mkdir(parents=True,exist_ok=True);examples=[] + for model in ['clipseg','groundedsam']: + rows=[json.loads(l) for l in gzip.open(ROOT/'results/analysis'/(model+'_evaluated.jsonl.gz'),'rt')] + candidates=[r for r in rows if r['domain']=='controlled' and r['split']=='test' and r['corruption']=='clean' and r['mode']=='relation' and r['target_count']>0] + candidates.sort(key=lambda r:(r['scores']['cacp']['iou']-r['scores']['frozen']['iou'],r['id'])) + for kind,r in [('gain',candidates[-1]),('loss',candidates[0])]: + d=manifest[r['id']];z=np.load(ROOT/r['cache_path']);maps={q:z['p%d'%i].astype(np.float32) for i,q in enumerate(z['texts'].tolist())} + pred,flags=repaired_maps(d['query'],maps,.5 if model=='clipseg' else .25) + gt=np.asarray(Image.open(ROOT/d['gt_path']))>0;key=model+'_'+kind;assets={} + for method in ['frozen','cacp']: + assert score_mask(pred[method],gt)==r['scores'][method] + Image.open(ROOT/d['image_path']).save(out/(key+'_rgb.png'));assets['rgb']=key+'_rgb.png' + for method,mask in [('gt',gt),('frozen',pred['frozen']),('cacp',pred['cacp'])]: + Image.fromarray(mask.astype(np.uint8)*255).save(out/(key+'_'+method+'.png'));assets[method]=key+'_'+method+'.png' + examples.append(dict(model=model,kind=kind,record=d,flags=flags,scores={m:r['scores'][m] for m in ['frozen','cacp']},assets=assets)) + meta={'selection':'Largest gain and largest loss in mask IoU per pipeline among clean, held-out, positive controlled relation records; ties broken by record ID. These are extremal illustrations, not representative samples.','examples':examples} + (out/'qualitative_examples.json').write_text(json.dumps(meta,indent=2)) + buffer=io.BytesIO() + with zipfile.ZipFile(buffer,'w',zipfile.ZIP_DEFLATED) as z: + for f in sorted(out.iterdir()): + if f.suffix in ['.json','.png']:z.write(f,f.name) + (ROOT/'results/qualitative_bundle.b64').write_text(base64.b64encode(buffer.getvalue()).decode()) + print(json.dumps({'bytes':len(buffer.getvalue()),'examples':[(r['model'],r['kind'],r['record']['id'],r['scores']['frozen']['iou'],r['scores']['cacp']['iou']) for r in examples]})) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/infer.py b/source/legacy_project/code/infer.py new file mode 100644 index 0000000000000000000000000000000000000000..9036ac451263c65e1388cf74550f4b12b67341f2 --- /dev/null +++ b/source/legacy_project/code/infer.py @@ -0,0 +1,131 @@ +"""Frozen GPU inference, image-level caching, and label-isolated CACP evaluation.""" +from pathlib import Path +import argparse,json,time,os,hashlib,collections,platform +import numpy as np +from PIL import Image +from repair import query_plan,repaired_maps,visual_features,score_mask +ROOT=Path(__file__).resolve().parents[1] + +class ClipSeg: + threshold=.5 + def __init__(self): + import torch + from transformers import CLIPSegProcessor,CLIPSegForImageSegmentation + self.torch=torch;path=ROOT/'assets/models/clipseg' + self.processor=CLIPSegProcessor.from_pretrained(str(path),local_files_only=True) + self.model=CLIPSegForImageSegmentation.from_pretrained(str(path),local_files_only=True).eval().cuda() + def predict(self,image,texts): + t=self.torch;out={} + with t.inference_mode(): + for k in range(0,len(texts),8): + batch=texts[k:k+8] + inputs=self.processor(text=batch,images=[image]*len(batch),padding=True,truncation=True,return_tensors='pt').to('cuda') + logits=self.model(**inputs,interpolate_pos_encoding=True).logits + if logits.ndim==2:logits=logits[None] + probs=t.nn.functional.interpolate(logits[:,None],size=(image.height,image.width),mode='bilinear',align_corners=False)[:,0].sigmoid() + for q,p in zip(batch,probs):out[q]=p.float().cpu().numpy() + return out,{'language_queries':len(texts),'sam_boxes':0,'truncated_boxes':0} + +class GroundedSam: + threshold=.25 + def __init__(self): + import torch + from transformers import AutoProcessor,AutoModelForZeroShotObjectDetection,SamProcessor,SamModel,GroundingDinoConfig + self.torch=torch;p=ROOT/'assets/models/groundingdino';s=ROOT/'assets/models/sam' + self.processor=AutoProcessor.from_pretrained(str(p),local_files_only=True) + cfg=GroundingDinoConfig.from_pretrained(str(p),local_files_only=True);cfg.disable_custom_kernels=True + self.model=AutoModelForZeroShotObjectDetection.from_pretrained(str(p),config=cfg,local_files_only=True).eval().cuda() + self.samproc=SamProcessor.from_pretrained(str(s),local_files_only=True) + self.sam=SamModel.from_pretrained(str(s),local_files_only=True).eval().cuda() + def predict(self,image,texts): + t=self.torch;allboxes=[];detections={};truncated=0;out={} + with t.inference_mode(): + for k in range(0,len(texts),2): + batch=texts[k:k+2] + inputs=self.processor(images=[image]*len(batch),text=[q.strip(' .')+'.' for q in batch],padding=True,truncation=True,return_tensors='pt').to('cuda') + pred=self.model(**inputs) + det=self.processor.post_process_grounded_object_detection(pred,inputs.input_ids,box_threshold=.25,text_threshold=.25,target_sizes=[(image.height,image.width)]*len(batch)) + for q,d in zip(batch,det): + order=d['scores'].argsort(descending=True);truncated+=max(0,len(order)-30);order=order[:30] + entries=[] + for box,score in zip(d['boxes'][order].cpu().tolist(),d['scores'][order].cpu().tolist()): + box=[max(0,min(v,image.width if j%2==0 else image.height)) for j,v in enumerate(box)] + if box[2]-box[0]<1 or box[3]-box[1]<1:continue + key=tuple(round(v,1) for v in box) + if key not in allboxes:allboxes.append(key) + entries.append((allboxes.index(key),float(score))) + detections[q]=entries + masks=[] + if allboxes: + ip=self.samproc(images=image,return_tensors='pt').to('cuda') + emb=self.sam.get_image_embeddings(ip.pixel_values) + for k in range(0,len(allboxes),16): + ins=self.samproc(images=image,input_boxes=[[list(b) for b in allboxes[k:k+16]]],return_tensors='pt').to('cuda') + pr=self.sam(image_embeddings=emb,input_boxes=ins.input_boxes,multimask_output=True) + chosen=pr.iou_scores[0].argmax(dim=-1) + low=pr.pred_masks[:,t.arange(len(chosen),device='cuda'),chosen,: ,:][:,:,None] + # Official postprocessing restores original image resolution. + full=self.samproc.image_processor.post_process_masks(low,ins.original_sizes,ins.reshaped_input_sizes,binarize=True)[0] + masks.extend(full[:,0].cpu().numpy().astype(bool)) + for q in texts: + p=np.zeros((image.height,image.width),np.float32) + for idx,score in detections[q]:p=np.maximum(p,masks[idx]*score) + out[q]=p + return out,{'language_queries':len(texts),'sam_boxes':len(allboxes),'truncated_boxes':truncated} + +def main(): + p=argparse.ArgumentParser();p.add_argument('--model',choices=['clipseg','groundedsam'],required=True) + p.add_argument('--shard',type=int,default=0);p.add_argument('--shards',type=int,default=1) + p.add_argument('--pilot',action='store_true');p.add_argument('--limit',type=int,default=0) + args=p.parse_args();print('IMPORT_START',vars(args),flush=True) + import torch,transformers + torch.set_num_threads(4);torch.manual_seed(20260906);np.random.seed(20260906) + assert torch.cuda.is_available(),'GPU required: submit with Slurm' + records=[json.loads(x) for x in (ROOT/'data/manifest.jsonl').read_text().splitlines()] + if args.pilot: + # Infrastructure / implementation checks see fit examples only. + records=[r for r in records if r['split']=='fit'] + records=[r for r in records if (r['domain']=='controlled' and r['scene_id']=='s11_0000') or r['domain']=='natural'] + groups=collections.defaultdict(list) + for r in records:groups[r['image_path']].append(r) + selected=sorted(groups) + if args.pilot:selected=selected[:1]+[x for x in selected if '/natural/' in x][:3] + elif args.limit:selected=selected[:args.limit] + selected=selected[args.shard::args.shards] + suffix=f'{args.model}_{"pilot" if args.pilot else "main"}_{args.shard}of{args.shards}' + cache=ROOT/'cache'/args.model;cache.mkdir(parents=True,exist_ok=True) + resultfile=ROOT/'results'/f'{suffix}.jsonl';timingfile=ROOT/'results'/f'{suffix}_timings.jsonl' + engine=ClipSeg() if args.model=='clipseg' else GroundedSam() + print('MODEL_READY',torch.cuda.get_device_name(0),'images',len(selected),flush=True) + started=time.time();nrecord=0;queries=0;gpu_seconds=0;hits=0 + with resultfile.open('w') as result,timingfile.open('w') as timing: + for index,ipath in enumerate(selected): + group=groups[ipath];texts=[] + for r in group: + _,qs=query_plan(r['query']);texts.extend(qs) + texts=list(dict.fromkeys(texts));image=Image.open(ROOT/ipath).convert('RGB') + digest=hashlib.sha256((ipath+'\n'+'\n'.join(texts)).encode()).hexdigest()[:24];cp=cache/(digest+'.npz') + elapsed=0.;stats={'language_queries':0,'sam_boxes':0,'truncated_boxes':0} + if cp.exists(): + z=np.load(cp);assert z['texts'].tolist()==texts;maps={q:z[f'p{i}'].astype(np.float32) for i,q in enumerate(texts)};hits+=1 + else: + torch.cuda.synchronize();t0=time.perf_counter();maps,stats=engine.predict(image,texts);torch.cuda.synchronize();elapsed=time.perf_counter()-t0 + # Quantize identically before both scoring and storage, so replay + # and initial evaluation see exactly the same cached scores. + maps={q:maps[q].astype(np.float16).astype(np.float32) for q in texts} + assert all(np.isfinite(v).all() and v.min()>=0 and v.max()<=1 for v in maps.values()) + tmp=cp.with_suffix('.partial.npz');np.savez_compressed(tmp,texts=np.array(texts),**{f'p{i}':maps[q].astype(np.float16) for i,q in enumerate(texts)});tmp.replace(cp) + gpu_seconds+=elapsed;queries+=stats['language_queries'] + # Ground truth is loaded only after all model predictions are fixed. + for r in group: + gt=np.asarray(Image.open(ROOT/r['gt_path']))>0 + oracle=np.asarray(Image.open(ROOT/r['anchor_gt_path']))>0 if 'anchor_gt_path' in r else None + preds,flags=repaired_maps(r['query'],maps,engine.threshold,oracle_anchor=oracle) + row={k:r[k] for k in ['id','scene_id','domain','split','mode','pair_id','endpoint','target_count','seed','template','corruption']} + row.update(model=args.model,flags=flags,features=visual_features(maps[query_plan(r['query'])[0].original],preds['cacp'],engine.threshold),scores={m:score_mask(pred,gt) for m,pred in preds.items()},cache_path=str(cp.relative_to(ROOT)),query_count=len(query_plan(r['query'])[1])) + result.write(json.dumps(row)+'\n');nrecord+=1 + timing.write(json.dumps(dict(image_path=ipath,records=len(group),requested_unique_queries=len(texts),cached=elapsed==0,seconds=elapsed,**stats))+'\n');result.flush();timing.flush() + if index%20==0:print(json.dumps({'image':index+1,'of':len(selected),'records':nrecord,'new_queries':queries,'forward_seconds':round(gpu_seconds,2),'wall_seconds':round(time.time()-started,2)}),flush=True) + meta={'status':'COMPLETE','model':args.model,'images':len(selected),'records':nrecord,'unique_queries_executed':queries,'cache_hits':hits,'forward_seconds':gpu_seconds,'wall_seconds':time.time()-started,'gpu':torch.cuda.get_device_name(0),'torch':torch.__version__,'transformers':transformers.__version__,'numpy':np.__version__,'python':platform.python_version(),'slurm_job_id':os.getenv('SLURM_JOB_ID'),'node':os.getenv('SLURMD_NODENAME'),'args':vars(args),'manifest_sha256':hashlib.sha256((ROOT/'data/manifest.jsonl').read_bytes()).hexdigest(),'code_sha256':{x:hashlib.sha256((ROOT/'code'/x).read_bytes()).hexdigest() for x in ['infer.py','repair.py']}} + (ROOT/'results'/f'{suffix}_meta.json').write_text(json.dumps(meta,indent=2));print(json.dumps(meta,indent=2),flush=True) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/make_figures.py b/source/legacy_project/code/make_figures.py new file mode 100644 index 0000000000000000000000000000000000000000..fee50fe9bd0a542182b3058d7a7176d034ef3a1b --- /dev/null +++ b/source/legacy_project/code/make_figures.py @@ -0,0 +1,140 @@ +"""Publication vector figures. TikZ/PGFPlots only; RGB comes from experiment files.""" +from pathlib import Path +import json,math +import numpy as np +from PIL import Image +ROOT=Path(__file__).resolve().parents[1];F=ROOT/'figures';A=ROOT/'results/analysis' +def esc(s):return str(s).replace('_',r'\_').replace('%',r'\%').replace('&',r'\&') +def write(name,body): + (F/(name+'.tex')).write_text(r'\documentclass[tikz,border=1.5pt]{standalone}'+'\n'+r'\input{style}'+'\n'+r'\begin{document}'+'\n'+body+'\n'+r'\end{document}'+'\n') + +def synthetic(): + examples=json.loads((F/'synthetic_examples.json').read_text());lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]',r'\path[use as bounding box] (-6,-2) rectangle (155,133);'] + for row,y,label in [(0,99,'RGB input'),(1,58,'Left of anchor'),(2,17,'Right of anchor')]: + lines.append(r'\node[rotate=90,anchor=south,font=\sffamily\fontsize{8}{10}\selectfont] at (-0.2,%s) {%s};'%(y,label)) + for i,e in enumerate(examples): + x=19+39*i;obj=e['scene']['objects'][0];anc=e['scene']['objects'][3];sid=e['scene']['scene_id'] + target=obj['color']+' '+obj['shape']+'s';anchor=anc['color']+' '+anc['shape'] + lines.append(r'\node[align=center,text width=36mm,font=\sffamily\fontsize{8}{10}\selectfont] at (%s,125) {\textbf{%s}\quad %s\\anchor: %s};'%(x,chr(97+i),target,anchor)) + for row,key,y in [(0,'rgb',99),(1,'left_gt',58),(2,'right_gt',17)]: + original=F/e['assets'][key]['file'];im=Image.open(original) + if row: + mask=np.asarray(im)>0;out=np.zeros((*mask.shape,3),np.uint8);out[:]=(247,248,249);out[mask]=(20,125,131);im=Image.fromarray(out) + # Lossless nearest-neighbour display enlargement preserves the exact + # 320-pixel experiment lattice; it does not create new observations. + display=F/'assets'/(sid+'_'+key+'_display.png');im.resize((1920,1920),Image.Resampling.NEAREST).save(display) + lines.append(r'\node[inner sep=0] at (%s,%s) {\includegraphics[width=35mm]{assets/%s}};'%(x,y,display.name)) + lines.append(r'\draw[rule,line width=.35pt] (%s,%s) rectangle (%s,%s);'%(x-17.5,y-17.5,x+17.5,y+17.5)) + if row: + count=e['records'][row-1]['target_count'] + lines.append(r'\node[anchor=south east,fill=white,inner sep=1mm,font=\sffamily\fontsize{8}{9}\selectfont] at (%s,%s) {$n=%s$};'%(x+17,y-17,count)) + lines.append(r'\node[font=\ttfamily\fontsize{8}{10}\selectfont,text=muted] at (%s,78) {%s};'%(x,esc(sid))) + lines.append(r'\end{tikzpicture}');write('Fig2_synthetic', '\n'.join(lines)) + +def budget(): + alpha=.05/480;lines=[r'\begin{tikzpicture}',r'\begin{axis}[journal,width=56mm,height=36mm,xmode=log,xmin=50,xmax=2000,ymin=0,ymax=20,xlabel={Positive calibration images\\per stratum},xlabel style={align=center},ylabel={Zero-error upper bound (\%)},xtick={50,300,2000},xticklabels={50,300,2000},ytick={0,5,10,15,20},ymajorgrids]'] + coords=' '.join('(%s,%.6f)'%(n,100*(1-alpha**(1/n))) for n in np.geomspace(50,2000,150)) + lines.append(r'\addplot[teal,line width=1pt,no marks] coordinates {'+coords+'};') + for t,c in [(1,'muted'),(2.5,'muted'),(5,'ochre'),(10,'muted')]:lines.append(r'\addplot[%s,dashed,line width=.4pt] coordinates {(50,%s) (2000,%s)};'%(c,t,t)) + risk=100*(1-alpha**(1/300));lines.append(r'\addplot[only marks,mark=*,mark size=2.3pt,teal] coordinates {(300,%.6f)};'%risk) + lines.append(r'\node[anchor=south west,align=left,font=\sffamily\fontsize{8}{10}\selectfont] at (axis cs:310,%.6f) {$n=300$\\%.2f\%%};'%(risk,risk)) + lines.extend([r'\end{axis}',r'\end{tikzpicture}']);write('Fig8_calibration_budget','\n'.join(lines)) + +def get(summary,model,pop,metric,method): + return next(r for r in summary if (r['model'],r['population'],r['metric'],r['method'])==(model,pop,metric,method)) + +def forest(summary): + methods=[('global_direction','Global direction'),('target_only','Target phrases'),('anchor_gate','Anchor + gates'),('cacp','CACP'),('source_unconstrained_s11','Source abstention'),('constrained_0.05_s11','CACP + constrained')] + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for i,(_,label) in enumerate(methods):lines.append(r'\node[anchor=east] at (37,%.4f) {%s};'%((i+.6)/6.2*50,label)) + for panel,(model,name) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + xpos=40+panel*62;lines.append(r'\node[anchor=west,font=\sffamily\bfseries\fontsize{8}{10}\selectfont] at (%s,58) {%s\quad %s};'%(xpos,chr(97+panel),name)) + vals=[get(summary,model,'controlled_primary','PC50',m) for m,_ in methods] + xmin=min(-2,min(r['gain_lo']*100 for r in vals)-3);xmax=max(2,max(r['gain_hi']*100 for r in vals)+3) + labels=','.join('{'+label+'}' for _,label in methods) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=48mm,height=50mm,xmin=%.3f,xmax=%.3f,ymin=-.6,ymax=5.6,ytick=\empty,xlabel={PC50 gain (percentage points)},xmajorgrids,axis y line=none,axis x line=bottom]'%(xpos,xmin,xmax)) + lines.append(r'\addplot[muted,dashed,line width=.5pt] coordinates {(0,-.6) (0,5.6)};') + for i,r in enumerate(vals): + color='teal' if i==3 else 'ochre' if i==5 else 'ink' + lines.append(r'\addplot[%s,line width=.8pt,mark=*,mark size=1.6pt,error bars/.cd,x dir=both,x explicit] coordinates {(%.6f,%s) += (%.6f,0) -= (%.6f,0)};'%(color,r['gain']*100,i,(r['gain_hi']-r['gain'])*100,(r['gain']-r['gain_lo'])*100)) + lines.append(r'\end{axis}') + lines.append(r'\end{tikzpicture}');write('Fig3_paired_gain','\n'.join(lines)) + +def capability(summary): + methods=[('frozen','Frozen'),('action_only','Action only'),('global_direction','Global direction'),('target_only','Target phrases'),('anchor_nogate','Anchor, no gates'),('anchor_gate','Anchor + gates'),('counterfactual_nogate','CF, no gates'),('cacp','CACP')] + families=['attribute','relation','quantifier','action','absence','paraphrase'];lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for panel,(model,name) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + dy=-panel*70;lines.append(r'\node[anchor=west,font=\sffamily\bfseries\fontsize{8}{10}\selectfont] at (0,%s) {%s\quad %s};'%(dy+7,chr(97+panel),name)) + for j,f in enumerate(families):lines.append(r'\node[font=\sffamily\fontsize{8}{10}\selectfont] at (%s,%s) {%s};'%(47+j*19,dy+7,f.title())) + for i,(m,label) in enumerate(methods): + y=dy-i*7 + lines.append(r'\node[anchor=east,font=\sffamily\fontsize{8}{10}\selectfont] at (36,%s) {%s};'%(y,label)) + for j,f in enumerate(families): + val=get(summary,model,'family_'+f,'PC50',m)['estimate']*100;x=47+j*19;strength=round(4+.74*val);text='white' if strength>55 else 'ink' + lines.append(r'\fill[teal!%s!white] (%s,%s) rectangle (%s,%s);'%(strength,x-9.1,y-3.2,x+9.1,y+3.2)) + lines.append(r'\node[text=%s,font=\sffamily\fontsize{8}{10}\selectfont] at (%s,%s) {%.1f};'%(text,x,y,val)) + lines.append(r'\end{tikzpicture}');write('Fig4_capability','\n'.join(lines)) + +def tradeoff(summary): + params=json.loads((A/'calibration.json').read_text());lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for panel,(model,name) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + curves=json.loads((A/(model+'_test_curve.json')).read_text());dx=panel*83 + lines.append(r'\node[anchor=west,font=\sffamily\bfseries\fontsize{8}{10}\selectfont] at (%s,110) {%s\quad %s};'%(dx,chr(97+panel),name)) + coords=' '.join('(%.6f,%.6f)'%(r['additional_false_abstention']*100,r['no_target_accuracy']*100) for r in curves) + for row in [0,1]: + ymin,ymax=(65,85) if model=='clipseg' else (25,65) + if row==1:ymin,ymax=0,100 + lines.append(r'\begin{axis}[journal,at={(%s mm,%s mm)},anchor=south west,width=61mm,height=35mm,xmin=0,xmax=%s,ymin=%s,ymax=%s,xlabel={Additional false abstention (\%%)},ylabel={No-target accuracy (\%%)},clip=true,xmajorgrids,ymajorgrids]'%(dx+13,60 if row==0 else 0,5 if row==0 else 100,ymin,ymax)) + lines.append(r'\addplot[ink,line width=.8pt] coordinates {'+coords+'};') + for method,color,mark in [('target_unconstrained_s11','rose','triangle*'),('constrained_0.05_s11','teal','*')]: + x=get(summary,model,'natural_test','additional_false_abstention',method)['estimate']*100;y=get(summary,model,'natural_test','no_target_accuracy',method)['estimate']*100 + lines.append(r'\addplot[only marks,%s,mark=%s,mark size=2.4pt] coordinates {(%.6f,%.6f)};'%(color,mark,x,y)) + lines.append(r'\end{axis}') + lines.append(r'\node[anchor=west,font=\sffamily\fontsize{8}{10}\selectfont,text=muted] at (%s,100) {Low-intervention detail};'%(dx+13)) + lines.append(r'\node[anchor=west,font=\sffamily\fontsize{8}{10}\selectfont,text=muted] at (%s,40) {Full threshold sweep};'%(dx+13)) + lines.append(r'\node[anchor=west,font=\sffamily\fontsize{8}{10}\selectfont] at (12,-15) {\textcolor{rose}{$\blacktriangle$} Unconstrained\qquad\textcolor{teal}{$\bullet$} Calibration constraint, $\epsilon=5\%$};') + lines.append(r'\end{tikzpicture}');write('Fig5_abstention','\n'.join(lines)) + +def stress(summary): + lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for panel,(model,name) in enumerate([('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')]): + dx=panel*82;lines.append(r'\node[anchor=west,font=\sffamily\bfseries\fontsize{8}{10}\selectfont] at (%s,65) {%s\quad %s};'%(dx,chr(97+panel),name)) + lines.append(r'\begin{axis}[journal,at={(%s mm,0mm)},anchor=south west,width=62mm,height=48mm,ymin=0,ymax=60,xmin=-.3,xmax=3.3,xtick={0,1,2,3},xticklabels={Clean,Blur,Noise,Dim},ylabel={PC50 (\%%)},ymajorgrids,legend pos=north east]'%(dx+12)) + for m,color,mark in [('frozen','muted','square*'),('target_only','ochre','triangle*'),('cacp','teal','*')]: + points=[] + for i,c in enumerate(['clean','blur','noise','dim']): + v=get(summary,model,'stress_'+c,'PC50',m);points.append('(%.2f,%.6f) += (0,%.6f) -= (0,%.6f)'%(i,v['estimate']*100,(v['hi']-v['estimate'])*100,(v['estimate']-v['lo'])*100)) + lines.append(r'\addplot[%s,mark=%s,mark size=1.8pt,line width=.8pt,error bars/.cd,y dir=both,y explicit] coordinates {'%(color,mark)+' '.join(points)+'};') + if panel==1:lines.append(r'\legend{Frozen,Target phrases,CACP}') + lines.append(r'\end{axis}') + lines.append(r'\end{tikzpicture}');write('Fig6_stress','\n'.join(lines)) + +def qualitative(): + meta=json.loads((F/'qualitative/qualitative_examples.json').read_text());lines=[r'\begin{tikzpicture}[x=1mm,y=1mm]'] + for j,title in enumerate(['RGB input','Ground truth','Frozen errors','CACP errors']):lines.append(r'\node[font=\sffamily\bfseries\fontsize{8}{10}\selectfont] at (%s,13) {%s};'%(19+j*40,title)) + for i,e in enumerate(meta['examples']): + y=-i*45.5;d=e['record'];name='CLIPSeg' if e['model']=='clipseg' else 'Grounded SAM' + lines.append(r'\node[anchor=west,text width=158mm,align=left,font=\sffamily\fontsize{8}{10}\selectfont] at (0,%s) {\textbf{%s\quad %s\quad %s}\enspace %s};'%(y+5,chr(97+i),name,e['kind'],esc(d['query']))) + gt=np.asarray(Image.open(F/'qualitative'/e['assets']['gt']))>0 + for j,key in enumerate(['rgb','gt','frozen','cacp']): + im=Image.open(F/'qualitative'/e['assets'][key]) + if key!='rgb': + mask=np.asarray(im)>0;out=np.zeros((*mask.shape,3),np.uint8);out[:]=(247,248,249) + if key=='gt':out[mask]=(20,125,131) + else:out[mask>]=(20,125,131);out[mask&~gt]=(182,120,34);out[~mask>]=(174,71,91) + im=Image.fromarray(out) + path=F/'qualitative'/(e['model']+'_'+e['kind']+'_'+key+'_display.png');im.resize((1920,1920),Image.Resampling.NEAREST).save(path) + x=19+j*40;lines.append(r'\node[inner sep=0] at (%s,%s) {\includegraphics[width=30mm]{qualitative/%s}};'%(x,y-17,path.name)) + lines.append(r'\draw[rule,line width=.35pt] (%s,%s) rectangle (%s,%s);'%(x-15,y-32,x+15,y-2)) + if key in ['frozen','cacp']:lines.append(r'\node[anchor=north,font=\sffamily\fontsize{8}{10}\selectfont] at (%s,%s) {IoU %.3f};'%(x,y-33,e['scores'][key]['iou'])) + lines.append(r'\node[anchor=north west,font=\ttfamily\fontsize{8}{10}\selectfont,text=muted] at (2,%s) {%s};'%(y-33,esc(d['id']))) + lines.append(r'\node[anchor=west] at (2,-178) {\textcolor{teal}{$\blacksquare$} True positive\qquad\textcolor{ochre}{$\blacksquare$} False positive\qquad\textcolor{rose}{$\blacksquare$} False negative};') + lines.append(r'\end{tikzpicture}');write('Fig7_qualitative','\n'.join(lines)) + +def main(): + synthetic();budget() + if (F/'qualitative/qualitative_examples.json').exists():qualitative() + if (A/'summary.json').exists(): + s=json.loads((A/'summary.json').read_text()) + if {'clipseg','groundedsam'}<={r['model'] for r in s}:forest(s);capability(s);tradeoff(s);stress(s) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/package_release.py b/source/legacy_project/code/package_release.py new file mode 100644 index 0000000000000000000000000000000000000000..ee790fb350d09cfdae442e8be0648a3992feba67 --- /dev/null +++ b/source/legacy_project/code/package_release.py @@ -0,0 +1,21 @@ +"""Create the compact reproducibility archive without transient TeX/cache files.""" +from pathlib import Path +import hashlib,json,zipfile +R=Path(__file__).resolve().parents[1] +def included(p): + rel=p.relative_to(R) + if not p.is_file() or any(x.startswith('.') or x=='__pycache__' for x in rel.parts):return False + if rel.parts[0] in ['build','cache','vendor','assets']:return False + if rel.parts[0] in ['figures','latex'] and p.suffix in ['.aux','.log','.out','.toc','.blg','.fls','.fdb_latexmk']:return False + if rel.parts[0]=='latex' and p.name.startswith('sn-') and p.suffix=='.bst' and p.name!='sn-mathphys-num.bst':return False + return p.suffix not in ['.pyc','.fmt','.part'] +def main(): + files=sorted(p for p in R.rglob('*') if included(p) and p.name!='checksums.json') + sums={str(p.relative_to(R)):hashlib.sha256(p.read_bytes()).hexdigest() for p in files} + check=R/'protocol/checksums.json';check.write_text(json.dumps(sums,indent=2));files.append(check) + out=R.parent/'RefSeg_CACP_MVA_Complete_Package.zip' + with zipfile.ZipFile(out,'w',zipfile.ZIP_DEFLATED,compresslevel=9) as z: + for p in files:z.write(p,str(Path(R.name)/p.relative_to(R))) + with zipfile.ZipFile(out) as z:assert z.testzip() is None + print(json.dumps({'archive':str(out),'files':len(files),'bytes':out.stat().st_size,'sha256':hashlib.sha256(out.read_bytes()).hexdigest()},indent=2)) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/pilot.py b/source/legacy_project/code/pilot.py new file mode 100644 index 0000000000000000000000000000000000000000..4ccf21ecb104c27a0330566b874bade874972c92 --- /dev/null +++ b/source/legacy_project/code/pilot.py @@ -0,0 +1,18 @@ +from pathlib import Path +import os,time,json +t=time.time() +print('starting imports',flush=True) +import torch +from transformers import CLIPSegProcessor,CLIPSegForImageSegmentation,AutoProcessor,AutoModelForZeroShotObjectDetection,SamModel,SamProcessor +from PIL import Image,ImageDraw +root=Path(__file__).resolve().parents[1] +print('imports complete',time.time()-t,torch.__version__,flush=True) +assert torch.cuda.is_available() +device='cuda';modeldir=root/'assets/models/clipseg' +p=CLIPSegProcessor.from_pretrained(modeldir,local_files_only=True);m=CLIPSegForImageSegmentation.from_pretrained(modeldir,local_files_only=True).to(device).eval() +im=Image.new('RGB',(320,320),'white');ImageDraw.Draw(im).ellipse((60,60,230,230),fill='red') +x=p(text=['a red circle'],images=[im],return_tensors='pt',padding=True).to(device) +with torch.inference_mode():y=m(**x,interpolate_pos_encoding=True).logits +torch.cuda.synchronize() +result={'job_id':os.environ.get('SLURM_JOB_ID'),'device':torch.cuda.get_device_name(0),'torch':torch.__version__,'shape':list(y.shape),'finite':bool(torch.isfinite(y).all()),'max_probability':float(y.sigmoid().max()),'elapsed_seconds':time.time()-t,'purpose':'Infrastructure smoke test on a constructed image; not a benchmark result'} +(root/'results/pilot.json').write_text(json.dumps(result,indent=2));print(json.dumps(result,indent=2),flush=True) diff --git a/source/legacy_project/code/prepare_assets.py b/source/legacy_project/code/prepare_assets.py new file mode 100644 index 0000000000000000000000000000000000000000..922f0168f60d4b47207f77e86cf58e2d6a40c948 --- /dev/null +++ b/source/legacy_project/code/prepare_assets.py @@ -0,0 +1,44 @@ +"""Download pinned public model weights and official gRefCOCO annotations. +No model execution, private tokens, or changes to other projects. +""" +from pathlib import Path +import urllib.request,urllib.parse,json,hashlib,time,concurrent.futures +ROOT=Path(__file__).resolve().parents[1] +ASSETS=ROOT/'assets';ASSETS.mkdir(parents=True,exist_ok=True) +def get_json(url): + with urllib.request.urlopen(url,timeout=45) as r:return json.load(r) +def download(url,path): + path=Path(path);path.parent.mkdir(parents=True,exist_ok=True) + if path.exists() and path.stat().st_size>0:return str(path) + for attempt in range(3): + try: + with urllib.request.urlopen(url,timeout=90) as r,open(str(path)+'.part','wb') as f: + while True: + b=r.read(1024*1024) + if not b:break + f.write(b) + Path(str(path)+'.part').replace(path);print('downloaded',str(path),path.stat().st_size,flush=True);return str(path) + except Exception: + if attempt==2:raise + time.sleep(2) +def main(): + # Reproduction uses the executed lock, never the current upstream HEAD. + lock=ROOT/'protocol/asset_manifest.json';manifest=json.loads(lock.read_text()) + jobs=[] + for rel,expected in manifest['file_sha256'].items(): + p=Path(rel);assert p.parts[0]=='assets' and '..' not in p.parts + if p.parts[1]=='models': + meta=manifest['models'][p.parts[2]];prefix='https://huggingface.co/'+meta['repo'];name='/'.join(p.parts[3:]) + else: + assert p.parts[1]=='grefcoco';meta=manifest['dataset'];prefix='https://huggingface.co/datasets/'+meta['repo'];name='/'.join(p.parts[2:]) + jobs.append((prefix+'/resolve/'+meta['revision']+'/'+urllib.parse.quote(name),ROOT/p)) + with concurrent.futures.ThreadPoolExecutor(max_workers=4) as ex: + for result in ex.map(lambda args:download(*args),jobs):pass + for _,path in jobs: + h=hashlib.sha256() + with path.open('rb') as f: + for b in iter(lambda:f.read(1024*1024),b''):h.update(b) + assert h.hexdigest()==manifest['file_sha256'][str(path.relative_to(ROOT))],'Asset checksum mismatch: '+str(path) + (ASSETS/'asset_manifest.json').write_text(lock.read_text()) + print(json.dumps({'status':'ASSETS_VERIFIED','files':len(jobs),'lock':str(lock)}),flush=True) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/prepare_data.py b/source/legacy_project/code/prepare_data.py new file mode 100644 index 0000000000000000000000000000000000000000..315656ebce8ea67aaba1e8e0682b74cd94bc7ae8 --- /dev/null +++ b/source/legacy_project/code/prepare_data.py @@ -0,0 +1,119 @@ +"""New evaluation data, independent of unavailable original RefSeg generator. +Controlled RGB generation and official gRefCOCO subsampling with original masks. +The inference runner receives RGB + query, never scene objects or target labels. +""" +from pathlib import Path +import json,random,hashlib,collections,concurrent.futures,sys +import numpy as np +from PIL import Image,ImageDraw,ImageFilter,ImageEnhance +from prepare_assets import download +ROOT=Path(__file__).resolve().parents[1];DATA=ROOT/'data' +COLORS={'red':(214,47,47),'blue':(38,104,210),'green':(43,156,83),'orange':(233,139,34),'purple':(152,73,183),'yellow':(235,204,44),'pink':(222,105,151),'cyan':(38,177,196)} +SHAPES=['circle','square','triangle'] +def raster(shape,x,y,r,size=320): + m=Image.new('L',(size,size));d=ImageDraw.Draw(m);x*=size;y*=size;r*=size + if shape=='circle':d.ellipse((x-r,y-r,x+r,y+r),fill=255) + elif shape=='square':d.rectangle((x-r,y-r,x+r,y+r),fill=255) + else:d.polygon([(x,y-r),(x-r,y+r),(x+r,y+r)],fill=255) + return m +def save_mask(path,masks): + out=np.zeros((320,320),bool) + for m in masks:out|=np.asarray(m)>0 + Image.fromarray(out.astype('uint8')*255).save(path) +def controlled(): + records=[];scenes=[];rng_names=list(COLORS) + for seed in [11,23,37,53,71]: + rng=random.Random(seed) + for idx in range(240): + split='fit' if idx<40 else 'cal' if idx<80 else 'test';sid=f's{seed}_{idx:04d}' + color,ac,other=rng.sample(rng_names,3);shape=rng.choice(SHAPES);ash=rng.choice([s for s in SHAPES if s!=shape]);y=rng.uniform(.38,.54) + ax=rng.choice([.07,.335,.665,.93]) + objects=[(color,shape,x+rng.uniform(-.012,.012),y+rng.uniform(-.015,.015),rng.uniform(.055,.075)) for x in [.17,.5,.83]] + objects += [(ac,ash,ax,.71,rng.uniform(.045,.055)),(other,shape,.21+rng.uniform(-.02,.02),.15,rng.uniform(.05,.065))] + positions=[(.5,.15),(.8,.15),(.2,.86),(.5,.86),(.8,.86)] + used={(color,shape),(ac,ash),(other,shape)} + for x,yy in positions[:rng.randint(2,5)]: + c,s=rng.choice([(c,s) for c in rng_names for s in SHAPES if (c,s) not in used]);used.add((c,s));objects.append((c,s,x+rng.uniform(-.025,.025),yy+rng.uniform(-.025,.025),rng.uniform(.045,.068))) + image=Image.new('RGB',(320,320),(246,246,243));masks=[] + for c,s,x,yy,r in objects: + mask=raster(s,x,yy,r);image.paste(COLORS[c],mask=mask);masks.append(mask) + folder=DATA/'controlled';(folder/'images').mkdir(parents=True,exist_ok=True);(folder/'masks').mkdir(exist_ok=True) + image_path=folder/'images'/f'{sid}.png';image.save(image_path) + anchor_path=folder/'masks'/f'{sid}_anchor.png';masks[3].save(anchor_path) + absent=rng.choice([(c,s) for c in rng_names for s in SHAPES if (c,s) not in used]);phrase=f'{color} {shape}';anchor=f'{ac} {ash}';otherphrase=f'{other} {shape}' + held=split=='test' and idx%2==1;verb=rng.choice(['highlight','select','find']) if held else rng.choice(['segment','show']) + plural=f'all {phrase}s';left=f'all {phrase}s to the left of the {anchor}';right=f'all {phrase}s to the right of the {anchor}' + if held:left=f'all {phrase}s on the left of the {anchor}';right=f'all {phrase}s on the right of the {anchor}' + pairs=[('attribute',[(f'{verb} {plural}',[0,1,2]),(f'{verb} all {otherphrase}s',[4])]),('relation',[(f'{verb} {left}',[i for i in range(3) if objects[i][2]ax])]),('quantifier',[(f'{verb} the leftmost {phrase}',[0]),(f'{verb} {plural}',[0,1,2])]),('action',[(f'{verb} {plural}',[0,1,2]),(f'do not {verb} {plural}',[])]),('absence',[(f'{verb} {plural}',[0,1,2]),(f'{verb} all {absent[0]} {absent[1]}s',[])]),('paraphrase',[(f'show all {phrase}s',[0,1,2]),(f'select every {phrase}',[0,1,2])])] + these=[] + for family,endpoints in pairs: + for ep,(query,ids) in enumerate(endpoints): + rid=f'{sid}_{family}_{ep}';gt=folder/'masks'/f'{rid}.png';save_mask(gt,[masks[i] for i in ids]) + r={'id':rid,'scene_id':sid,'domain':'controlled','split':split,'official_split':None,'mode':family,'pair_id':sid+'_'+family,'endpoint':ep,'query':query,'image_path':str(image_path.relative_to(ROOT)),'gt_path':str(gt.relative_to(ROOT)),'anchor_gt_path':str(anchor_path.relative_to(ROOT)),'target_count':len(ids),'seed':seed,'template':'held' if held else 'seen','corruption':'clean'};records.append(r);these.append(r) + scenes.append({'scene_id':sid,'split':split,'objects':[{'color':c,'shape':s,'x':x,'y':yy,'radius':r} for c,s,x,yy,r in objects],'rgb_sha256':hashlib.sha256(image.tobytes()).hexdigest()}) + if split=='test' and 80<=idx<120: + rs=np.random.RandomState(seed*1000+idx) + noisy=Image.fromarray(np.clip(np.asarray(image).astype(float)+rs.normal(0,18,(320,320,3)),0,255).astype('uint8')) + for name,im in [('blur',image.filter(ImageFilter.GaussianBlur(2))),('noise',noisy),('dim',ImageEnhance.Brightness(image).enhance(.6))]: + path=folder/'images'/f'{sid}_{name}.png';im.save(path) + for base in these: + r=dict(base);r.update(id=base['id']+'_'+name,image_path=str(path.relative_to(ROOT)),pair_id=base['pair_id']+'_'+name,corruption=name);records.append(r) + (DATA/'controlled_scenes.jsonl').write_text(''.join(json.dumps(r)+'\n' for r in scenes)) + return records +def natural(): + from pycocotools import mask as maskutils + refs=json.loads((ROOT/'assets/grefcoco/grefs(unc).json').read_text());inst=json.loads((ROOT/'assets/grefcoco/instances.json').read_text()) + anns={a['id']:a for a in inst['annotations']};images={i['id']:i for i in inst['images']};pools=collections.defaultdict(list) + for r in refs: + count=0 if r['no_target'] else len(r['ann_id']);group='zero' if count==0 else 'one' if count==1 else 'multi';pools[(r['split'],group)].append(r) + selected=[];used=set();rng=random.Random(20260906) + # One expression per image throughout: calibration scenes are independent units. + for split,source,n in [('fit','train',200),('cal','train',300),('val','val',200),('testA','testA',200),('testB','testB',200)]: + for group in (['zero','multi'] if split=='val' else ['zero','one','multi']): + count=300 if split=='val' else n + pool=list(pools[(source,group)]);rng.shuffle(pool);take=[] + for r in pool: + if r['image_id'] in used:continue + used.add(r['image_id']);take.append((split,group,r)) + if len(take)==count:break + if len(take)!=count:raise RuntimeError(f'Not enough distinct images for {split}/{group}: {len(take)}') + selected.extend(take) + out=DATA/'natural';(out/'images').mkdir(parents=True,exist_ok=True);(out/'masks').mkdir(exist_ok=True) + failures={} + def fetch(item): + _,_,r=item;path=out/'images'/r['file_name'] + try:download('https://s3.amazonaws.com/images.cocodataset.org/train2014/'+r['file_name'],path);Image.open(path).verify();return r['image_id'],True + except Exception as e:return r['image_id'],str(e) + with concurrent.futures.ThreadPoolExecutor(max_workers=12) as ex: + for iid,result in ex.map(fetch,selected): + if result is not True:failures[iid]=result + + if failures: + (DATA/'natural_download_failures.json').write_text(json.dumps(failures,indent=2)) + raise RuntimeError(f'{len(failures)} image downloads failed; rerun to complete cached selection') + records=[];license_map={x['id']:x for x in inst['licenses']} + for split,group,r in selected: + if r['image_id'] in failures:continue + info=images[r['image_id']];h,w=info['height'],info['width'];gt=np.zeros((h,w),bool) + if not r['no_target']: + for aid in r['ann_id']: + seg=anns[aid]['segmentation'] + if isinstance(seg,list):rle=maskutils.merge(maskutils.frPyObjects(seg,h,w)) + elif isinstance(seg.get('counts'),list):rle=maskutils.frPyObjects(seg,h,w) + else:rle=seg + gt|=maskutils.decode(rle).astype(bool) + if not r['no_target'] and not gt.any():raise ValueError('Official positive mask is empty') + sentence=rng.choice(r['sentences']);rid='g'+str(r['ref_id'])+'_'+str(sentence['sent_id']);path=out/'masks'/f'{rid}.png';Image.fromarray(gt.astype('uint8')*255).save(path) + records.append({'id':rid,'scene_id':'coco_'+str(r['image_id']),'domain':'natural','split':split,'official_split':r['split'],'mode':group,'pair_id':None,'endpoint':None,'query':sentence['sent'],'image_path':str((out/'images'/r['file_name']).relative_to(ROOT)),'gt_path':str(path.relative_to(ROOT)),'target_count':0 if r['no_target'] else len(r['ann_id']),'ref_id':r['ref_id'],'sent_id':sentence['sent_id'],'ann_ids':r['ann_id'],'seed':20260906,'template':'natural','corruption':'clean','license':license_map[info['license']],'source_image_url':'https://s3.amazonaws.com/images.cocodataset.org/train2014/'+r['file_name'],'flickr_url':info.get('flickr_url')}) + (DATA/'natural_download_failures.json').write_text(json.dumps(failures,indent=2));return records +def main(): + DATA.mkdir(exist_ok=True);c=controlled();n=natural();records=c+n + # Guard data separation and maintain each corrupted image under its original scene. + splits=collections.defaultdict(set) + for r in records:splits[r['scene_id']].add(r['split']) + assert all(len(s)==1 for s in splits.values()) + path=DATA/'manifest.jsonl';path.write_text(''.join(json.dumps(r,ensure_ascii=False)+'\n' for r in records)) + counts=collections.Counter((r['domain'],r['split'],r['corruption'],r['mode']) for r in records) + summary={'records':len(records),'controlled_records':len(c),'natural_records':len(n),'distinct_scene_ids':len(splits),'manifest_sha256':hashlib.sha256(path.read_bytes()).hexdigest(),'counts':[dict(domain=k[0],split=k[1],corruption=k[2],mode=k[3],n=v) for k,v in sorted(counts.items())],'not_original_dataset':True,'natural_sampling':'One randomly selected expression per distinct image; image-disjoint fit/cal/val/testA/testB; balanced target-count strata; failures recorded without outcome-dependent replacement'} + (DATA/'dataset_summary.json').write_text(json.dumps(summary,indent=2));print(json.dumps(summary,indent=2)) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/repair.py b/source/legacy_project/code/repair.py new file mode 100644 index 0000000000000000000000000000000000000000..5616f1560b23cce980ee60ad5b1356c3f3754336 --- /dev/null +++ b/source/legacy_project/code/repair.py @@ -0,0 +1,152 @@ +"""Counterfactual Anchor-Consistent Projection (CACP). + +All primary decisions use only query text and predicted maps. The optional +oracle anchor is isolated and must never be supplied to the primary method. +Fixed defaults are declared before the evaluation predictions are observed. +""" +import re +from dataclasses import dataclass, asdict +import numpy as np +from scipy import ndimage + +@dataclass(frozen=True) +class Query: + original: str + target: str + anchor: str = '' + relation: str = '' + opposite: str = '' + plural: bool = False + negate: bool = False + supported: bool = False + +OPPOSITE = {'left':'right','right':'left','above':'below','below':'above'} +VERBS = r'(?:segment|show|select|find|highlight)' +IRREGULAR = {'people':'person','men':'man','women':'woman','children':'child'} +def noun_phrase(s): + s=re.sub(r'^(?:(?:all|every|both|two|the|a|an)\s+)+','',s.strip()) + words=s.split() + if not words:return s + w=words[-1] + if w in IRREGULAR:words[-1]=IRREGULAR[w] + elif w.endswith('s') and not w.endswith(('ss','us','is')):words[-1]=w[:-1] + return ' '.join(words) + +def parse_query(text): + q=' '.join(text.lower().strip(' .').split()) + neg=bool(re.match(r"^(?:do not|don't)\s+"+VERBS+r'\b',q)) + cleaned=re.sub(r"^(?:do not|don't)\s+",'',q) if neg else q + cleaned=re.sub(r'^'+VERBS+r'\s+','',cleaned) + plural=bool(re.search(r'\b(all|every|both|two|people|men|women|children)\b',cleaned)) + # Only a single explicit relation is supported; nested clauses fall back. + pat=r'^(.+?)\s+(?:(?:to|on)\s+the\s+)?(left|right)\s+of\s+(.+)$' + m=re.match(pat,cleaned) + if not m:m=re.match(r'^(.+?)\s+(above|below)\s+(.+)$',cleaned) + if m: + t,rel,a=m.groups() + if re.search(r'\b(left|right|above|below|that|which)\b',a): + return Query(q,q,plural=plural,negate=neg) + opp=re.sub(r'\b'+rel+r'\b',OPPOSITE[rel],q,count=1) + return Query(q,noun_phrase(t),noun_phrase(a),rel,opp,plural,neg,True) + m=re.match(r'^(?:the\s+)?(leftmost|rightmost|topmost|bottommost)\s+(.+)$',cleaned) + if m:return Query(q,noun_phrase(m[2]),relation=m[1],plural=plural,negate=neg,supported=True) + # Simple imperatives / quantified noun phrases are compositional; preserve + # unrestricted natural expressions rather than pretending a regex is a parser. + simple=bool(re.match(r'^'+VERBS+r'\s+',q) or re.match(r'^(all|every|both|two)\s+',cleaned)) + if simple and len(cleaned.split())<=5: + return Query(q,noun_phrase(cleaned),plural=plural,negate=neg,supported=True) + return Query(q,q,plural=plural,negate=neg,supported=neg) + +def query_plan(text): + q=parse_query(text) + return q,list(dict.fromkeys([q.original,q.target]+([q.anchor,q.opposite] if q.anchor else []))) + +def components(prob,threshold): + lab,n=ndimage.label(prob>=threshold,structure=np.ones((3,3),int)) + sizes=np.bincount(lab.ravel());out=[];h,w=prob.shape + for i,sl in enumerate(ndimage.find_objects(lab),1): + if sl is None or sizes[i]1 else 0) + if gate and margin<.05:return base,'target_ambiguous',None,margin + return scores[0]['mask'],'singular',None,margin + anchors=components(maps[q.anchor],threshold) + if oracle: + if oracle_anchor is None:return base,'oracle_unavailable',None,None + anchors=components(oracle_anchor.astype(float),.5) + if not anchors:return base,'anchor_missing',None,None + ac=anchors[0];am=ac['confidence']-(anchors[1]['confidence'] if len(anchors)>1 else 0) + if gate and am<.05:return base,'anchor_ambiguous',am,None + key='x' if q.relation in ('left','right') else 'y' + sign=1 if q.relation in ('right','below') else -1 + allowed=[] + for c in targets: + distance=sign*(c[key]-ac[key]) + if distance<(.03 if gate else 0):continue + residual=float((p[c['mask']]-maps[q.opposite][c['mask']]).mean()) + score=c['confidence']+(.5*residual if use_cf else 0) + allowed.append((score,c,residual)) + if not allowed:return base,'relation_unsatisfied',am,None + allowed.sort(key=lambda z:z[0],reverse=True) + sm=allowed[0][0]-(allowed[1][0] if len(allowed)>1 else 0) + # A confidently contradictory full-query response blocks a repair. + if use_cf and gate and allowed[0][2]<-.05:return base,'counterfactual_veto',am,sm + if not q.plural and gate and sm<.05:return base,'assignment_ambiguous',am,sm + return union([c for _,c,_ in allowed] if q.plural else [allowed[0][1]],p.shape),'projected',am,sm + result['anchor_nogate']=project(False,False)[0] + result['anchor_gate']=project(False,True)[0] + result['counterfactual_nogate']=project(True,False)[0] + main,reason,am,sm=project(True,True);result['cacp']=main + if oracle_anchor is not None:result['oracle_anchor']=project(True,True,True)[0] + flags.update(reason=reason,anchor_margin=am,score_margin=sm,changed=bool(np.any(main!=base))) + return result,flags + +def visual_features(prob,mask,threshold): + p=np.asarray(prob,float);k=max(1,int(p.size*.01));top=np.partition(p.ravel(),p.size-k)[-k:] + p2=np.clip(p,1e-6,1-1e-6) + return [float(p.max()),float(top.mean()),float(p.mean()),float(p.std()),float(mask.mean()), + float((-p2*np.log(p2)-(1-p2)*np.log(1-p2)).mean()),float(np.log1p(len(components(p,threshold))))] + +def score_mask(pred,gt): + intersection=int(np.logical_and(pred,gt).sum());union_n=int(np.logical_or(pred,gt).sum()) + return {'iou':intersection/union_n if union_n else 1.,'intersection':intersection,'union':union_n, + 'pred_pixels':int(pred.sum()),'gt_pixels':int(gt.sum()),'empty':not bool(pred.any())} diff --git a/source/legacy_project/code/replay_analysis.py b/source/legacy_project/code/replay_analysis.py new file mode 100644 index 0000000000000000000000000000000000000000..87120cf3812faa652280cca34c5168816ebfbdf9 --- /dev/null +++ b/source/legacy_project/code/replay_analysis.py @@ -0,0 +1,26 @@ +"""Recompute the published scene-bootstrap summaries from archived records. + +This replay uses the stored fitted decisions. It does not refit calibration or +modify the original results. Run analyze.py after a fresh GPU inference campaign +to repeat fitting, calibration and evaluation from frozen-map measurements. +""" +from pathlib import Path +import json,gzip +import numpy as np +from analyze import summarize +R=Path(__file__).resolve().parents[1];A=R/'results/analysis' +def main(): + published=json.loads((A/'summary.json').read_text());report=[] + for model in ['clipseg','groundedsam']: + rows=[json.loads(l) for l in gzip.open(A/(model+'_evaluated.jsonl.gz'),'rt')] + expected=[r for r in published if r['model']==model];methods=list(dict.fromkeys(r['method'] for r in expected)) + observed=summarize(rows,methods);index={(r['population'],r['metric'],r['method']):r for r in expected};maxdiff=0. + for r in observed: + old=index[(r['population'],r['metric'],r['method'])] + for k in ['estimate','lo','hi','gain','gain_lo','gain_hi']: + diff=abs(r[k]-old[k]);maxdiff=max(maxdiff,diff);assert diff<1e-12,(model,k,diff) + assert r['clusters']==old['clusters'] and r['units']==old['units'] + assert len(observed)==len(expected) + report.append({'model':model,'records':len(rows),'summary_rows':len(observed),'maximum_absolute_difference':maxdiff}) + out=R/'build/replay_verification.json';out.parent.mkdir(exist_ok=True);out.write_text(json.dumps(report,indent=2));print(json.dumps(report,indent=2)) +if __name__=='__main__':main() diff --git a/source/legacy_project/code/test_protocol.py b/source/legacy_project/code/test_protocol.py new file mode 100644 index 0000000000000000000000000000000000000000..b185e7cc6d69da3c1276f0e8fa77c612396a1323 --- /dev/null +++ b/source/legacy_project/code/test_protocol.py @@ -0,0 +1,41 @@ +"""Contract checks for empty targets, anchor leakage and safe fallback.""" +import unittest +import numpy as np +from repair import query_plan,repaired_maps,score_mask + +class Contracts(unittest.TestCase): + def fixture(self,query): + q,texts=query_plan(query);maps={t:np.zeros((100,100),np.float32) for t in texts} + target=np.zeros((100,100),np.float32) + for x in [15,45,75]:target[35:45,x:x+10]=.9 + maps[q.original]=target.copy();maps[q.target]=target.copy() + if q.anchor:maps[q.anchor][60:70,30:40]=.9;maps[q.opposite]=target.copy() + return q,maps + def test_oracle_cannot_change_primary(self): + q,m=self.fixture('show all red circles to the left of the blue square') + a,_=repaired_maps(q.original,m,.5) + fake=np.zeros((100,100),bool);fake[70:80,85:95]=1 + b,_=repaired_maps(q.original,m,.5,oracle_anchor=fake) + self.assertTrue(np.array_equal(a['cacp'],b['cacp'])) + self.assertEqual(a['cacp'].sum(),100) + def test_plural_relation_retains_two(self): + q,m=self.fixture('select all red circles on the right of the blue square') + p,_=repaired_maps(q.original,m,.5) + self.assertEqual(p['cacp'].sum(),200) + def test_ambiguous_anchor_falls_back(self): + q,m=self.fixture('show all red circles to the left of the blue square') + m[q.anchor][60:70,80:90]=.9 + p,f=repaired_maps(q.original,m,.5) + self.assertTrue(np.array_equal(p['cacp'],p['frozen'])) + self.assertEqual(f['reason'],'anchor_ambiguous') + def test_unsupported_clause_preserves_output(self): + q,m=self.fixture('the person wearing a hat who is holding a bag') + p,_=repaired_maps(q.original,m,.5) + self.assertTrue(np.array_equal(p['cacp'],p['frozen'])) + def test_explicit_action_and_empty_scores(self): + q,m=self.fixture('do not highlight all red circles') + p,_=repaired_maps(q.original,m,.5);empty=np.zeros((100,100),bool) + self.assertFalse(p['cacp'].any()) + self.assertEqual(score_mask(empty,empty)['iou'],1) + self.assertEqual(score_mask(empty,np.ones_like(empty))['iou'],0) +if __name__=='__main__':unittest.main(verbosity=2) diff --git a/source/legacy_project/code/write_results.py b/source/legacy_project/code/write_results.py new file mode 100644 index 0000000000000000000000000000000000000000..907a1a70d0cadafff819f0a5bcfe96e6a201b5c3 --- /dev/null +++ b/source/legacy_project/code/write_results.py @@ -0,0 +1,99 @@ +"""Generate manuscript numbers from completed, immutable per-record results.""" +from pathlib import Path +import json,gzip,collections,hashlib +import numpy as np +from analyze import cluster_ci +R=Path(__file__).resolve().parents[1];A=R/'results/analysis';L=R/'latex' +S=json.loads((A/'summary.json').read_text());P=json.loads((A/'calibration.json').read_text());META=json.loads((A/'run_summary.json').read_text()) +MODELS=[('clipseg','CLIPSeg'),('groundedsam','Grounded SAM')] +def v(m,pop,metric,method):return next(r for r in S if (r['model'],r['population'],r['metric'],r['method'])==(m,pop,metric,method)) +def est(m,pop,metric,method):return v(m,pop,metric,method)['estimate'] +def pct(x):return f'{100*x:.2f}' +def ci(r,delta=False):return '['+pct(r['gain_lo' if delta else 'lo'])+', '+pct(r['gain_hi' if delta else 'hi'])+']' +def fig(name,label,caption,width=r'\textwidth'): + return r'\begin{figure*}[!tp]\centering\includegraphics[width='+width+']{'+name+'.pdf}\n'+r'\caption{'+caption+r'}\label{'+label+'}\n'+r'\end{figure*}'+'\n' +def table(caption,label,cols,header,rows,foot=''): + return r'\begin{table*}[t]\caption{'+caption+r'}\label{'+label+'}\n'+r'\centering\begin{tabular}{'+cols+'}\n'+r'\toprule '+header+r'\\\midrule'+'\n'+'\n'.join(rows)+'\n'+r'\bottomrule\end{tabular}'+'\n'+(r'\begin{minipage}{\textwidth}\footnotesize '+foot+r'\end{minipage}'+'\n' if foot else '')+r'\end{table*}'+'\n' +def main(): + comparisons={};compute={};seed_rows=[] + manifest=gzip.open(R/'data/manifest.jsonl.gz','rb').read();checksum=hashlib.sha256(manifest).hexdigest() + for model,name in MODELS: + rows=[json.loads(l) for l in gzip.open(A/(model+'_evaluated.jsonl.gz'),'rt')] + assert len(rows)==len({r['id'] for r in rows})==24900 + for run in META[model]['runs']: + assert run['status']=='COMPLETE' and run['manifest_sha256']==checksum + for f,h in run['code_sha256'].items():assert hashlib.sha256((R/'code'/f).read_bytes()).hexdigest()==h + pairs=collections.defaultdict(list) + for r in rows: + if r['domain']=='controlled' and r['split']=='test' and r['corruption']=='clean' and r['mode'] in ['attribute','relation','quantifier','absence']:pairs[r['pair_id']].append(r) + items=list(pairs.values());keys=[p[0]['scene_id'] for p in items];strata=[p[0]['seed'] for p in items] + pc={m:np.array([all(r['scores'][m]['iou']>=.5 for r in p) for p in items],float) for m in ['frozen','target_only','global_direction','anchor_gate','cacp']} + comparisons[model]={} + for other in ['global_direction','anchor_gate','target_only']: + mean,lo,hi,n=cluster_ci(pc['cacp']-pc[other],keys,strata) + comparisons[model]['cacp_minus_'+other]={'estimate':float(mean),'lo':float(lo),'hi':float(hi),'clusters':n} + for seed in [11,23,37,53,71]: + sel=np.array(strata)==seed;seed_rows.append({'model':model,'seed':seed,'frozen':float(pc['frozen'][sel].mean()),'cacp':float(pc['cacp'][sel].mean())}) + rr=[] + for f in sorted((R/'results').glob(model+'*_timings.jsonl')):rr.extend(json.loads(l) for l in f.read_text().splitlines()) + fresh=[r for r in rr if not r['cached']] + assert len(fresh)==len({r['image_path'] for r in fresh})==5100 + compute[model]={'timed_images':len(fresh),**{k:sum(r[k] for r in fresh) for k in ['seconds','language_queries','sam_boxes','truncated_boxes']},'includes':'Completed main shards, initial integration pilot and interrupted two-shard work. Cached replays add no forward time.'} + (A/'additional_comparisons.json').write_text(json.dumps(comparisons,indent=2));(A/'compute_totals.json').write_text(json.dumps(compute,indent=2));(A/'generator_seed_results.json').write_text(json.dumps(seed_rows,indent=2)) + absres='CACP increases primary paired correctness by '+pct(v('clipseg','controlled_primary','PC50','cacp')['gain'])+' and '+pct(v('groundedsam','controlled_primary','PC50','cacp')['gain'])+' percentage points, respectively, but does not outperform the simpler anchor-and-gates ablation. Natural positive-mask IoU changes are small and their paired intervals include zero.' + comp='The ten completed main shards cover 5,100 RGB inputs per pipeline, including corruptions. Including reused pilot and interrupted-shard work, each pipeline executes 26,427 unique image--text queries. Timed model-pipeline execution totals '+f"{compute['clipseg']['seconds']/60:.2f}"+' minutes for CLIPSeg and '+f"{compute['groundedsam']['seconds']/60:.2f}"+' minutes for Grounded SAM; the latter processes 164,041 distinct rounded box prompts and discards 14 detections above the per-query cap. CLIPSeg runs on V100 GPUs; Grounded SAM uses V100 and P100 GPUs. These heterogeneous execution times include preprocessing and do not constitute a controlled latency comparison.' + (L/'results_macros.tex').write_text(r'\newcommand{\AbstractResults}{'+absres+'}\n'+r'\newcommand{\ComputeSummary}{'+comp+'}\n') + t=[r'\subsection{Paired correctness and ablation}'] + for model,name in MODELS: + b=v(model,'controlled_primary','PC50','frozen');r=v(model,'controlled_primary','PC50','cacp');g=comparisons[model]['cacp_minus_global_direction'];a=comparisons[model]['cacp_minus_anchor_gate'] + t.append(name+' increases from '+pct(b['estimate'])+r'\% to '+pct(r['estimate'])+r'\% primary PC$_{0.5}$, a gain of '+pct(r['gain'])+' percentage points (95'+r'\% paired interval '+ci(r,True)+'). Against global-direction repair, the gain is '+pct(g['estimate'])+' points '+ci(g)+'. Against anchor repair with gates, the change is '+pct(a['estimate'])+' points '+ci(a)+'.') + t.append(r'Table~\ref{tab:controlled} and Fig.~\ref{fig:gain} separate the frozen-model gain from the stronger ablations. The counterfactual branch does not improve on anchor repair with gates. Its additional queries therefore support a diagnostic comparison, not a claim of superior accuracy. The very low frozen Grounded SAM pair score requires both endpoints of each controlled pair to pass: it should not be interpreted as universally poor natural-image segmentation.') + methods=[('frozen','Frozen'),('action_only','Action only'),('largest','Largest component'),('global_direction','Global direction'),('target_only','Target phrases'),('anchor_nogate','Anchor, no gates'),('anchor_gate','Anchor + gates'),('counterfactual_nogate','Counterfactual, no gates'),('cacp','CACP'),('source_unconstrained_s11','CACP + source abstention'),('target_unconstrained_s11','CACP + target abstention'),('constrained_0.05_s11',r'CACP + constrained (5\%)')] + rr=[label+' & '+' & '.join(pct(est(m,'controlled_primary',metric,k)) for m,_ in MODELS for metric in ['PC50','PC70'])+r'\\' for k,label in methods] + t.append(table(r'Controlled primary pair correctness (\%). Action and paraphrase pairs are excluded. Each model uses 800 held-out scenes and 3,200 pairs; the same predictions underlie all repairs. Absence variants use calibration-fit seed 11','tab:controlled','lrrrr',r'& \multicolumn{2}{c}{CLIPSeg} & \multicolumn{2}{c}{Grounded SAM}\\\cmidrule(lr){2-3}\cmidrule(lr){4-5}Method & PC$_{0.5}$ & PC$_{0.7}$ & PC$_{0.5}$ & PC$_{0.7}$',rr)) + t.append(fig('Fig3_paired_gain','fig:gain',r'Primary PC$_{0.5}$ gains relative to frozen output. Points are paired mean differences and bars are 95\% scene-bootstrap intervals. The global-direction and anchor-only controls prevent attributing the whole gain to the counterfactual branch. Intervals are descriptive and unadjusted')) + t.append(r'Figure~\ref{fig:capability} explains the aggregate. Quantifier correctness rises from 0.63\% to 73.38\% for CLIPSeg and from 0.00\% to 56.50\% for Grounded SAM. Relation-pair correctness reaches 18.75\% and 15.75\%, respectively; Grounded SAM global-direction repair is stronger on that family (24.75\%). Attribute discrimination and visual absence remain difficult for Grounded SAM. Thus the principal gain is concentrated in selecting the requested extent/cardinality, and a low-dimensional geometry rule is not sufficient for reliable zero-target handling. Action-only repair changes the explicit prohibition family while leaving the primary endpoint unchanged.') + t.append(fig('Fig4_capability','fig:capability',r'Capability-level PC$_{0.5}$ (\%) on 800 clean test scenes per family. Numerical labels make the color scale auditable; CF denotes the counterfactual branch. Action and paraphrase are separate diagnostic families. Multiple rows share a frozen backbone and are not independent systems')) + t.append(r'\subsection{Natural masks and the cost of empty outputs}') + rr=[];nmethods=[methods[i] for i in [0,6,8,9,10,11]] + for model,name in MODELS: + rr.append(r'\multicolumn{6}{l}{\textbf{'+name+r'}}\\') + for k,label in nmethods:rr.append(label+' & '+' & '.join(pct(est(model,'natural_test',metric,k)) for metric in ['positive_mIoU','gIoU','no_target_accuracy','false_empty','additional_false_abstention'])+r'\\') + if model=='clipseg':rr.append(r'\midrule') + t.append(table(r'Natural testA/testB subsample (all entries \%). Positive mIoU, total false-empty rate (FE) and added false abstention (Add.) use 800 positive images; no-target accuracy (NAcc) uses 400 empty-target images. Added error is relative to the nonempty CACP output','tab:natural','lrrrrr',r'Method & Pos. mIoU & gIoU & NAcc & FE & Add.',rr)) + for model,name in MODELS: + r=v(model,'natural_test','positive_mIoU','cacp');src=v(model,'natural_test','positive_mIoU','source_unconstrained_s11');con=v(model,'natural_test','positive_mIoU','constrained_0.05_s11') + t.append(name+' CACP changes positive mIoU by '+pct(r['gain'])+' points '+ci(r,True)+'. Source-domain absence decisions instead change it by '+pct(src['gain'])+' points '+ci(src,True)+', while the constrained target-domain variant changes it by '+pct(con['gain'])+' points '+ci(con,True)+', all relative to frozen output.') + t.append(r'These paired intervals do not establish a natural mask-quality improvement from CACP. Across validation, testA and testB, the parser accepts 122 of 1,800 queries (6.78\%). It changes 70 CLIPSeg outputs (26 IoU improvements, 42 degradations and two ties) and 88 Grounded SAM outputs (37 improvements, 42 degradations and nine ties). Coverage therefore limits the aggregate impact, and accepted syntax does not ensure semantic correctness. For example, a complex monitor description is accepted through an ``above'' relation even though its target contains another spatial clause; Grounded SAM IoU falls from 0.883 to 0.210. The pattern matcher is not a verified natural-language parser.') + t.append(r'Target calibration separates the operating characteristics of the two systems. CLIPSeg selects threshold 0.425 at the 5\% tolerance; each positive calibration stratum has two added errors among 300 images and an upper bound of 4.54\%. Grounded SAM selects 0.800, with one added error in the single-target stratum and none in the multiple-target stratum; its worst bound is 3.84\%. The unconstrained target operating point for Grounded SAM instead has a 26.97\% worst calibration bound. Figure~\ref{fig:tradeoff} shows the empirical test trade-off for the score fitted on natural data. Those test curves are descriptive and were not used to choose the operating points.') + t.append(fig('Fig5_abstention','fig:tradeoff',r'Empirical natural-test trade-offs for the fixed target-domain score (fit seed 11). Markers show calibration-selected unconstrained and 5\%-constrained thresholds. Top panels resolve the low-intervention region; bottom panels span all tested thresholds. The constraint applies to the specified calibration sampling model, not arbitrary test distributions')) + t.append(r'\subsection{Corruption, wording and calibration sensitivity}') + t.append(r'Corruption uses the same 200 scene identifiers in each condition (Fig.~\ref{fig:stress}). CACP PC$_{0.5}$ is 35.50/35.50/34.00/36.88\% for CLIPSeg and 19.75/19.25/24.12/21.12\% for Grounded SAM under clean/blur/noise/dim inputs. Mild corruption is not uniformly harmful: the noise condition increases the latter point estimate. This is evidence about these three fixed perturbations and this sample, not a general robustness guarantee. The generator-seed table and matched-condition intervals are included in the numerical supplement.') + t.append(fig('Fig6_stress','fig:stress',r'Matched clean and corrupted scenes. PC$_{0.5}$ uses the same 200 scene clusters and four primary families in each condition. Error bars are 95\% scene-bootstrap intervals; connected points indicate conditions, not a continuous severity scale')) + wording=[] + for m,name in MODELS:wording.append(name+' '+pct(est(m,'template_seen','PC50','cacp'))+'/'+pct(est(m,'template_held','PC50','cacp'))+r'\%') + t.append('Seen/held wording yields '+', '.join(wording)+r' CACP PC$_{0.5}$. This checks withheld verbs and relation templates within a restricted grammar; it does not demonstrate open-vocabulary syntactic generalization.') + rr=[] + for m,name in MODELS: + sens=json.loads((A/(m+'_sensitivity.json')).read_text()) + for eps in [.01,.025,.05,.1]: + rows=[r for r in sens if r['population']=='natural_test' and r['tolerance']==eps] + def span(key,mult=100): + xs=[r[key]*mult for r in rows];return f'{min(xs):.2f}' if max(xs)-min(xs)<1e-10 else f'{min(xs):.2f}--{max(xs):.2f}' + tau='disabled' if all(r['threshold']>1 for r in rows) else span('threshold',1) + rr.append(name+' & '+f'{eps*100:g}'+r'\% & '+tau+' & '+span('cal_upper')+' & '+span('positive_iou')+' & '+span('no_target_accuracy')+' & '+span('additional_false_abstention')+r'\\') + t.append(table(r'Calibration-fit sensitivity across seeds 11, 23 and 37. Ranges are minima--maxima, not confidence intervals. Test values pool testA/testB; bound and accuracy columns are percentages','tab:sensitivity','llrrrrr',r'Pipeline & Tolerance & Threshold & Cal. bound & Pos. mIoU & NAcc & Add.',rr,r'The score is refitted by stratified bootstrap on the same fitting images. These are sensitivity fits, not independent dataset replications. A disabled rule adds no empty outputs.')) + t.append(r'At 1\% and 2.5\% tolerance, all six model/fit combinations select disabled additional abstention. At larger tolerances, seed-dependent thresholds expose uncertainty in the fitted score. An oracle-anchor intervention raises primary CACP PC$_{0.5}$ from 35.72\% to 38.94\% for CLIPSeg and from 18.34\% to 20.09\% for Grounded SAM. It leaves substantial error, consistent with proposal, attribute and cardinality failures beyond anchor localization.') + t.append(r'\subsection{Qualitative repairs and failures}') + t.append(r'Figure~\ref{fig:qualitative} reconstructs actual cached predictions for controlled relation queries. Gains can recover most or all target pixels; failures can erase a formerly correct region or retain the wrong extent. The figure selects the largest positive and negative IoU changes per pipeline within the stated population, so it illustrates mechanisms rather than their frequency. Every displayed mask is checked against its archived numerical score.') + t.append(fig('Fig7_qualitative','fig:qualitative',r'Actual held-out controlled RGB inputs, target masks and error-coded predictions. Per pipeline, rows show the largest CACP gain and largest loss among positive, clean relation records, with record ID tie-breaking. Selection is post hoc and extremal. Teal denotes true-positive pixels, ochre false positives and rose false negatives. Numbers are original-resolution IoU; display enlargement adds no observations')) + t.append(r'\subsection{Official split and target-count breakdown}') + rr=[] + for m,name in MODELS: + for pop,label in [('val','Validation'),('testA','testA'),('testB','testB')]: + rr.append(name+' & '+label+' & '+' & '.join(pct(est(m,pop,metric,k)) for k in ['frozen','cacp','constrained_0.05_s11'] for metric in ['positive_mIoU','no_target_accuracy'])+r'\\') + t.append(table(r'Natural split breakdown (\%). Validation has 300 zero- and 300 multiple-target images; each test split has 200 images in each of the zero/one/multiple strata. Different mixtures prohibit interpreting their pooled gIoU as directly interchangeable','tab:splits','llrrrrrr',r'& & \multicolumn{2}{c}{Frozen} & \multicolumn{2}{c}{CACP} & \multicolumn{2}{c}{Constrained}\\\cmidrule(lr){3-4}\cmidrule(lr){5-6}\cmidrule(lr){7-8}Pipeline & Split & Pos. IoU & NAcc & Pos. IoU & NAcc & Pos. IoU & NAcc',rr)) + t.append('The target-count breakdown further distinguishes overlap on single and multiple instances. '+ '; '.join(name+' CACP single/multiple-target mIoU is '+pct(est(m,'natural_one','gIoU','cacp'))+'/'+pct(est(m,'natural_multi','gIoU','cacp'))+r'\%' for m,name in MODELS)+'. The full record-level results retain all strata and every calibration fit.') + (L/'results_text.tex').write_text('\n\n'.join(t)+'\n') + print(json.dumps({'status':'RESULTS_WRITTEN','manifest_sha256':checksum,'compute':compute,'comparisons':comparisons},indent=2)) +if __name__=='__main__':main() diff --git a/source/legacy_project/protocol/asset_manifest.json b/source/legacy_project/protocol/asset_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..2e6784b7a1042f464521c099719686a92eac5d94 --- /dev/null +++ b/source/legacy_project/protocol/asset_manifest.json @@ -0,0 +1,48 @@ +{ + "created_utc": "2026-09-06T10:21:23Z", + "models": { + "clipseg": { + "repo": "CIDAS/clipseg-rd64-refined", + "revision": "999e0328d9e10b484360c477313983f9afdd7050", + "license": "apache-2.0" + }, + "groundingdino": { + "repo": "IDEA-Research/grounding-dino-tiny", + "revision": "a2bb814dd30d776dcf7e30523b00659f4f141c71", + "license": "apache-2.0" + }, + "sam": { + "repo": "facebook/sam-vit-base", + "revision": "70c1a07f894ebb5b307fd9eaaee97b9dfc16068f", + "license": "apache-2.0" + } + }, + "dataset": { + "repo": "FudanCVL/gRefCOCO", + "revision": "81eede59b3ac070049f597d023c0ff08d1fb80e9", + "license": null, + "source_project": "https://henghuiding.com/GRES/" + }, + "source": "Public publisher/model-author repositories", + "file_sha256": { + "assets/models/clipseg/config.json": "c023375966d31b3b1392764f7bd91df47098ce19f62f11b0263d8eedcf708bcd", + "assets/models/clipseg/merges.txt": "9fd691f7c8039210e0fced15865466c65820d09b63988b0174bfe25de299051a", + "assets/models/clipseg/model.safetensors": "d00ca85d6b859f9d07b7cfb8ef26fe9771cb275b34c9368f2ecf603139307f55", + "assets/models/clipseg/preprocessor_config.json": "4fb09ebcfd7651205ca8299b993c30088e5535ef350a72d46c5c4580eeac0440", + "assets/models/clipseg/special_tokens_map.json": "c4864a9376a8401918425bed71fc14fc0e81f9b59ec45c1cf96cccb2df508eac", + "assets/models/clipseg/tokenizer_config.json": "4c75d57fd9bd0be8478ad2d6f8b9cebdd4a45338eb108547329c2b6333476ca6", + "assets/models/clipseg/vocab.json": "e089ad92ba36837a0d31433e555c8f45fe601ab5c221d4f607ded32d9f7a4349", + "assets/models/groundingdino/config.json": "eec82c5ab66e16df12a9a212e68ac011779927c2536cf9078658e35d85f0c67a", + "assets/models/groundingdino/model.safetensors": "1a2412ef99bd74bcd3c2a246fa1e48581f8889a1300c9051974741314fc042f3", + "assets/models/groundingdino/preprocessor_config.json": "8454179ba95e2ad22947835aad7b45862a601fc0055ab88bf1ee70892d3aea60", + "assets/models/groundingdino/special_tokens_map.json": "b6d346be366a7d1d48332dbc9fdf3bf8960b5d879522b7799ddba59e76237ee3", + "assets/models/groundingdino/tokenizer.json": "d241a60d5e8f04cc1b2b3e9ef7a4921b27bf526d9f6050ab90f9267a1f9e5c66", + "assets/models/groundingdino/tokenizer_config.json": "d40ab645b68211910b9170d22433d43186a6ec8ee6fd10ba170524b25bf4fb56", + "assets/models/groundingdino/vocab.txt": "07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3", + "assets/models/sam/config.json": "5ebd0d8643b486f3a716bf17c2a15531eb818b2b96ff0c6c5dcc88fa015161af", + "assets/models/sam/model.safetensors": "892c410e496344e527255ccdcb2cb7244a609acb5389c7c4fdba1288f861c579", + "assets/models/sam/preprocessor_config.json": "225545a743c654e3c495ec6f545a0eaba57c8ba3fbbd8483b3cb1c0fc58db517", + "assets/grefcoco/grefs(unc).json": "cc37c5ff95373c78a6a3f98b4c7bc67fde387ea8514752a1392db64223eb3366", + "assets/grefcoco/instances.json": "7f86adb7f4c39db19c7f02a3cc604d17f8016e4c4e8312652d0acc4eae3a2cbd" + } +} diff --git a/source/legacy_project/results/analysis/calibration.json b/source/legacy_project/results/analysis/calibration.json new file mode 100644 index 0000000000000000000000000000000000000000..2321eaea69e36e9f888dd11ed90e735485e1dc09 --- /dev/null +++ b/source/legacy_project/results/analysis/calibration.json @@ -0,0 +1,2022 @@ +{ + "clipseg": { + "source_unconstrained_s11": { + "fit": { + "mean": [ + 0.8336339111328125, + 0.7691459634006024, + 0.10721254737037879, + 0.13837913560730306, + 0.029546030273437558, + 0.2383737516657823, + 1.5095186446265467 + ], + "std": [ + 0.10953620388994748, + 0.13386307965496547, + 0.07421714987808127, + 0.03896819073227127, + 0.02229919056261089, + 0.13313847023402964, + 0.3783591402402505 + ], + "coef": [ + -0.366326483847933, + -0.2354707544374038, + 0.014209455513730804, + -0.19882239982478592, + -0.09123754201768017, + -0.0040325137697616075, + -0.3056504019654017, + -0.2557627198696047 + ], + "n": 2000, + "seed": 11, + "objective": 0.5991505100709568 + }, + "operating_point": { + "threshold": 0.47500000000000003, + "no_target_accuracy": 0.7202572347266881, + "false_empty": 0.37122557726465366, + "additional_false_abstention": 0.369449378330373, + "balanced_accuracy": 0.6745158287310171, + "groups": { + "one": { + "n": 489, + "k": 275, + "upper": null + }, + "multi": { + "n": 1200, + "k": 349, + "upper": null + } + }, + "worst_upper": null + }, + "calibration_domain": "controlled" + }, + "target_unconstrained_s11": { + "fit": { + "mean": [ + 0.5015424178044001, + 0.4714737847906246, + 0.11389586367034367, + 0.13363567570149162, + 0.09408341793634518, + 0.17347583433652528, + 0.5716982044223257 + ], + "std": [ + 0.36126899155282666, + 0.3544875965682152, + 0.12773152771970145, + 0.11427286883640543, + 0.1471871839074244, + 0.15406591893390165, + 0.5859041019481278 + ], + "coef": [ + -0.6603719329411156, + -0.5331169404120333, + -0.18759070918280746, + -0.33349585119422315, + -0.14040231358589209, + -0.6707813924187167, + 0.09490368674317282, + -0.6887859650871697 + ], + "n": 600, + "seed": 11, + "objective": 0.3595785853955624 + }, + "operating_point": { + "threshold": 0.4, + "no_target_accuracy": 0.89, + "false_empty": 0.22, + "additional_false_abstention": 0.011666666666666667, + "balanced_accuracy": 0.8350000000000001, + "groups": { + "one": { + "n": 300, + "k": 4, + "upper": 0.05776459257089124 + }, + "multi": { + "n": 300, + "k": 3, + "upper": 0.051760462997485254 + } + }, + "worst_upper": 0.05776459257089124 + }, + "calibration_domain": "natural" + }, + "constrained_0.01_s11": { + "fit": { + "mean": [ + 0.5015424178044001, + 0.4714737847906246, + 0.11389586367034367, + 0.13363567570149162, + 0.09408341793634518, + 0.17347583433652528, + 0.5716982044223257 + ], + "std": [ + 0.36126899155282666, + 0.3544875965682152, + 0.12773152771970145, + 0.11427286883640543, + 0.1471871839074244, + 0.15406591893390165, + 0.5859041019481278 + ], + "coef": [ + -0.6603719329411156, + -0.5331169404120333, + -0.18759070918280746, + -0.33349585119422315, + -0.14040231358589209, + -0.6707813924187167, + 0.09490368674317282, + -0.6887859650871697 + ], + "n": 600, + "seed": 11, + "objective": 0.3595785853955624 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.84, + "false_empty": 0.20833333333333334, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.8158333333333333, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.025_s11": { + "fit": { + "mean": [ + 0.5015424178044001, + 0.4714737847906246, + 0.11389586367034367, + 0.13363567570149162, + 0.09408341793634518, + 0.17347583433652528, + 0.5716982044223257 + ], + "std": [ + 0.36126899155282666, + 0.3544875965682152, + 0.12773152771970145, + 0.11427286883640543, + 0.1471871839074244, + 0.15406591893390165, + 0.5859041019481278 + ], + "coef": [ + -0.6603719329411156, + -0.5331169404120333, + -0.18759070918280746, + -0.33349585119422315, + -0.14040231358589209, + -0.6707813924187167, + 0.09490368674317282, + -0.6887859650871697 + ], + "n": 600, + "seed": 11, + "objective": 0.3595785853955624 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.84, + "false_empty": 0.20833333333333334, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.8158333333333333, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.05_s11": { + "fit": { + "mean": [ + 0.5015424178044001, + 0.4714737847906246, + 0.11389586367034367, + 0.13363567570149162, + 0.09408341793634518, + 0.17347583433652528, + 0.5716982044223257 + ], + "std": [ + 0.36126899155282666, + 0.3544875965682152, + 0.12773152771970145, + 0.11427286883640543, + 0.1471871839074244, + 0.15406591893390165, + 0.5859041019481278 + ], + "coef": [ + -0.6603719329411156, + -0.5331169404120333, + -0.18759070918280746, + -0.33349585119422315, + -0.14040231358589209, + -0.6707813924187167, + 0.09490368674317282, + -0.6887859650871697 + ], + "n": 600, + "seed": 11, + "objective": 0.3595785853955624 + }, + "operating_point": { + "threshold": 0.42500000000000004, + "no_target_accuracy": 0.8833333333333333, + "false_empty": 0.215, + "additional_false_abstention": 0.006666666666666667, + "balanced_accuracy": 0.8341666666666666, + "groups": { + "one": { + "n": 300, + "k": 2, + "upper": 0.04536451800069909 + }, + "multi": { + "n": 300, + "k": 2, + "upper": 0.04536451800069909 + } + }, + "worst_upper": 0.04536451800069909 + }, + "calibration_domain": "natural" + }, + "constrained_0.1_s11": { + "fit": { + "mean": [ + 0.5015424178044001, + 0.4714737847906246, + 0.11389586367034367, + 0.13363567570149162, + 0.09408341793634518, + 0.17347583433652528, + 0.5716982044223257 + ], + "std": [ + 0.36126899155282666, + 0.3544875965682152, + 0.12773152771970145, + 0.11427286883640543, + 0.1471871839074244, + 0.15406591893390165, + 0.5859041019481278 + ], + "coef": [ + -0.6603719329411156, + -0.5331169404120333, + -0.18759070918280746, + -0.33349585119422315, + -0.14040231358589209, + -0.6707813924187167, + 0.09490368674317282, + -0.6887859650871697 + ], + "n": 600, + "seed": 11, + "objective": 0.3595785853955624 + }, + "operating_point": { + "threshold": 0.37500000000000006, + "no_target_accuracy": 0.8966666666666666, + "false_empty": 0.23, + "additional_false_abstention": 0.021666666666666667, + "balanced_accuracy": 0.8333333333333333, + "groups": { + "one": { + "n": 300, + "k": 7, + "upper": 0.07435050387562189 + }, + "multi": { + "n": 300, + "k": 6, + "upper": 0.06900455157366044 + } + }, + "worst_upper": 0.07435050387562189 + }, + "calibration_domain": "natural" + }, + "source_unconstrained_s23": { + "fit": { + "mean": [ + 0.8391820983886719, + 0.778040691152215, + 0.10720404549074966, + 0.1398444210201845, + 0.030384609375000052, + 0.2377099670357768, + 1.5240401785537392 + ], + "std": [ + 0.10672496143760966, + 0.1285368475140201, + 0.07411456654853174, + 0.03822296078007495, + 0.021662704332852906, + 0.1316941265607001, + 0.3796777212038087 + ], + "coef": [ + -0.358716671878209, + -0.22916001574799533, + -0.09477192927807912, + -0.23962184838077555, + -0.13044351540795662, + -0.06647432903677836, + -0.22052513023586692, + -0.2731501218498914 + ], + "n": 2000, + "seed": 23, + "objective": 0.5948243891269618 + }, + "operating_point": { + "threshold": 0.5, + "no_target_accuracy": 0.684887459807074, + "false_empty": 0.3487270574304322, + "additional_false_abstention": 0.3469508584961516, + "balanced_accuracy": 0.6680802011883209, + "groups": { + "one": { + "n": 489, + "k": 279, + "upper": null + }, + "multi": { + "n": 1200, + "k": 307, + "upper": null + } + }, + "worst_upper": null + }, + "calibration_domain": "controlled" + }, + "target_unconstrained_s23": { + "fit": { + "mean": [ + 0.5084292280673981, + 0.47864531974445207, + 0.11470049496746311, + 0.1342902636906995, + 0.09617085851305274, + 0.1708630231832492, + 0.5471226172169643 + ], + "std": [ + 0.35871510413082686, + 0.35229313567585574, + 0.13255273639603238, + 0.11435373108420124, + 0.15787504664421792, + 0.15402107134736776, + 0.543262608484715 + ], + "coef": [ + -0.4070141205337859, + -0.2390994970631189, + -0.37453079583600224, + -0.4285994400659532, + -0.13898575033362645, + -0.8454116900821796, + 0.15346434148337812, + -0.6166584134011008 + ], + "n": 600, + "seed": 23, + "objective": 0.4174820256520612 + }, + "operating_point": { + "threshold": 0.525, + "no_target_accuracy": 0.89, + "false_empty": 0.21833333333333332, + "additional_false_abstention": 0.01, + "balanced_accuracy": 0.8358333333333334, + "groups": { + "one": { + "n": 300, + "k": 4, + "upper": 0.05776459257089124 + }, + "multi": { + "n": 300, + "k": 2, + "upper": 0.04536451800069909 + } + }, + "worst_upper": 0.05776459257089124 + }, + "calibration_domain": "natural" + }, + "constrained_0.01_s23": { + "fit": { + "mean": [ + 0.5084292280673981, + 0.47864531974445207, + 0.11470049496746311, + 0.1342902636906995, + 0.09617085851305274, + 0.1708630231832492, + 0.5471226172169643 + ], + "std": [ + 0.35871510413082686, + 0.35229313567585574, + 0.13255273639603238, + 0.11435373108420124, + 0.15787504664421792, + 0.15402107134736776, + 0.543262608484715 + ], + "coef": [ + -0.4070141205337859, + -0.2390994970631189, + -0.37453079583600224, + -0.4285994400659532, + -0.13898575033362645, + -0.8454116900821796, + 0.15346434148337812, + -0.6166584134011008 + ], + "n": 600, + "seed": 23, + "objective": 0.4174820256520612 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.84, + "false_empty": 0.20833333333333334, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.8158333333333333, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.025_s23": { + "fit": { + "mean": [ + 0.5084292280673981, + 0.47864531974445207, + 0.11470049496746311, + 0.1342902636906995, + 0.09617085851305274, + 0.1708630231832492, + 0.5471226172169643 + ], + "std": [ + 0.35871510413082686, + 0.35229313567585574, + 0.13255273639603238, + 0.11435373108420124, + 0.15787504664421792, + 0.15402107134736776, + 0.543262608484715 + ], + "coef": [ + -0.4070141205337859, + -0.2390994970631189, + -0.37453079583600224, + -0.4285994400659532, + -0.13898575033362645, + -0.8454116900821796, + 0.15346434148337812, + -0.6166584134011008 + ], + "n": 600, + "seed": 23, + "objective": 0.4174820256520612 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.84, + "false_empty": 0.20833333333333334, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.8158333333333333, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.05_s23": { + "fit": { + "mean": [ + 0.5084292280673981, + 0.47864531974445207, + 0.11470049496746311, + 0.1342902636906995, + 0.09617085851305274, + 0.1708630231832492, + 0.5471226172169643 + ], + "std": [ + 0.35871510413082686, + 0.35229313567585574, + 0.13255273639603238, + 0.11435373108420124, + 0.15787504664421792, + 0.15402107134736776, + 0.543262608484715 + ], + "coef": [ + -0.4070141205337859, + -0.2390994970631189, + -0.37453079583600224, + -0.4285994400659532, + -0.13898575033362645, + -0.8454116900821796, + 0.15346434148337812, + -0.6166584134011008 + ], + "n": 600, + "seed": 23, + "objective": 0.4174820256520612 + }, + "operating_point": { + "threshold": 0.55, + "no_target_accuracy": 0.88, + "false_empty": 0.215, + "additional_false_abstention": 0.006666666666666667, + "balanced_accuracy": 0.8324999999999999, + "groups": { + "one": { + "n": 300, + "k": 2, + "upper": 0.04536451800069909 + }, + "multi": { + "n": 300, + "k": 2, + "upper": 0.04536451800069909 + } + }, + "worst_upper": 0.04536451800069909 + }, + "calibration_domain": "natural" + }, + "constrained_0.1_s23": { + "fit": { + "mean": [ + 0.5084292280673981, + 0.47864531974445207, + 0.11470049496746311, + 0.1342902636906995, + 0.09617085851305274, + 0.1708630231832492, + 0.5471226172169643 + ], + "std": [ + 0.35871510413082686, + 0.35229313567585574, + 0.13255273639603238, + 0.11435373108420124, + 0.15787504664421792, + 0.15402107134736776, + 0.543262608484715 + ], + "coef": [ + -0.4070141205337859, + -0.2390994970631189, + -0.37453079583600224, + -0.4285994400659532, + -0.13898575033362645, + -0.8454116900821796, + 0.15346434148337812, + -0.6166584134011008 + ], + "n": 600, + "seed": 23, + "objective": 0.4174820256520612 + }, + "operating_point": { + "threshold": 0.47500000000000003, + "no_target_accuracy": 0.9, + "false_empty": 0.23333333333333334, + "additional_false_abstention": 0.025, + "balanced_accuracy": 0.8333333333333333, + "groups": { + "one": { + "n": 300, + "k": 10, + "upper": 0.08964139999888031 + }, + "multi": { + "n": 300, + "k": 5, + "upper": 0.06349036004632064 + } + }, + "worst_upper": 0.08964139999888031 + }, + "calibration_domain": "natural" + }, + "source_unconstrained_s37": { + "fit": { + "mean": [ + 0.8360155029296875, + 0.7719024577438831, + 0.10606483487041872, + 0.13908543020514297, + 0.03078948730468758, + 0.23565776607418393, + 1.5060522236073939 + ], + "std": [ + 0.10998501052915341, + 0.13487315977437211, + 0.07364544515138068, + 0.04041703905350979, + 0.0260738196895078, + 0.1295465981792341, + 0.39119860707244225 + ], + "coef": [ + -0.5118173551204541, + -0.0023749916240237987, + -0.1616776113913672, + -0.281098999860794, + 0.02080600931668198, + 0.16158757777824662, + -0.3591449394147214, + -0.26064129002245556 + ], + "n": 2000, + "seed": 37, + "objective": 0.594056245383604 + }, + "operating_point": { + "threshold": 0.5, + "no_target_accuracy": 0.6655948553054662, + "false_empty": 0.3173475429248076, + "additional_false_abstention": 0.31557134399052694, + "balanced_accuracy": 0.6741236561903293, + "groups": { + "one": { + "n": 489, + "k": 243, + "upper": null + }, + "multi": { + "n": 1200, + "k": 290, + "upper": null + } + }, + "worst_upper": null + }, + "calibration_domain": "controlled" + }, + "target_unconstrained_s37": { + "fit": { + "mean": [ + 0.48570648392041527, + 0.45444671418977606, + 0.10837801467266729, + 0.12868642440198272, + 0.08487821860548236, + 0.16901173386097168, + 0.5602192634401018 + ], + "std": [ + 0.3577295479500529, + 0.34972389503904106, + 0.1210101139209845, + 0.11437991243887455, + 0.13218928634687935, + 0.1526589257426797, + 0.5675365239846154 + ], + "coef": [ + -0.6884571927624109, + -0.5843428996473921, + -0.12487957994884527, + -0.1797758485994477, + -0.04326495643195592, + -0.5396071845097817, + -0.06832139846085379, + -0.6247087077239178 + ], + "n": 600, + "seed": 37, + "objective": 0.37464974705939796 + }, + "operating_point": { + "threshold": 0.37500000000000006, + "no_target_accuracy": 0.8766666666666667, + "false_empty": 0.21166666666666667, + "additional_false_abstention": 0.0033333333333333335, + "balanced_accuracy": 0.8325, + "groups": { + "one": { + "n": 300, + "k": 2, + "upper": 0.04536451800069909 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.030102672726029428 + } + }, + "worst_upper": 0.04536451800069909 + }, + "calibration_domain": "natural" + }, + "constrained_0.01_s37": { + "fit": { + "mean": [ + 0.48570648392041527, + 0.45444671418977606, + 0.10837801467266729, + 0.12868642440198272, + 0.08487821860548236, + 0.16901173386097168, + 0.5602192634401018 + ], + "std": [ + 0.3577295479500529, + 0.34972389503904106, + 0.1210101139209845, + 0.11437991243887455, + 0.13218928634687935, + 0.1526589257426797, + 0.5675365239846154 + ], + "coef": [ + -0.6884571927624109, + -0.5843428996473921, + -0.12487957994884527, + -0.1797758485994477, + -0.04326495643195592, + -0.5396071845097817, + -0.06832139846085379, + -0.6247087077239178 + ], + "n": 600, + "seed": 37, + "objective": 0.37464974705939796 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.84, + "false_empty": 0.20833333333333334, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.8158333333333333, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.025_s37": { + "fit": { + "mean": [ + 0.48570648392041527, + 0.45444671418977606, + 0.10837801467266729, + 0.12868642440198272, + 0.08487821860548236, + 0.16901173386097168, + 0.5602192634401018 + ], + "std": [ + 0.3577295479500529, + 0.34972389503904106, + 0.1210101139209845, + 0.11437991243887455, + 0.13218928634687935, + 0.1526589257426797, + 0.5675365239846154 + ], + "coef": [ + -0.6884571927624109, + -0.5843428996473921, + -0.12487957994884527, + -0.1797758485994477, + -0.04326495643195592, + -0.5396071845097817, + -0.06832139846085379, + -0.6247087077239178 + ], + "n": 600, + "seed": 37, + "objective": 0.37464974705939796 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.84, + "false_empty": 0.20833333333333334, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.8158333333333333, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.05_s37": { + "fit": { + "mean": [ + 0.48570648392041527, + 0.45444671418977606, + 0.10837801467266729, + 0.12868642440198272, + 0.08487821860548236, + 0.16901173386097168, + 0.5602192634401018 + ], + "std": [ + 0.3577295479500529, + 0.34972389503904106, + 0.1210101139209845, + 0.11437991243887455, + 0.13218928634687935, + 0.1526589257426797, + 0.5675365239846154 + ], + "coef": [ + -0.6884571927624109, + -0.5843428996473921, + -0.12487957994884527, + -0.1797758485994477, + -0.04326495643195592, + -0.5396071845097817, + -0.06832139846085379, + -0.6247087077239178 + ], + "n": 600, + "seed": 37, + "objective": 0.37464974705939796 + }, + "operating_point": { + "threshold": 0.37500000000000006, + "no_target_accuracy": 0.8766666666666667, + "false_empty": 0.21166666666666667, + "additional_false_abstention": 0.0033333333333333335, + "balanced_accuracy": 0.8325, + "groups": { + "one": { + "n": 300, + "k": 2, + "upper": 0.04536451800069909 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.030102672726029428 + } + }, + "worst_upper": 0.04536451800069909 + }, + "calibration_domain": "natural" + }, + "constrained_0.1_s37": { + "fit": { + "mean": [ + 0.48570648392041527, + 0.45444671418977606, + 0.10837801467266729, + 0.12868642440198272, + 0.08487821860548236, + 0.16901173386097168, + 0.5602192634401018 + ], + "std": [ + 0.3577295479500529, + 0.34972389503904106, + 0.1210101139209845, + 0.11437991243887455, + 0.13218928634687935, + 0.1526589257426797, + 0.5675365239846154 + ], + "coef": [ + -0.6884571927624109, + -0.5843428996473921, + -0.12487957994884527, + -0.1797758485994477, + -0.04326495643195592, + -0.5396071845097817, + -0.06832139846085379, + -0.6247087077239178 + ], + "n": 600, + "seed": 37, + "objective": 0.37464974705939796 + }, + "operating_point": { + "threshold": 0.30000000000000004, + "no_target_accuracy": 0.89, + "false_empty": 0.23166666666666666, + "additional_false_abstention": 0.023333333333333334, + "balanced_accuracy": 0.8291666666666667, + "groups": { + "one": { + "n": 300, + "k": 7, + "upper": 0.07435050387562189 + }, + "multi": { + "n": 300, + "k": 7, + "upper": 0.07435050387562189 + } + }, + "worst_upper": 0.07435050387562189 + }, + "calibration_domain": "natural" + } + }, + "groundedsam": { + "source_unconstrained_s11": { + "fit": { + "mean": [ + 0.641458984375, + 0.6408854662179947, + 0.04759816755056397, + 0.15021454208632146, + 0.0715456640625, + 0.05950990775172998, + 2.058123769986693 + ], + "std": [ + 0.08128754809837326, + 0.08138053754339825, + 0.029043028440135933, + 0.031470458769484316, + 0.03176621538404346, + 0.05473623489028933, + 0.26112381317715927 + ], + "coef": [ + -0.10496386840436753, + -0.17486032259170203, + -0.1099922045462895, + -0.24059008711979546, + 0.09068267564581685, + 0.07152704653854318, + 0.8000118586417687, + -0.17640857693727113 + ], + "n": 2000, + "seed": 11, + "objective": 0.6380682373073701 + }, + "operating_point": { + "threshold": 0.45000000000000007, + "no_target_accuracy": 0.8006430868167203, + "false_empty": 0.4937833037300178, + "additional_false_abstention": 0.4937833037300178, + "balanced_accuracy": 0.6534298915433512, + "groups": { + "one": { + "n": 489, + "k": 235, + "upper": null + }, + "multi": { + "n": 1200, + "k": 599, + "upper": null + } + }, + "worst_upper": null + }, + "calibration_domain": "controlled" + }, + "target_unconstrained_s11": { + "fit": { + "mean": [ + 0.44968994140625, + 0.4449939513922457, + 0.09721875431768448, + 0.15654143634016326, + 0.23365159811845446, + 0.15004678469090774, + 1.1491512984678594 + ], + "std": [ + 0.16610147120919713, + 0.1697277184270685, + 0.07607881580836127, + 0.06912738317467426, + 0.1874731303429586, + 0.12124508390755155, + 0.5791053661597975 + ], + "coef": [ + 0.003362432671397872, + -0.4493155755783402, + 0.11774447032031127, + -0.17586109454889565, + 0.029972688868478155, + -0.012716454235217079, + -0.3371120876102626, + -0.05651224175568341 + ], + "n": 600, + "seed": 11, + "objective": 0.6397625645959264 + }, + "operating_point": { + "threshold": 0.55, + "no_target_accuracy": 0.48333333333333334, + "false_empty": 0.16166666666666665, + "additional_false_abstention": 0.15333333333333332, + "balanced_accuracy": 0.6608333333333334, + "groups": { + "one": { + "n": 300, + "k": 39, + "upper": 0.21514235598279335 + }, + "multi": { + "n": 300, + "k": 53, + "upper": 0.26965285761740254 + } + }, + "worst_upper": 0.26965285761740254 + }, + "calibration_domain": "natural" + }, + "constrained_0.01_s11": { + "fit": { + "mean": [ + 0.44968994140625, + 0.4449939513922457, + 0.09721875431768448, + 0.15654143634016326, + 0.23365159811845446, + 0.15004678469090774, + 1.1491512984678594 + ], + "std": [ + 0.16610147120919713, + 0.1697277184270685, + 0.07607881580836127, + 0.06912738317467426, + 0.1874731303429586, + 0.12124508390755155, + 0.5791053661597975 + ], + "coef": [ + 0.003362432671397872, + -0.4493155755783402, + 0.11774447032031127, + -0.17586109454889565, + 0.029972688868478155, + -0.012716454235217079, + -0.3371120876102626, + -0.05651224175568341 + ], + "n": 600, + "seed": 11, + "objective": 0.6397625645959264 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.12, + "false_empty": 0.008333333333333333, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.5558333333333334, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.025_s11": { + "fit": { + "mean": [ + 0.44968994140625, + 0.4449939513922457, + 0.09721875431768448, + 0.15654143634016326, + 0.23365159811845446, + 0.15004678469090774, + 1.1491512984678594 + ], + "std": [ + 0.16610147120919713, + 0.1697277184270685, + 0.07607881580836127, + 0.06912738317467426, + 0.1874731303429586, + 0.12124508390755155, + 0.5791053661597975 + ], + "coef": [ + 0.003362432671397872, + -0.4493155755783402, + 0.11774447032031127, + -0.17586109454889565, + 0.029972688868478155, + -0.012716454235217079, + -0.3371120876102626, + -0.05651224175568341 + ], + "n": 600, + "seed": 11, + "objective": 0.6397625645959264 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.12, + "false_empty": 0.008333333333333333, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.5558333333333334, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.05_s11": { + "fit": { + "mean": [ + 0.44968994140625, + 0.4449939513922457, + 0.09721875431768448, + 0.15654143634016326, + 0.23365159811845446, + 0.15004678469090774, + 1.1491512984678594 + ], + "std": [ + 0.16610147120919713, + 0.1697277184270685, + 0.07607881580836127, + 0.06912738317467426, + 0.1874731303429586, + 0.12124508390755155, + 0.5791053661597975 + ], + "coef": [ + 0.003362432671397872, + -0.4493155755783402, + 0.11774447032031127, + -0.17586109454889565, + 0.029972688868478155, + -0.012716454235217079, + -0.3371120876102626, + -0.05651224175568341 + ], + "n": 600, + "seed": 11, + "objective": 0.6397625645959264 + }, + "operating_point": { + "threshold": 0.8, + "no_target_accuracy": 0.14, + "false_empty": 0.01, + "additional_false_abstention": 0.0016666666666666668, + "balanced_accuracy": 0.5650000000000001, + "groups": { + "one": { + "n": 300, + "k": 1, + "upper": 0.03835092079052197 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.030102672726029428 + } + }, + "worst_upper": 0.03835092079052197 + }, + "calibration_domain": "natural" + }, + "constrained_0.1_s11": { + "fit": { + "mean": [ + 0.44968994140625, + 0.4449939513922457, + 0.09721875431768448, + 0.15654143634016326, + 0.23365159811845446, + 0.15004678469090774, + 1.1491512984678594 + ], + "std": [ + 0.16610147120919713, + 0.1697277184270685, + 0.07607881580836127, + 0.06912738317467426, + 0.1874731303429586, + 0.12124508390755155, + 0.5791053661597975 + ], + "coef": [ + 0.003362432671397872, + -0.4493155755783402, + 0.11774447032031127, + -0.17586109454889565, + 0.029972688868478155, + -0.012716454235217079, + -0.3371120876102626, + -0.05651224175568341 + ], + "n": 600, + "seed": 11, + "objective": 0.6397625645959264 + }, + "operating_point": { + "threshold": 0.65, + "no_target_accuracy": 0.24333333333333335, + "false_empty": 0.03, + "additional_false_abstention": 0.021666666666666667, + "balanced_accuracy": 0.6066666666666667, + "groups": { + "one": { + "n": 300, + "k": 8, + "upper": 0.07955827045687726 + }, + "multi": { + "n": 300, + "k": 5, + "upper": 0.06349036004632064 + } + }, + "worst_upper": 0.07955827045687726 + }, + "calibration_domain": "natural" + }, + "source_unconstrained_s23": { + "fit": { + "mean": [ + 0.641663818359375, + 0.6410585919618607, + 0.048507769901752484, + 0.14949606126648152, + 0.07351843749999992, + 0.061678369985810146, + 2.055475261348086 + ], + "std": [ + 0.08241543133573716, + 0.08248953301059374, + 0.03291190499624753, + 0.032428732371195125, + 0.051886013676399396, + 0.06546725958855452, + 0.27902049179518235 + ], + "coef": [ + -0.16841090879414547, + -0.2743817917112898, + -0.1297898414440968, + -0.1921747681855589, + 0.1486196617309318, + 0.04832530503754795, + 0.8517262660303389, + -0.2027014844987432 + ], + "n": 2000, + "seed": 23, + "objective": 0.6289904951548342 + }, + "operating_point": { + "threshold": 0.42500000000000004, + "no_target_accuracy": 0.8392282958199357, + "false_empty": 0.5216104203670812, + "additional_false_abstention": 0.5216104203670812, + "balanced_accuracy": 0.6588089377264272, + "groups": { + "one": { + "n": 489, + "k": 263, + "upper": null + }, + "multi": { + "n": 1200, + "k": 618, + "upper": null + } + }, + "worst_upper": null + }, + "calibration_domain": "controlled" + }, + "target_unconstrained_s23": { + "fit": { + "mean": [ + 0.465224609375, + 0.4580668780397401, + 0.0983786525029341, + 0.15975370213435386, + 0.22119303275653165, + 0.1413855758100933, + 1.1292640354823744 + ], + "std": [ + 0.16903662941379005, + 0.17533252765926421, + 0.08760292219818519, + 0.07663195183514897, + 0.18666271335973458, + 0.1195923661202523, + 0.5480969929681231 + ], + "coef": [ + -0.1831538977527454, + -0.4764583485693337, + 0.38590879576996834, + -0.2503943347002802, + -0.14582416341202606, + -0.03960554111632691, + -0.31813517095712196, + -0.07765374005340507 + ], + "n": 600, + "seed": 23, + "objective": 0.6161151170064705 + }, + "operating_point": { + "threshold": 0.5750000000000001, + "no_target_accuracy": 0.4666666666666667, + "false_empty": 0.13666666666666666, + "additional_false_abstention": 0.12833333333333333, + "balanced_accuracy": 0.665, + "groups": { + "one": { + "n": 300, + "k": 31, + "upper": 0.1827477385783589 + }, + "multi": { + "n": 300, + "k": 46, + "upper": 0.24269576713303231 + } + }, + "worst_upper": 0.24269576713303231 + }, + "calibration_domain": "natural" + }, + "constrained_0.01_s23": { + "fit": { + "mean": [ + 0.465224609375, + 0.4580668780397401, + 0.0983786525029341, + 0.15975370213435386, + 0.22119303275653165, + 0.1413855758100933, + 1.1292640354823744 + ], + "std": [ + 0.16903662941379005, + 0.17533252765926421, + 0.08760292219818519, + 0.07663195183514897, + 0.18666271335973458, + 0.1195923661202523, + 0.5480969929681231 + ], + "coef": [ + -0.1831538977527454, + -0.4764583485693337, + 0.38590879576996834, + -0.2503943347002802, + -0.14582416341202606, + -0.03960554111632691, + -0.31813517095712196, + -0.07765374005340507 + ], + "n": 600, + "seed": 23, + "objective": 0.6161151170064705 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.12, + "false_empty": 0.008333333333333333, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.5558333333333334, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.025_s23": { + "fit": { + "mean": [ + 0.465224609375, + 0.4580668780397401, + 0.0983786525029341, + 0.15975370213435386, + 0.22119303275653165, + 0.1413855758100933, + 1.1292640354823744 + ], + "std": [ + 0.16903662941379005, + 0.17533252765926421, + 0.08760292219818519, + 0.07663195183514897, + 0.18666271335973458, + 0.1195923661202523, + 0.5480969929681231 + ], + "coef": [ + -0.1831538977527454, + -0.4764583485693337, + 0.38590879576996834, + -0.2503943347002802, + -0.14582416341202606, + -0.03960554111632691, + -0.31813517095712196, + -0.07765374005340507 + ], + "n": 600, + "seed": 23, + "objective": 0.6161151170064705 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.12, + "false_empty": 0.008333333333333333, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.5558333333333334, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.05_s23": { + "fit": { + "mean": [ + 0.465224609375, + 0.4580668780397401, + 0.0983786525029341, + 0.15975370213435386, + 0.22119303275653165, + 0.1413855758100933, + 1.1292640354823744 + ], + "std": [ + 0.16903662941379005, + 0.17533252765926421, + 0.08760292219818519, + 0.07663195183514897, + 0.18666271335973458, + 0.1195923661202523, + 0.5480969929681231 + ], + "coef": [ + -0.1831538977527454, + -0.4764583485693337, + 0.38590879576996834, + -0.2503943347002802, + -0.14582416341202606, + -0.03960554111632691, + -0.31813517095712196, + -0.07765374005340507 + ], + "n": 600, + "seed": 23, + "objective": 0.6161151170064705 + }, + "operating_point": { + "threshold": 0.775, + "no_target_accuracy": 0.14666666666666667, + "false_empty": 0.01, + "additional_false_abstention": 0.0016666666666666668, + "balanced_accuracy": 0.5683333333333334, + "groups": { + "one": { + "n": 300, + "k": 1, + "upper": 0.03835092079052197 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.030102672726029428 + } + }, + "worst_upper": 0.03835092079052197 + }, + "calibration_domain": "natural" + }, + "constrained_0.1_s23": { + "fit": { + "mean": [ + 0.465224609375, + 0.4580668780397401, + 0.0983786525029341, + 0.15975370213435386, + 0.22119303275653165, + 0.1413855758100933, + 1.1292640354823744 + ], + "std": [ + 0.16903662941379005, + 0.17533252765926421, + 0.08760292219818519, + 0.07663195183514897, + 0.18666271335973458, + 0.1195923661202523, + 0.5480969929681231 + ], + "coef": [ + -0.1831538977527454, + -0.4764583485693337, + 0.38590879576996834, + -0.2503943347002802, + -0.14582416341202606, + -0.03960554111632691, + -0.31813517095712196, + -0.07765374005340507 + ], + "n": 600, + "seed": 23, + "objective": 0.6161151170064705 + }, + "operating_point": { + "threshold": 0.675, + "no_target_accuracy": 0.25333333333333335, + "false_empty": 0.03, + "additional_false_abstention": 0.021666666666666667, + "balanced_accuracy": 0.6116666666666667, + "groups": { + "one": { + "n": 300, + "k": 9, + "upper": 0.08464972781669715 + }, + "multi": { + "n": 300, + "k": 4, + "upper": 0.05776459257089124 + } + }, + "worst_upper": 0.08464972781669715 + }, + "calibration_domain": "natural" + }, + "source_unconstrained_s37": { + "fit": { + "mean": [ + 0.6417562255859375, + 0.64113734292984, + 0.046725765646696074, + 0.1495751082134358, + 0.071641484375, + 0.05812688976027355, + 2.0561143829074946 + ], + "std": [ + 0.08073071667402458, + 0.08088385011327055, + 0.026960718839949514, + 0.03136310904347598, + 0.043599086219127524, + 0.0499379266388075, + 0.2605713557022702 + ], + "coef": [ + -0.23383562298160437, + -0.2825767142405846, + -0.05383499803157606, + -0.08583077831269155, + 0.03051900445842073, + 0.052993246119375774, + 0.8011103614120435, + -0.18809107761926058 + ], + "n": 2000, + "seed": 37, + "objective": 0.6329357057177584 + }, + "operating_point": { + "threshold": 0.42500000000000004, + "no_target_accuracy": 0.8327974276527331, + "false_empty": 0.5186500888099467, + "additional_false_abstention": 0.5186500888099467, + "balanced_accuracy": 0.6570736694213932, + "groups": { + "one": { + "n": 489, + "k": 263, + "upper": null + }, + "multi": { + "n": 1200, + "k": 613, + "upper": null + } + }, + "worst_upper": null + }, + "calibration_domain": "controlled" + }, + "target_unconstrained_s37": { + "fit": { + "mean": [ + 0.45434163411458334, + 0.44776201027862345, + 0.09222285126141988, + 0.15517236279957003, + 0.2136820477809925, + 0.13773648086930482, + 1.1288069298251606 + ], + "std": [ + 0.16953731761373717, + 0.17476260953101724, + 0.07829860989985632, + 0.07129493719603311, + 0.17880388325264063, + 0.11572997311416346, + 0.567290152339824 + ], + "coef": [ + 0.02703517795648806, + -0.5250307681246404, + 0.35035113659142125, + -0.15186478826975358, + -0.05254153768756918, + -0.12268724505835413, + -0.4248228286801602, + -0.059755949377872125 + ], + "n": 600, + "seed": 37, + "objective": 0.63068089990023 + }, + "operating_point": { + "threshold": 0.55, + "no_target_accuracy": 0.48333333333333334, + "false_empty": 0.17166666666666666, + "additional_false_abstention": 0.16333333333333333, + "balanced_accuracy": 0.6558333333333334, + "groups": { + "one": { + "n": 300, + "k": 41, + "upper": 0.2230823864718417 + }, + "multi": { + "n": 300, + "k": 57, + "upper": 0.2848256819090087 + } + }, + "worst_upper": 0.2848256819090087 + }, + "calibration_domain": "natural" + }, + "constrained_0.01_s37": { + "fit": { + "mean": [ + 0.45434163411458334, + 0.44776201027862345, + 0.09222285126141988, + 0.15517236279957003, + 0.2136820477809925, + 0.13773648086930482, + 1.1288069298251606 + ], + "std": [ + 0.16953731761373717, + 0.17476260953101724, + 0.07829860989985632, + 0.07129493719603311, + 0.17880388325264063, + 0.11572997311416346, + 0.567290152339824 + ], + "coef": [ + 0.02703517795648806, + -0.5250307681246404, + 0.35035113659142125, + -0.15186478826975358, + -0.05254153768756918, + -0.12268724505835413, + -0.4248228286801602, + -0.059755949377872125 + ], + "n": 600, + "seed": 37, + "objective": 0.63068089990023 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.12, + "false_empty": 0.008333333333333333, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.5558333333333334, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.025_s37": { + "fit": { + "mean": [ + 0.45434163411458334, + 0.44776201027862345, + 0.09222285126141988, + 0.15517236279957003, + 0.2136820477809925, + 0.13773648086930482, + 1.1288069298251606 + ], + "std": [ + 0.16953731761373717, + 0.17476260953101724, + 0.07829860989985632, + 0.07129493719603311, + 0.17880388325264063, + 0.11572997311416346, + 0.567290152339824 + ], + "coef": [ + 0.02703517795648806, + -0.5250307681246404, + 0.35035113659142125, + -0.15186478826975358, + -0.05254153768756918, + -0.12268724505835413, + -0.4248228286801602, + -0.059755949377872125 + ], + "n": 600, + "seed": 37, + "objective": 0.63068089990023 + }, + "operating_point": { + "threshold": 1.001, + "no_target_accuracy": 0.12, + "false_empty": 0.008333333333333333, + "additional_false_abstention": 0.0, + "balanced_accuracy": 0.5558333333333334, + "groups": { + "one": { + "n": 300, + "k": 0, + "upper": 0.0 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.0 + } + }, + "worst_upper": 0.0 + }, + "calibration_domain": "natural" + }, + "constrained_0.05_s37": { + "fit": { + "mean": [ + 0.45434163411458334, + 0.44776201027862345, + 0.09222285126141988, + 0.15517236279957003, + 0.2136820477809925, + 0.13773648086930482, + 1.1288069298251606 + ], + "std": [ + 0.16953731761373717, + 0.17476260953101724, + 0.07829860989985632, + 0.07129493719603311, + 0.17880388325264063, + 0.11572997311416346, + 0.567290152339824 + ], + "coef": [ + 0.02703517795648806, + -0.5250307681246404, + 0.35035113659142125, + -0.15186478826975358, + -0.05254153768756918, + -0.12268724505835413, + -0.4248228286801602, + -0.059755949377872125 + ], + "n": 600, + "seed": 37, + "objective": 0.63068089990023 + }, + "operating_point": { + "threshold": 0.775, + "no_target_accuracy": 0.14666666666666667, + "false_empty": 0.011666666666666667, + "additional_false_abstention": 0.0033333333333333335, + "balanced_accuracy": 0.5675, + "groups": { + "one": { + "n": 300, + "k": 2, + "upper": 0.04536451800069909 + }, + "multi": { + "n": 300, + "k": 0, + "upper": 0.030102672726029428 + } + }, + "worst_upper": 0.04536451800069909 + }, + "calibration_domain": "natural" + }, + "constrained_0.1_s37": { + "fit": { + "mean": [ + 0.45434163411458334, + 0.44776201027862345, + 0.09222285126141988, + 0.15517236279957003, + 0.2136820477809925, + 0.13773648086930482, + 1.1288069298251606 + ], + "std": [ + 0.16953731761373717, + 0.17476260953101724, + 0.07829860989985632, + 0.07129493719603311, + 0.17880388325264063, + 0.11572997311416346, + 0.567290152339824 + ], + "coef": [ + 0.02703517795648806, + -0.5250307681246404, + 0.35035113659142125, + -0.15186478826975358, + -0.05254153768756918, + -0.12268724505835413, + -0.4248228286801602, + -0.059755949377872125 + ], + "n": 600, + "seed": 37, + "objective": 0.63068089990023 + }, + "operating_point": { + "threshold": 0.65, + "no_target_accuracy": 0.24, + "false_empty": 0.03333333333333333, + "additional_false_abstention": 0.025, + "balanced_accuracy": 0.6033333333333333, + "groups": { + "one": { + "n": 300, + "k": 10, + "upper": 0.08964139999888031 + }, + "multi": { + "n": 300, + "k": 5, + "upper": 0.06349036004632064 + } + }, + "worst_upper": 0.08964139999888031 + }, + "calibration_domain": "natural" + } + } +} \ No newline at end of file diff --git a/source/protocol/HF_DATA_CARD.md b/source/protocol/HF_DATA_CARD.md new file mode 100644 index 0000000000000000000000000000000000000000..2b9d9d66ed5ac691bcd9b6efb0d05a5fc44335b6 --- /dev/null +++ b/source/protocol/HF_DATA_CARD.md @@ -0,0 +1,67 @@ +--- +pretty_name: RefSeg-CA paired command-compliance benchmark +language: +- en +task_categories: +- image-segmentation +tags: +- referring-expression-segmentation +- command-compliance +- synthetic +- image +- reproducibility +size_categories: +- 1K/` layout: flat/rich images, instance labels, and 12 command masks per scene. `manifests/` contains complete synthetic records and a natural benchmark index. `DATA_MANIFEST.json` records SHA-256 values and byte counts. + +`results/primary-and-review-metrics.tar.gz` contains the exact primary score records and reviewer replay traces. These reproduce the reported metrics without cluster access. They do not replace a pixel-level model rerun. + +Browse the [source code and editable manuscript](https://huggingface.co/datasets/Ethosoft/RefSeg-CA/tree/main/source) file by file, or download [RefSeg_CA_R3_Public_Source.zip](release/RefSeg_CA_R3_Public_Source.zip). The current draft is [RefSeg_CA_MVA.pdf](release/RefSeg_CA_MVA.pdf). Code and data are hosted together under the Ethosoft organization on Hugging Face. + +## Construction and evaluation + +Inputs are deterministically rendered with Pillow from scene graphs using seeds 11, 23, 37, 53, and 71. Images are 384×384 RGB. Shapes include circles, squares, triangles, stars, crosses, ellipses, capsules, hearts, diamonds, rings, and hexagons. Rich rendering changes texture, shading, and shadows while preserving target geometry. These are procedural raster inputs, not AI-generated illustrations or TikZ scenes. + +Command families: attribute, relation, multiplicity, negative action, valid empty target, and paraphrase. The main paired-correctness table uses the first three and valid empty targets; action and paraphrase are analyzed separately. This is an evaluation-only split. Do not tune a proposed method on these records and then describe the same records as an untouched test set. + +On the natural benchmark the primary scope guard accepts 3.15% of expressions. SFAP's pooled gIoU gains are approximately 0.108/0.072 percentage points for CLIPSeg/Grounded SAM. Harmful interventions remain non-negligible; a positive mean is not a per-example reliability guarantee. Trained ReLA is contextual, not a ReLA+SFAP experiment. + +## Natural data, models, and reuse + +Original COCO image pixels and natural gRefCOCO expression text are not redistributed here. Obtain them from [the gRefCOCO authors](https://huggingface.co/datasets/FudanCVL/gRefCOCO) using revision `81eede59b3ac070049f597d023c0ff08d1fb80e9` and their documented image sources. The natural index preserves expression/reference/image IDs for reconstruction. Model weights also remain with their original publishers; preparation scripts pin revisions and verify hashes. + +The authors have not yet assigned a blanket reuse license to original project code or procedural data. This public release provides access for inspection and reproducibility; it does not relicense upstream material. No DOI has been assigned. + +## Human validation status + +No independent human annotations, inter-annotator agreement, or adjudicated parser-accuracy estimates are claimed. A 600-expression stratified protocol and a separate 120-case harmful-intervention audit are prepared. Reader expertise and dates must be actual observations, and AI-generated labels must not be described as human labels. + +## Citation + +See `CITATION.cff` in the source archive. Cite the manuscript as an unpublished R3 research release and cite the GRES/gRefCOCO, CLIPSeg, Grounded SAM, and ReLA sources as appropriate for the components used. diff --git a/source/protocol/R2_ANALYSIS_PLAN.md b/source/protocol/R2_ANALYSIS_PLAN.md new file mode 100644 index 0000000000000000000000000000000000000000..de5d6a6d860ef3a585e9766679735f2596a004ac --- /dev/null +++ b/source/protocol/R2_ANALYSIS_PLAN.md @@ -0,0 +1,89 @@ +# Revision 2 analysis lock — 6 September 2026 + +This is a within-project analysis lock, not an externally registered study. +Phase 1 findings and reviewer reports were already available. No R2 evaluation +predictions had been observed when this file was written. + +## Evidence hierarchy + +1. Integrate RefSeg-CA's original distinction between mask overlap, command + compliance and same-scene responsiveness. Preserve five instruction regimes. +2. Earlier rejected manuscripts are unpublished development versions of this + work. Their aggregate tables are author-reported historical evidence, not + new replications, published prior art, or independent statistical samples. +3. Preserve the executed 49,800-record Phase 1 campaign and its negative + counterfactual and natural-domain findings. +4. R2 evaluates all 49,492 official val/testA/testB expressions on 3,000 images, + including duplicate strings as separate official sentence records. +5. Add official ReLA Swin-Tiny weights, subject to verified checkpoint loading + and a reproducible inference/metric implementation. No model retraining is + claimed. All three systems are evaluated on the new rich synthetic suite. + +## Primary method and contrasts + +The main method is clause-safe anchor projection: the existing anchor-only +projection plus a text-only scope guard. The counterfactual branch is an ablation, +not a claimed new source of improvement. The guard rejects nested/modifying +clauses and exact cardinalities unsupported by the parser. Accepted queries +require at most three unique model calls; action negation requires one. +No test-score-driven threshold or parser changes will be made after R2 runs. + +Phase 1 primary contrasts: CACP minus frozen; CACP minus global direction; +CACP minus anchor-gate, each for two models. Use 99.1667% marginal bootstrap +intervals (Bonferroni family of six) alongside previously reported pointwise +intervals. Other tables are descriptive, not multiple confirmatory tests. + +R2 reports all fixed variants, including failures. Primary practical summaries: +clause-safe anchor minus frozen on all natural expressions and on accepted +expressions; PC@0.5 and single-expression Pr@0.5 on the rich suite. Report +official split metrics, not only pooled or accepted-subset improvements. + +## New visual domain + +Generate 1,200 scenes (five seeds, 240 scenes each), 384x384 pixels. Use two +paired render conditions per scene: flat and rich. Both share geometry, masks, +queries and scene IDs; rich adds surface textures, shadows, and background +texture. Targets and anchors occupy unrestricted sampled positions; multiple +shapes, rotations, sizes and partial occlusions are included. The scene graph +defines visible-instance masks before queries are authored. Instances with +less than 70% visible area are resampled. Query families: attribute, relational, +multi-target, negative action, empty target, and paraphrase. Twelve expressions +per scene and rendering yield 28,800 records per model. All are test-only; no +threshold fitting uses this suite. The generator is still a controlled synthetic +test and is not described as independent natural-domain validation. + +## Statistics and audit + +Resample entire images/scenes, preserving paired methods and rendering variants. +For unequal expression counts, bootstrap sums and counts to retain the +expression-weighted estimand. Natural resampling is stratified by official +split. Report gIoU, cIoU, Nacc, positive mIoU, false-empty rate, supported +coverage, helped/harmed/tied counts, and exact mask-change counts. +Use a two-sided exact sign test on changed positive/negative IoU differences +as a descriptive audit; it does not replace image-cluster uncertainty. + +Publish accepted/rejected parse examples and a text-only audit sheet. Any +assistant inspection is labelled AI-assisted; independent human adjudication +is pending unless actually supplied. No invented human agreement statistic. +Replay counterfactual weight {0,.25,.5,1} and geometry margin {0,.015,.03,.06} +on frozen cached Phase 1 outputs. This is post hoc sensitivity, not tuning. +State why plural no-gate projections are analytically invariant to score rank. + +## Metrics and cost + +Match ReLA's official 480x480 transformed-polygon GT and native no-target head. +For other interfaces, resize predicted binary masks to that evaluation grid; +their no-target decision is an empty output mask. Also report original-grid +results separately. Preserve the official union convention when the native +no-target head rejects a positive example. Distinguish model interface and +evaluation grid from training superiority claims. +Count unique image/text queries, and run paired warmed timings on the same +GPU for original-only, anchor-only and counterfactual plans. Do not infer +per-method speed from aggregate campaign wall time. + +## Integrity + +Retain official split composition, including the absence of single-target +validation records in this release. Check calibration/test image disjointness. +No journal acceptance, quartile, novelty priority, funding, conflicts of +interest, author approval, or human audit outcome is asserted without evidence. diff --git a/source/protocol/R3_REVIEW_ANALYSIS_PLAN.md b/source/protocol/R3_REVIEW_ANALYSIS_PLAN.md new file mode 100644 index 0000000000000000000000000000000000000000..c46826565e937f03b9647228ad55960414f571cc --- /dev/null +++ b/source/protocol/R3_REVIEW_ANALYSIS_PLAN.md @@ -0,0 +1,12 @@ +# Reviewer-requested exploratory analyses + +The R2 SFAP operating point remains primary. The following diagnostics were specified after the R2 results and reviewer report were available; they are not prospective confirmatory tests and are not used to select a new reported primary rule. + +1. Four nested text-only scopes: short simple relations (target and anchor at most three tokens); all SFAP-safe simple relations; primary scope; legacy supported grammar. Reuse identical cached anchor-only predictions. Count accepted expressions, pixel changes, helpful/harmful/tied IoU outcomes, pooled and conditional gIoU changes. +2. One-factor-at-a-time replay on all 1,557 primary-accepted natural expressions: anchor and target margins {0.02, 0.05, 0.10}; geometry {0.01, 0.03, 0.05}; component-size factor {0.5, 1, 2}; dense-map threshold native +/-0.05. Grounding-DINO box/text thresholds remain fixed. Matched native masks use the same map threshold and size filter; rejected expressions have exactly zero SFAP-versus-native change. +3. Verify primary replay against archived official-grid metrics at absolute tolerance 1e-12. Stop reporting if replay disagrees. +4. Quantify harm incidence, mean lost IoU, initially correct masks crossing below IoU 0.5, loss to empty output, positive/empty target strata, plurality mismatches, and sensitivity to proposal/boundary perturbations. These are measured signatures, not human-assigned causal labels. Anchor-grounding error and incorrect semantic decomposition require image-aware human annotation. +5. Prepare two independent blinded annotation forms with 200 randomly sampled accepted, 200 legacy-supported/rejected, and 200 outside-grammar expressions. Record inclusion probabilities. Human precision/recall and agreement are unavailable until the forms are returned and adjudicated. Keep the historical 122-item audit separate. +6. Export portable per-record score tables and reconstruction metadata. Public publication and DOI assignment remain author actions; no public URL or human annotation will be fabricated. + +Uncertainty: 2,000 image-cluster bootstrap replicates with fixed seed. Post-review sensitivity intervals are descriptive, not multiplicity-adjusted superiority tests. diff --git a/source/protocol/asset_manifest.json b/source/protocol/asset_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..2e6784b7a1042f464521c099719686a92eac5d94 --- /dev/null +++ b/source/protocol/asset_manifest.json @@ -0,0 +1,48 @@ +{ + "created_utc": "2026-09-06T10:21:23Z", + "models": { + "clipseg": { + "repo": "CIDAS/clipseg-rd64-refined", + "revision": "999e0328d9e10b484360c477313983f9afdd7050", + "license": "apache-2.0" + }, + "groundingdino": { + "repo": "IDEA-Research/grounding-dino-tiny", + "revision": "a2bb814dd30d776dcf7e30523b00659f4f141c71", + "license": "apache-2.0" + }, + "sam": { + "repo": "facebook/sam-vit-base", + "revision": "70c1a07f894ebb5b307fd9eaaee97b9dfc16068f", + "license": "apache-2.0" + } + }, + "dataset": { + "repo": "FudanCVL/gRefCOCO", + "revision": "81eede59b3ac070049f597d023c0ff08d1fb80e9", + "license": null, + "source_project": "https://henghuiding.com/GRES/" + }, + "source": "Public publisher/model-author repositories", + "file_sha256": { + "assets/models/clipseg/config.json": "c023375966d31b3b1392764f7bd91df47098ce19f62f11b0263d8eedcf708bcd", + "assets/models/clipseg/merges.txt": "9fd691f7c8039210e0fced15865466c65820d09b63988b0174bfe25de299051a", + "assets/models/clipseg/model.safetensors": "d00ca85d6b859f9d07b7cfb8ef26fe9771cb275b34c9368f2ecf603139307f55", + "assets/models/clipseg/preprocessor_config.json": "4fb09ebcfd7651205ca8299b993c30088e5535ef350a72d46c5c4580eeac0440", + "assets/models/clipseg/special_tokens_map.json": "c4864a9376a8401918425bed71fc14fc0e81f9b59ec45c1cf96cccb2df508eac", + "assets/models/clipseg/tokenizer_config.json": "4c75d57fd9bd0be8478ad2d6f8b9cebdd4a45338eb108547329c2b6333476ca6", + "assets/models/clipseg/vocab.json": "e089ad92ba36837a0d31433e555c8f45fe601ab5c221d4f607ded32d9f7a4349", + "assets/models/groundingdino/config.json": "eec82c5ab66e16df12a9a212e68ac011779927c2536cf9078658e35d85f0c67a", + "assets/models/groundingdino/model.safetensors": "1a2412ef99bd74bcd3c2a246fa1e48581f8889a1300c9051974741314fc042f3", + "assets/models/groundingdino/preprocessor_config.json": "8454179ba95e2ad22947835aad7b45862a601fc0055ab88bf1ee70892d3aea60", + "assets/models/groundingdino/special_tokens_map.json": "b6d346be366a7d1d48332dbc9fdf3bf8960b5d879522b7799ddba59e76237ee3", + "assets/models/groundingdino/tokenizer.json": "d241a60d5e8f04cc1b2b3e9ef7a4921b27bf526d9f6050ab90f9267a1f9e5c66", + "assets/models/groundingdino/tokenizer_config.json": "d40ab645b68211910b9170d22433d43186a6ec8ee6fd10ba170524b25bf4fb56", + "assets/models/groundingdino/vocab.txt": "07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3", + "assets/models/sam/config.json": "5ebd0d8643b486f3a716bf17c2a15531eb818b2b96ff0c6c5dcc88fa015161af", + "assets/models/sam/model.safetensors": "892c410e496344e527255ccdcb2cb7244a609acb5389c7c4fdba1288f861c579", + "assets/models/sam/preprocessor_config.json": "225545a743c654e3c495ec6f545a0eaba57c8ba3fbbd8483b3cb1c0fc58db517", + "assets/grefcoco/grefs(unc).json": "cc37c5ff95373c78a6a3f98b4c7bc67fde387ea8514752a1392db64223eb3366", + "assets/grefcoco/instances.json": "7f86adb7f4c39db19c7f02a3cc604d17f8016e4c4e8312652d0acc4eae3a2cbd" + } +} diff --git a/source/protocol/checkpoint_identity.json b/source/protocol/checkpoint_identity.json new file mode 100644 index 0000000000000000000000000000000000000000..ece27e912825e28c6d0ddbab4d119f0334901a15 --- /dev/null +++ b/source/protocol/checkpoint_identity.json @@ -0,0 +1 @@ +{"local_path":"/workspace/scratch/94795879a4b6/output/RefSeg_CA_R2_Working_Checkpoint.zip","current_version_number":0,"directory_id":"libdir_f2905c25a7ac819198d166f7f2e29dcd","external_connectors_accessed":false,"file_id":"file_00000000ebe481f495239cbc85d1180e","file_name":"RefSeg_CA_R2_Working_Checkpoint.zip","file_size_bytes":5644087,"library_file_id":"libfile_43f00ee578a481919e4d69703b043bd6","mime_type":"application/zip","operation":"create_library_file","path":"/RefSeg_CA_R2_Working_Checkpoint.zip","restored_from_version_number":null,"status":"succeeded","xattrs":[{"name":"user.library-file-version","value":"0"}]} diff --git a/source/protocol/natural_full_manifest.json b/source/protocol/natural_full_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..5c27babc32961aec3c58a081d68a522995991826 --- /dev/null +++ b/source/protocol/natural_full_manifest.json @@ -0,0 +1,27 @@ +{ + "expressions": 49492, + "references": 15120, + "images": 3000, + "image_fetch": { + "downloaded": 1200, + "reused": 1800 + }, + "strata": { + "val/multi": 5324, + "val/zero": 8905, + "testA/multi": 8835, + "testA/one": 5917, + "testA/zero": 4448, + "testB/multi": 5744, + "testB/one": 5646, + "testB/zero": 4673 + }, + "manifest_sha256": "a2109847cdb75d25a465ec38a84037273000f7a333fb57dd9ff830cc05986f9d", + "old_calibration_image_overlap": [], + "source": "FudanCVL/gRefCOCO; official repository-linked release", + "source_sha256": { + "grefs(unc).json": "cc37c5ff95373c78a6a3f98b4c7bc67fde387ea8514752a1392db64223eb3366", + "instances.json": "7f86adb7f4c39db19c7f02a3cc604d17f8016e4c4e8312652d0acc4eae3a2cbd" + }, + "slurm_job_id": "6331927" +} diff --git a/source/protocol/public_data_receipt.json b/source/protocol/public_data_receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..be01ee49047bc1b8c7ef7ba7e40b6e8d7c4dd94f --- /dev/null +++ b/source/protocol/public_data_receipt.json @@ -0,0 +1,9 @@ +{ + "status": "PUBLISHED", + "repo_id": "Ethosoft/RefSeg-CA", + "url": "https://huggingface.co/datasets/Ethosoft/RefSeg-CA", + "commit": "d5ce7eaa159c8b0a1e81f439b651c0125c0b31e0", + "tag": "r3-data-v1", + "private": false, + "files": 19 +} diff --git a/source/protocol/public_download_verification.json b/source/protocol/public_download_verification.json new file mode 100644 index 0000000000000000000000000000000000000000..cf5848bddda3ae7cbe398b55dc20c313253bff5c --- /dev/null +++ b/source/protocol/public_download_verification.json @@ -0,0 +1,8 @@ +{ + "status": "PASS", + "public_unauthenticated_download": true, + "commit": "d5ce7eaa159c8b0a1e81f439b651c0125c0b31e0", + "metric_rows": 30, + "sensitivity_settings": 22, + "max_absolute_error": 3.3306690738754696e-15 +} diff --git a/source/protocol/public_release_receipt.json b/source/protocol/public_release_receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..325a12f162332d40602fec2e7631aba3c89aa6f1 --- /dev/null +++ b/source/protocol/public_release_receipt.json @@ -0,0 +1,9 @@ +{ + "status": "PUBLISHED", + "repo_id": "Ethosoft/RefSeg-CA", + "url": "https://huggingface.co/datasets/Ethosoft/RefSeg-CA", + "commit": "c9e32e712076a279be1c49d17b6a853cf8c62f85", + "tag": "r3-release-v1", + "private": false, + "files": 19 +} diff --git a/source/protocol/rela_assets.json b/source/protocol/rela_assets.json new file mode 100644 index 0000000000000000000000000000000000000000..6812c02c168f3a1f572a1301bf8cb1bf9f2a6e7c --- /dev/null +++ b/source/protocol/rela_assets.json @@ -0,0 +1,25 @@ +{ + "checkpoint_file": "gres_swin_tiny.pth", + "checkpoint_sha256": "b37fdd5ae8b8b6fca27c5457be786d8774895d1b9cd1f93f5420304431deea98", + "bytes": 650774639, + "official_drive_file_id": "1VwX3BQy6gaF38P7YL6YeF2m0prgpO-IG", + "packages": [ + "gdown==5.2.0", + "timm==0.6.13", + "fvcore==0.1.5.post20221221", + "yacs==0.1.8", + "iopath==0.1.9", + "omegaconf==2.3.0", + "antlr4-python3-runtime==4.9.3", + "hydra-core==1.3.2", + "portalocker==2.10.1", + "termcolor==2.4.0", + "cloudpickle==3.0.0", + "tabulate==0.9.0", + "opencv-python-headless==4.10.0.84", + "shapely==2.0.6", + "h5py==3.11.0" + ], + "detectron2": "v0.6", + "slurm_job_id": "6331999" +} diff --git a/source/protocol/rela_reconstruction_lock.json b/source/protocol/rela_reconstruction_lock.json new file mode 100644 index 0000000000000000000000000000000000000000..d308fff0d8a8cf7a5de7d2c138482dc4aa098c19 --- /dev/null +++ b/source/protocol/rela_reconstruction_lock.json @@ -0,0 +1,12 @@ +{ + "rela_repository": "henghuiding/ReLA", + "rela_commit": "3ca955198da8ace68f8980b6fcbada0791cc51c2", + "checkpoint_sha256": "b37fdd5ae8b8b6fca27c5457be786d8774895d1b9cd1f93f5420304431deea98", + "bert_files_sha256": { + "config.json": "7160e1553ad2ca51d8c1cb066be533db31826e12d173824c1bb0cb1a4f187d20", + "model.safetensors": "68d45e234eb4a928074dfd868cead0219ab85354cc53d20e772753c6bb9169d3", + "tokenizer.json": "ce64fce797c24f68df90b40a3f74f579b336a493db14bd583fd520ea0d8c9a98", + "vocab.txt": "07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3", + "tokenizer_config.json": "a025160ef0431f1a392f6f050c1310f4c5d9fb6f275932dbccba73c4d214bf10" + } +} diff --git a/source/protocol/rich_manifest.json b/source/protocol/rich_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..9b7559242cb46303a512848f6c3b59448c905b11 --- /dev/null +++ b/source/protocol/rich_manifest.json @@ -0,0 +1,20 @@ +{ + "scenes": 1200, + "images": 2400, + "records": 28800, + "args": { + "per_seed": 240, + "seeds": [ + 11, + 23, + 37, + 53, + 71 + ] + }, + "manifest_sha256": "4ee8e51bffd02a077c5769aecdef6c7cc2e56be8fce11d3a7f465634f757d105", + "mean_objects": 10.964166666666667, + "min_visible_fraction": 0.705175983436853, + "mean_occupancy": 0.16590126885308162, + "renderer": "Pillow procedural raster; no image generation model; common instance masks across render styles" +} diff --git a/source/protocol/runtime_versions.json b/source/protocol/runtime_versions.json new file mode 100644 index 0000000000000000000000000000000000000000..b250308b56835f7fe03aeb95374113df749f9211 --- /dev/null +++ b/source/protocol/runtime_versions.json @@ -0,0 +1,14 @@ +{ + "source": "TRUBA installed package metadata for executed experiment environment", + "python": "3.9.18", + "numpy": "1.26.4", + "scipy": "1.13.1", + "pillow": "10.4.0", + "torch": "2.5.1+cu121", + "torchvision": "0.20.1+cpu", + "transformers": "4.46.3", + "tokenizers": "0.20.3", + "pycocotools": "2.0.7", + "timm": "0.6.13", + "detectron2": "0.6" +} diff --git a/source/protocol/template_source.json b/source/protocol/template_source.json new file mode 100644 index 0000000000000000000000000000000000000000..f205aeba5c442eeda439b057316c29de175ba875 --- /dev/null +++ b/source/protocol/template_source.json @@ -0,0 +1,10 @@ +{ + "journal": "Machine Vision and Applications", + "guidelines": "https://link.springer.com/journal/138/submission-guidelines", + "template_url": "https://cms-resources.apps.public.k8s.springernature.io/springer-cms/rest/v1/content/18782940/data/v12", + "recommended_option": "iicol", + "downloaded": "2026-09-06", + "template_sha256": "812e76dcaa9c28dc1bff1fb6065d51729b67d4ea140552a05088317414a3ecae", + "class_sha256": "36d0c3273a59d48dc6a9c7b080dfa1ec50dc10229d8751568d1f2e490ffa5ecc", + "class_matches_official_bytes": true +} \ No newline at end of file diff --git a/source/requirements-analysis.txt b/source/requirements-analysis.txt new file mode 100644 index 0000000000000000000000000000000000000000..20e8313d28412f5f97236020fff7ba971f06e5dc --- /dev/null +++ b/source/requirements-analysis.txt @@ -0,0 +1,4 @@ +numpy==1.26.4 +scipy==1.13.1 +Pillow==10.4.0 +PyMuPDF>=1.24,<2 diff --git a/source/results/analysis/natural_clipseg.json b/source/results/analysis/natural_clipseg.json new file mode 100644 index 0000000000000000000000000000000000000000..1e0b9522441892823dfe1131bfde3ae8bca6d983 --- /dev/null +++ b/source/results/analysis/natural_clipseg.json @@ -0,0 +1,2508 @@ +{ + "records": 49492, + "images": 3000, + "tables": [ + { + "split": "val", + "grid": "scores", + "variant": "frozen", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5848136531007471, + "cIoU": 0.29341193839864355, + "positive_mIoU": 0.30377788692158686, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.2736664162283997 + }, + { + "split": "val", + "grid": "scores", + "variant": "action_only", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5848136531007471, + "cIoU": 0.29341193839864355, + "positive_mIoU": 0.30377788692158686, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.2736664162283997 + }, + { + "split": "val", + "grid": "scores", + "variant": "largest", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5768614291080519, + "cIoU": 0.2791027751343897, + "positive_mIoU": 0.28252465717101255, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.23102930127723517 + }, + { + "split": "val", + "grid": "scores", + "variant": "global_direction", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5772425133656146, + "cIoU": 0.28009902386773955, + "positive_mIoU": 0.28354314851227097, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.23422238918106686 + }, + { + "split": "val", + "grid": "scores", + "variant": "target_only", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5826445982791951, + "cIoU": 0.29483189668123544, + "positive_mIoU": 0.30549398739944933, + "Nacc": 0.748343627175744, + "false_empty": 0.23628850488354622, + "Pr50": 0.276671675432006 + }, + { + "split": "val", + "grid": "scores", + "variant": "anchor_nogate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5838671655744021, + "cIoU": 0.2941628902160838, + "positive_mIoU": 0.3042535497667479, + "Nacc": 0.7510387422796182, + "false_empty": 0.236664162283997, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "scores", + "variant": "anchor_gate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5839604510529778, + "cIoU": 0.29408170960931906, + "positive_mIoU": 0.3041272084960222, + "Nacc": 0.751263335204941, + "false_empty": 0.2370398196844478, + "Pr50": 0.27573253193087904 + }, + { + "split": "val", + "grid": "scores", + "variant": "counterfactual_nogate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5838671655744021, + "cIoU": 0.2941646207900735, + "positive_mIoU": 0.3042535497667479, + "Nacc": 0.7510387422796182, + "false_empty": 0.236664162283997, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "scores", + "variant": "cacp", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5840677005042771, + "cIoU": 0.2941943458491989, + "positive_mIoU": 0.3042260162425547, + "Nacc": 0.7513756316676025, + "false_empty": 0.2370398196844478, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "scores", + "variant": "safe_anchor", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5845851087871108, + "cIoU": 0.2936810575737406, + "positive_mIoU": 0.3039183908587148, + "Nacc": 0.7523862998315554, + "false_empty": 0.23873027798647634, + "Pr50": 0.2738542449286251 + }, + { + "split": "val", + "grid": "scores", + "variant": "source_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.6605513567600488, + "cIoU": 0.2647561712769737, + "positive_mIoU": 0.23910316591636666, + "Nacc": 0.912521055586749, + "false_empty": 0.5495867768595041, + "Pr50": 0.24511645379413974 + }, + { + "split": "val", + "grid": "scores", + "variant": "target_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.6031418884462191, + "cIoU": 0.2939519666925305, + "positive_mIoU": 0.30317541898971667, + "Nacc": 0.7824817518248175, + "false_empty": 0.2560105184072126, + "Pr50": 0.27554470323065366 + }, + { + "split": "val", + "grid": "scores", + "variant": "constrained_0.01_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5840677005042771, + "cIoU": 0.2941943458491989, + "positive_mIoU": 0.3042260162425547, + "Nacc": 0.7513756316676025, + "false_empty": 0.2370398196844478, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "scores", + "variant": "constrained_0.025_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5840677005042771, + "cIoU": 0.2941943458491989, + "positive_mIoU": 0.3042260162425547, + "Nacc": 0.7513756316676025, + "false_empty": 0.2370398196844478, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "scores", + "variant": "constrained_0.05_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5992393670328107, + "cIoU": 0.2939596870572969, + "positive_mIoU": 0.3034517192918598, + "Nacc": 0.7760808534531163, + "false_empty": 0.25075131480090157, + "Pr50": 0.27554470323065366 + }, + { + "split": "val", + "grid": "scores", + "variant": "constrained_0.1_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.6075886853313406, + "cIoU": 0.2939342710231179, + "positive_mIoU": 0.3028511276445615, + "Nacc": 0.7897810218978102, + "false_empty": 0.2625845229151014, + "Pr50": 0.27554470323065366 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "frozen", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5848092276958614, + "cIoU": 0.2948740239673872, + "positive_mIoU": 0.30376605951998764, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.2736664162283997 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "action_only", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5848092276958614, + "cIoU": 0.2948740239673872, + "positive_mIoU": 0.30376605951998764, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.2736664162283997 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "largest", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5768608833406866, + "cIoU": 0.2804610865304412, + "positive_mIoU": 0.2825231985451973, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.23102930127723517 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "global_direction", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5772418650273169, + "cIoU": 0.28152701326784774, + "positive_mIoU": 0.2835414157538865, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.23422238918106686 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "target_only", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5826397989829826, + "cIoU": 0.29629958516790933, + "positive_mIoU": 0.30548116073043946, + "Nacc": 0.748343627175744, + "false_empty": 0.23628850488354622, + "Pr50": 0.276671675432006 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "anchor_nogate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5838622317288047, + "cIoU": 0.29558353318779657, + "positive_mIoU": 0.3042403634990912, + "Nacc": 0.7510387422796182, + "false_empty": 0.236664162283997, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "anchor_gate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5839556070152777, + "cIoU": 0.295507521433274, + "positive_mIoU": 0.30411426225026034, + "Nacc": 0.751263335204941, + "false_empty": 0.2370398196844478, + "Pr50": 0.27573253193087904 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "counterfactual_nogate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5838622317288047, + "cIoU": 0.2955851181312454, + "positive_mIoU": 0.3042403634990912, + "Nacc": 0.7510387422796182, + "false_empty": 0.236664162283997, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "cacp", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5840628409347085, + "cIoU": 0.29568929463882493, + "positive_mIoU": 0.30421302848609466, + "Nacc": 0.7513756316676025, + "false_empty": 0.2370398196844478, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5845803980764505, + "cIoU": 0.29512763248735574, + "positive_mIoU": 0.3039058009447432, + "Nacc": 0.7523862998315554, + "false_empty": 0.23873027798647634, + "Pr50": 0.2738542449286251 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.6605471284178085, + "cIoU": 0.266341401860431, + "positive_mIoU": 0.23909186518726466, + "Nacc": 0.912521055586749, + "false_empty": 0.5495867768595041, + "Pr50": 0.24511645379413974 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "target_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.6031367891972352, + "cIoU": 0.2954298174467563, + "positive_mIoU": 0.30316179066255844, + "Nacc": 0.7824817518248175, + "false_empty": 0.2560105184072126, + "Pr50": 0.27554470323065366 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.01_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5840628409347085, + "cIoU": 0.29568929463882493, + "positive_mIoU": 0.30421302848609466, + "Nacc": 0.7513756316676025, + "false_empty": 0.2370398196844478, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.025_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5840628409347085, + "cIoU": 0.29568929463882493, + "positive_mIoU": 0.30421302848609466, + "Nacc": 0.7513756316676025, + "false_empty": 0.2370398196844478, + "Pr50": 0.2759203606311044 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5992343942514419, + "cIoU": 0.29542123236593315, + "positive_mIoU": 0.3034384289638929, + "Nacc": 0.7760808534531163, + "false_empty": 0.25075131480090157, + "Pr50": 0.27554470323065366 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.1_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.6075835611177969, + "cIoU": 0.29540856137246363, + "positive_mIoU": 0.3028374325967564, + "Nacc": 0.7897810218978102, + "false_empty": 0.2625845229151014, + "Pr50": 0.27554470323065366 + }, + { + "split": "testA", + "grid": "scores", + "variant": "frozen", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.36325373653941373, + "cIoU": 0.2740651289621243, + "positive_mIoU": 0.257014082263879, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.22498644251626898 + }, + { + "split": "testA", + "grid": "scores", + "variant": "action_only", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.36325373653941373, + "cIoU": 0.2740651289621243, + "positive_mIoU": 0.257014082263879, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.22498644251626898 + }, + { + "split": "testA", + "grid": "scores", + "variant": "largest", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3536410049995072, + "cIoU": 0.25929894299669537, + "positive_mIoU": 0.2445029349234366, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.20864967462039047 + }, + { + "split": "testA", + "grid": "scores", + "variant": "global_direction", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.35677443610427717, + "cIoU": 0.26385269070247164, + "positive_mIoU": 0.2485811532810549, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.21719088937093275 + }, + { + "split": "testA", + "grid": "scores", + "variant": "target_only", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.36513309786101583, + "cIoU": 0.2768625929274646, + "positive_mIoU": 0.2595278930945975, + "Nacc": 0.7153776978417267, + "false_empty": 0.29995932754880694, + "Pr50": 0.22796908893709328 + }, + { + "split": "testA", + "grid": "scores", + "variant": "anchor_nogate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.36615993272641645, + "cIoU": 0.2784503822363347, + "positive_mIoU": 0.2608643376048804, + "Nacc": 0.7153776978417267, + "false_empty": 0.29379067245119306, + "Pr50": 0.22905368763557485 + }, + { + "split": "testA", + "grid": "scores", + "variant": "anchor_gate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.366131656427946, + "cIoU": 0.27848104616930064, + "positive_mIoU": 0.2608275354810577, + "Nacc": 0.7153776978417267, + "false_empty": 0.29406182212581344, + "Pr50": 0.22891811279826466 + }, + { + "split": "testA", + "grid": "scores", + "variant": "counterfactual_nogate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3661487551812436, + "cIoU": 0.27844796569962077, + "positive_mIoU": 0.2608497898237444, + "Nacc": 0.7153776978417267, + "false_empty": 0.29379067245119306, + "Pr50": 0.22905368763557485 + }, + { + "split": "testA", + "grid": "scores", + "variant": "cacp", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.36601013240623376, + "cIoU": 0.2783998928859436, + "positive_mIoU": 0.2606693697261177, + "Nacc": 0.7153776978417267, + "false_empty": 0.29412960954446854, + "Pr50": 0.22871475054229934 + }, + { + "split": "testA", + "grid": "scores", + "variant": "safe_anchor", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3657507243219635, + "cIoU": 0.27810637258554993, + "positive_mIoU": 0.26026395790277235, + "Nacc": 0.7156025179856115, + "false_empty": 0.2959598698481562, + "Pr50": 0.22898590021691975 + }, + { + "split": "testA", + "grid": "scores", + "variant": "source_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3539932412194408, + "cIoU": 0.23403625556385094, + "positive_mIoU": 0.18720649616413118, + "Nacc": 0.9071492805755396, + "false_empty": 0.6372017353579176, + "Pr50": 0.18838123644251628 + }, + { + "split": "testA", + "grid": "scores", + "variant": "target_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.372884886139982, + "cIoU": 0.2765215780731971, + "positive_mIoU": 0.25782197762253617, + "Nacc": 0.7544964028776978, + "false_empty": 0.3234137744034707, + "Pr50": 0.2271556399132321 + }, + { + "split": "testA", + "grid": "scores", + "variant": "constrained_0.01_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.36601013240623376, + "cIoU": 0.2783998928859436, + "positive_mIoU": 0.2606693697261177, + "Nacc": 0.7153776978417267, + "false_empty": 0.29412960954446854, + "Pr50": 0.22871475054229934 + }, + { + "split": "testA", + "grid": "scores", + "variant": "constrained_0.025_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.36601013240623376, + "cIoU": 0.2783998928859436, + "positive_mIoU": 0.2606693697261177, + "Nacc": 0.7153776978417267, + "false_empty": 0.29412960954446854, + "Pr50": 0.22871475054229934 + }, + { + "split": "testA", + "grid": "scores", + "variant": "constrained_0.05_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.37171326622569895, + "cIoU": 0.27679078684059183, + "positive_mIoU": 0.25839850267986847, + "Nacc": 0.7475269784172662, + "false_empty": 0.31636388286334055, + "Pr50": 0.2273590021691974 + }, + { + "split": "testA", + "grid": "scores", + "variant": "constrained_0.1_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3742950726385928, + "cIoU": 0.27618820954738543, + "positive_mIoU": 0.2569458646055437, + "Nacc": 0.7634892086330936, + "false_empty": 0.331954989154013, + "Pr50": 0.22668112798264642 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "frozen", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3631019370238275, + "cIoU": 0.2749623142612412, + "positive_mIoU": 0.25681651239543707, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.2245797180043384 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "action_only", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3631019370238275, + "cIoU": 0.2749623142612412, + "positive_mIoU": 0.25681651239543707, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.2245797180043384 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "largest", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.35349283404601806, + "cIoU": 0.259838652033506, + "positive_mIoU": 0.24431008769546816, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.20831073752711496 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "global_direction", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.35662458656004914, + "cIoU": 0.26449305981594834, + "positive_mIoU": 0.24838612133628954, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.21671637744034708 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "target_only", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3650066821010559, + "cIoU": 0.2781180600468075, + "positive_mIoU": 0.2593633606521335, + "Nacc": 0.7153776978417267, + "false_empty": 0.29995932754880694, + "Pr50": 0.22783351409978309 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "anchor_nogate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3660337288172456, + "cIoU": 0.27956403045323885, + "positive_mIoU": 0.2607000808901244, + "Nacc": 0.7153776978417267, + "false_empty": 0.29379067245119306, + "Pr50": 0.22891811279826466 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "anchor_gate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3660055772979517, + "cIoU": 0.27959885180268973, + "positive_mIoU": 0.26066344116870066, + "Nacc": 0.7153776978417267, + "false_empty": 0.29406182212581344, + "Pr50": 0.22878253796095444 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "counterfactual_nogate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3660225593955565, + "cIoU": 0.2795615616343206, + "positive_mIoU": 0.26068554368185226, + "Nacc": 0.7153776978417267, + "false_empty": 0.29379067245119306, + "Pr50": 0.22891811279826466 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "cacp", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3658841585721507, + "cIoU": 0.2795211967384261, + "positive_mIoU": 0.26050541245833064, + "Nacc": 0.7153776978417267, + "false_empty": 0.29412960954446854, + "Pr50": 0.22857917570498915 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3656252455970457, + "cIoU": 0.27911723381690834, + "positive_mIoU": 0.26010064502869285, + "Nacc": 0.7156025179856115, + "false_empty": 0.2959598698481562, + "Pr50": 0.22885032537960953 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3538771167479468, + "cIoU": 0.23506049943219656, + "positive_mIoU": 0.18705535802335818, + "Nacc": 0.9071492805755396, + "false_empty": 0.6372017353579176, + "Pr50": 0.18831344902386118 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "target_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3727594690883384, + "cIoU": 0.2776392446782822, + "positive_mIoU": 0.2576587450173602, + "Nacc": 0.7544964028776978, + "false_empty": 0.3234137744034707, + "Pr50": 0.2270200650759219 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.01_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3658841585721507, + "cIoU": 0.2795211967384261, + "positive_mIoU": 0.26050541245833064, + "Nacc": 0.7153776978417267, + "false_empty": 0.29412960954446854, + "Pr50": 0.22857917570498915 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.025_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3658841585721507, + "cIoU": 0.2795211967384261, + "positive_mIoU": 0.26050541245833064, + "Nacc": 0.7153776978417267, + "false_empty": 0.29412960954446854, + "Pr50": 0.22857917570498915 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.37158895689857907, + "cIoU": 0.2779040613556853, + "positive_mIoU": 0.2582367117985845, + "Nacc": 0.7475269784172662, + "false_empty": 0.31636388286334055, + "Pr50": 0.2272234273318872 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.1_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3741686238274813, + "cIoU": 0.2773135341032194, + "positive_mIoU": 0.25678128914639653, + "Nacc": 0.7634892086330936, + "false_empty": 0.331954989154013, + "Pr50": 0.22654555314533623 + }, + { + "split": "testB", + "grid": "scores", + "variant": "frozen", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.402901509091022, + "cIoU": 0.3380608191577566, + "positive_mIoU": 0.31007962603416034, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.29174714661984197 + }, + { + "split": "testB", + "grid": "scores", + "variant": "action_only", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.402901509091022, + "cIoU": 0.3380608191577566, + "positive_mIoU": 0.31007962603416034, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.29174714661984197 + }, + { + "split": "testB", + "grid": "scores", + "variant": "largest", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3907315594869796, + "cIoU": 0.3197763602848901, + "positive_mIoU": 0.292916684814693, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.2770851624231782 + }, + { + "split": "testB", + "grid": "scores", + "variant": "global_direction", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.393320210737687, + "cIoU": 0.3241170888960328, + "positive_mIoU": 0.2965673876276968, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.284108867427568 + }, + { + "split": "testB", + "grid": "scores", + "variant": "target_only", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40363866207443294, + "cIoU": 0.3376237922081928, + "positive_mIoU": 0.311382601308307, + "Nacc": 0.628504172908196, + "false_empty": 0.23222124670763827, + "Pr50": 0.2923617208077261 + }, + { + "split": "testB", + "grid": "scores", + "variant": "anchor_nogate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4037829056674287, + "cIoU": 0.338657622583484, + "positive_mIoU": 0.31176161665811297, + "Nacc": 0.6280761823239889, + "false_empty": 0.2295873573309921, + "Pr50": 0.2927129060579456 + }, + { + "split": "testB", + "grid": "scores", + "variant": "anchor_gate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4037794820594449, + "cIoU": 0.3386230619856727, + "positive_mIoU": 0.31166899212650256, + "Nacc": 0.6282901776160924, + "false_empty": 0.2299385425812116, + "Pr50": 0.29288849868305533 + }, + { + "split": "testB", + "grid": "scores", + "variant": "counterfactual_nogate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40378752436252097, + "cIoU": 0.33867822572129375, + "positive_mIoU": 0.3117681302752568, + "Nacc": 0.6280761823239889, + "false_empty": 0.2295873573309921, + "Pr50": 0.2927129060579456 + }, + { + "split": "testB", + "grid": "scores", + "variant": "cacp", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4035695519070872, + "cIoU": 0.338503592042074, + "positive_mIoU": 0.311372933475289, + "Nacc": 0.6282901776160924, + "false_empty": 0.23046532045654083, + "Pr50": 0.2926251097453907 + }, + { + "split": "testB", + "grid": "scores", + "variant": "safe_anchor", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4033822322103401, + "cIoU": 0.33829408574138525, + "positive_mIoU": 0.31110876172034174, + "Nacc": 0.6282901776160924, + "false_empty": 0.23125548726953468, + "Pr50": 0.2927129060579456 + }, + { + "split": "testB", + "grid": "scores", + "variant": "source_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4184119183664976, + "cIoU": 0.3203348138376079, + "positive_mIoU": 0.26426256757866995, + "Nacc": 0.7941365289963621, + "false_empty": 0.46733977172958735, + "Pr50": 0.26409130816505705 + }, + { + "split": "testB", + "grid": "scores", + "variant": "target_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4076398601464541, + "cIoU": 0.3381755228989143, + "positive_mIoU": 0.3100894708983751, + "Nacc": 0.6454098009843784, + "false_empty": 0.2444249341527656, + "Pr50": 0.2919227392449517 + }, + { + "split": "testB", + "grid": "scores", + "variant": "constrained_0.01_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4035695519070872, + "cIoU": 0.338503592042074, + "positive_mIoU": 0.311372933475289, + "Nacc": 0.6282901776160924, + "false_empty": 0.23046532045654083, + "Pr50": 0.2926251097453907 + }, + { + "split": "testB", + "grid": "scores", + "variant": "constrained_0.025_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4035695519070872, + "cIoU": 0.338503592042074, + "positive_mIoU": 0.311372933475289, + "Nacc": 0.6282901776160924, + "false_empty": 0.23046532045654083, + "Pr50": 0.2926251097453907 + }, + { + "split": "testB", + "grid": "scores", + "variant": "constrained_0.05_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4070562611350075, + "cIoU": 0.33819822930329574, + "positive_mIoU": 0.3103199932055861, + "Nacc": 0.6428418574791355, + "false_empty": 0.24196663740122915, + "Pr50": 0.2920105355575066 + }, + { + "split": "testB", + "grid": "scores", + "variant": "constrained_0.1_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.408690389116124, + "cIoU": 0.3381538370130423, + "positive_mIoU": 0.3097272801029235, + "Nacc": 0.6499037021185534, + "false_empty": 0.24872695346795434, + "Pr50": 0.29174714661984197 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "frozen", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40276609702716604, + "cIoU": 0.3386108681829043, + "positive_mIoU": 0.3098886581692158, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.29165935030728707 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "action_only", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40276609702716604, + "cIoU": 0.3386108681829043, + "positive_mIoU": 0.3098886581692158, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.29165935030728707 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "largest", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3905999245268888, + "cIoU": 0.3201990283603764, + "positive_mIoU": 0.29273104369406633, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.2766461808604039 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "global_direction", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3931940090346964, + "cIoU": 0.32449233742071465, + "positive_mIoU": 0.29638940887834314, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.28384547848990344 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "target_only", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4035415541166013, + "cIoU": 0.3381295766484422, + "positive_mIoU": 0.3112456526580305, + "Nacc": 0.628504172908196, + "false_empty": 0.23222124670763827, + "Pr50": 0.29244951712028094 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "anchor_nogate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4036858507157427, + "cIoU": 0.339345064232929, + "positive_mIoU": 0.3116247427609284, + "Nacc": 0.6280761823239889, + "false_empty": 0.2295873573309921, + "Pr50": 0.29280070237050043 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "anchor_gate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40368216668761187, + "cIoU": 0.3393124182779773, + "positive_mIoU": 0.3115317509660324, + "Nacc": 0.6282901776160924, + "false_empty": 0.2299385425812116, + "Pr50": 0.2929762949956102 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "counterfactual_nogate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4036904895503423, + "cIoU": 0.33936373961349797, + "positive_mIoU": 0.31163128478025887, + "Nacc": 0.6280761823239889, + "false_empty": 0.2295873573309921, + "Pr50": 0.29280070237050043 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "cacp", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4034721760235985, + "cIoU": 0.339202721579525, + "positive_mIoU": 0.3112356069769151, + "Nacc": 0.6282901776160924, + "false_empty": 0.23046532045654083, + "Pr50": 0.2927129060579456 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40328443264016667, + "cIoU": 0.3389774657502737, + "positive_mIoU": 0.3109708377084282, + "Nacc": 0.6282901776160924, + "false_empty": 0.23125548726953468, + "Pr50": 0.29280070237050043 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4183287609730467, + "cIoU": 0.32137781885940664, + "positive_mIoU": 0.2641452930210755, + "Nacc": 0.7941365289963621, + "false_empty": 0.46733977172958735, + "Pr50": 0.26409130816505705 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "target_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40753516097713177, + "cIoU": 0.3389072310905142, + "positive_mIoU": 0.3099418165738075, + "Nacc": 0.6454098009843784, + "false_empty": 0.2444249341527656, + "Pr50": 0.2919227392449517 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.01_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4034721760235985, + "cIoU": 0.339202721579525, + "positive_mIoU": 0.3112356069769151, + "Nacc": 0.6282901776160924, + "false_empty": 0.23046532045654083, + "Pr50": 0.2927129060579456 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.025_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4034721760235985, + "cIoU": 0.339202721579525, + "positive_mIoU": 0.3112356069769151, + "Nacc": 0.6282901776160924, + "false_empty": 0.23046532045654083, + "Pr50": 0.2927129060579456 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40695139002338615, + "cIoU": 0.33892829165724225, + "positive_mIoU": 0.3101720963955796, + "Nacc": 0.6428418574791355, + "false_empty": 0.24196663740122915, + "Pr50": 0.2920105355575066 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.1_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40858563766678285, + "cIoU": 0.33888512329258735, + "positive_mIoU": 0.3095795520493005, + "Nacc": 0.6499037021185534, + "false_empty": 0.24872695346795434, + "Pr50": 0.29174714661984197 + }, + { + "split": "all", + "grid": "scores", + "variant": "frozen", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4398204184930163, + "cIoU": 0.3023991758600924, + "positive_mIoU": 0.284135007692632, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.2573889277315197 + }, + { + "split": "all", + "grid": "scores", + "variant": "action_only", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4398204184930163, + "cIoU": 0.3023991758600924, + "positive_mIoU": 0.284135007692632, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.2573889277315197 + }, + { + "split": "all", + "grid": "scores", + "variant": "largest", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4298551202377831, + "cIoU": 0.28621706877161446, + "positive_mIoU": 0.26846086603980046, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.23720841543253035 + }, + { + "split": "all", + "grid": "scores", + "variant": "global_direction", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.43202043645358684, + "cIoU": 0.2899329160682505, + "positive_mIoU": 0.2718666319507061, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.24429542998792347 + }, + { + "split": "all", + "grid": "scores", + "variant": "target_only", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4401651437959223, + "cIoU": 0.3036765773382586, + "positive_mIoU": 0.2860755512854442, + "Nacc": 0.7091423499389771, + "false_empty": 0.26466662429288756, + "Pr50": 0.25951821013157056 + }, + { + "split": "all", + "grid": "scores", + "variant": "anchor_nogate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4409618003119952, + "cIoU": 0.3045707024523098, + "positive_mIoU": 0.28662942290222043, + "Nacc": 0.710362809275491, + "false_empty": 0.26088476450772263, + "Pr50": 0.26002669548083646 + }, + { + "split": "all", + "grid": "scores", + "variant": "anchor_gate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4409765392744332, + "cIoU": 0.30455135961911056, + "positive_mIoU": 0.28655726440508006, + "Nacc": 0.710529235548652, + "false_empty": 0.2612025678510138, + "Pr50": 0.25999491514650735 + }, + { + "split": "all", + "grid": "scores", + "variant": "counterfactual_nogate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4409589631106688, + "cIoU": 0.30457760358580366, + "positive_mIoU": 0.2866249603468257, + "Nacc": 0.710362809275491, + "false_empty": 0.26088476450772263, + "Pr50": 0.26002669548083646 + }, + { + "split": "all", + "grid": "scores", + "variant": "cacp", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44089209498421134, + "cIoU": 0.30449468116394124, + "positive_mIoU": 0.28639266398520913, + "Nacc": 0.710584710973039, + "false_empty": 0.26142503019131763, + "Pr50": 0.25983601347486174 + }, + { + "split": "all", + "grid": "scores", + "variant": "safe_anchor", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4408794192174127, + "cIoU": 0.30418606933855263, + "positive_mIoU": 0.2860549232793551, + "Nacc": 0.711139465216909, + "false_empty": 0.2628551452361279, + "Pr50": 0.2596453314688871 + }, + { + "split": "all", + "grid": "scores", + "variant": "source_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.46303657422357253, + "cIoU": 0.27308766596057404, + "positive_mIoU": 0.22387993807516204, + "Nacc": 0.8805059358704094, + "false_empty": 0.5608911205745885, + "Pr50": 0.22538613106209876 + }, + { + "split": "all", + "grid": "scores", + "variant": "target_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4503639945470257, + "cIoU": 0.3035484572031591, + "positive_mIoU": 0.2844153949698531, + "Nacc": 0.7400421613225341, + "false_empty": 0.28341702154706666, + "Pr50": 0.2587872624420009 + }, + { + "split": "all", + "grid": "scores", + "variant": "constrained_0.01_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44089209498421134, + "cIoU": 0.30449468116394124, + "positive_mIoU": 0.28639266398520913, + "Nacc": 0.710584710973039, + "false_empty": 0.26142503019131763, + "Pr50": 0.25983601347486174 + }, + { + "split": "all", + "grid": "scores", + "variant": "constrained_0.025_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44089209498421134, + "cIoU": 0.30449468116394124, + "positive_mIoU": 0.28639266398520913, + "Nacc": 0.710584710973039, + "false_empty": 0.26142503019131763, + "Pr50": 0.25983601347486174 + }, + { + "split": "all", + "grid": "scores", + "variant": "constrained_0.05_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4485980842894793, + "cIoU": 0.30366780612870353, + "positive_mIoU": 0.2848158770626996, + "Nacc": 0.7344946188838345, + "false_empty": 0.2783321680544079, + "Pr50": 0.25891438377931736 + }, + { + "split": "all", + "grid": "scores", + "variant": "constrained_0.1_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4525304800495621, + "cIoU": 0.3033975305353117, + "positive_mIoU": 0.28381867789401016, + "Nacc": 0.7470320647952957, + "false_empty": 0.2900908917561813, + "Pr50": 0.2585012394330388 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "frozen", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.43971630785357774, + "cIoU": 0.30333932746289816, + "positive_mIoU": 0.2839712549510351, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.2571664653912159 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "action_only", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.43971630785357774, + "cIoU": 0.30333932746289816, + "positive_mIoU": 0.2839712549510351, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.2571664653912159 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "largest", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.42975475855519263, + "cIoU": 0.286936686021974, + "positive_mIoU": 0.2683030099286084, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.23689061208923917 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "global_direction", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4319211574911291, + "cIoU": 0.29069427257707864, + "positive_mIoU": 0.2717104788200268, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.2439776266446323 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "target_only", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44008320495926817, + "cIoU": 0.30474297116434157, + "positive_mIoU": 0.2859466719584345, + "Nacc": 0.7091423499389771, + "false_empty": 0.26466662429288756, + "Pr50": 0.25948642979724146 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "anchor_nogate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4408799221815091, + "cIoU": 0.30564409102609064, + "positive_mIoU": 0.28650063905826134, + "Nacc": 0.710362809275491, + "false_empty": 0.26088476450772263, + "Pr50": 0.25999491514650735 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "anchor_gate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4408946508495144, + "cIoU": 0.30562941848931957, + "positive_mIoU": 0.2864284643692928, + "Nacc": 0.710529235548652, + "false_empty": 0.2612025678510138, + "Pr50": 0.2599631348121782 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "counterfactual_nogate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4408770946680472, + "cIoU": 0.3056502344809651, + "positive_mIoU": 0.2864961917406405, + "Nacc": 0.710362809275491, + "false_empty": 0.26088476450772263, + "Pr50": 0.25999491514650735 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "cacp", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44081022330300496, + "cIoU": 0.30559161487739783, + "positive_mIoU": 0.28626389028514343, + "Nacc": 0.710584710973039, + "false_empty": 0.26142503019131763, + "Pr50": 0.25980423314053264 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44079764489598494, + "cIoU": 0.3052221098704716, + "positive_mIoU": 0.28592630271378905, + "Nacc": 0.711139465216909, + "false_empty": 0.2628551452361279, + "Pr50": 0.2596135511345579 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4629633197148554, + "cIoU": 0.274317086124645, + "positive_mIoU": 0.22376471808706624, + "Nacc": 0.8805059358704094, + "false_empty": 0.5608911205745885, + "Pr50": 0.22535435072776966 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "target_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.45027989312937894, + "cIoU": 0.3046528208777354, + "positive_mIoU": 0.28428311417908936, + "Nacc": 0.7400421613225341, + "false_empty": 0.28341702154706666, + "Pr50": 0.25872370177334264 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.01_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44081022330300496, + "cIoU": 0.30559161487739783, + "positive_mIoU": 0.28626389028514343, + "Nacc": 0.710584710973039, + "false_empty": 0.26142503019131763, + "Pr50": 0.25980423314053264 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.025_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44081022330300496, + "cIoU": 0.30559161487739783, + "positive_mIoU": 0.28626389028514343, + "Nacc": 0.710584710973039, + "false_empty": 0.26142503019131763, + "Pr50": 0.25980423314053264 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44851439315853336, + "cIoU": 0.30476640557179785, + "positive_mIoU": 0.28468424160052547, + "Nacc": 0.7344946188838345, + "false_empty": 0.2783321680544079, + "Pr50": 0.2588508231106591 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.1_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.45244595422440614, + "cIoU": 0.30450425800056125, + "positive_mIoU": 0.28368572956442845, + "Nacc": 0.7470320647952957, + "false_empty": 0.2900908917561813, + "Pr50": 0.2584376787643806 + } + ], + "comparisons": { + "all/anchor_gate": { + "n": 49492, + "images": 3000, + "delta": 0.0011783429959366808, + "ci": [ + 0.0007048881084350094, + 0.0016592426219794582 + ], + "helped": 871, + "harmed": 722, + "tied": 47899, + "sign_p": 0.00020676745505622437, + "paired_sd": 0.04847275122823104, + "approx_iid_mde80": 0.0006104273803270286 + }, + "all/cacp": { + "n": 49492, + "images": 3000, + "delta": 0.0010939154494272795, + "ci": [ + 0.0006276944671543883, + 0.0015514923265178898 + ], + "helped": 857, + "harmed": 716, + "tied": 47919, + "sign_p": 0.00041233642256268083, + "paired_sd": 0.047474654075447556, + "approx_iid_mde80": 0.0005978581364766683 + }, + "all/safe_anchor": { + "n": 49492, + "images": 3000, + "delta": 0.0010813370424072079, + "ci": [ + 0.000772914027971522, + 0.0014038221241202175 + ], + "helped": 517, + "harmed": 364, + "tied": 48611, + "sign_p": 2.8461141130824936e-7, + "paired_sd": 0.03659977083920481, + "approx_iid_mde80": 0.0004609084829691581 + }, + "all/source_unconstrained_s11": { + "n": 49492, + "images": 3000, + "delta": 0.023247011861277717, + "ci": [ + 0.020556406811495252, + 0.02609422781413391 + ], + "helped": 3528, + "harmed": 8455, + "tied": 37509, + "sign_p": 0, + "paired_sd": 0.2786883821439651, + "approx_iid_mde80": 0.00350958042877994 + }, + "all/constrained_0.05_s11": { + "n": 49492, + "images": 3000, + "delta": 0.008798085304955666, + "ci": [ + 0.007914989929998584, + 0.009735376123162545 + ], + "helped": 1164, + "harmed": 1021, + "tied": 47307, + "sign_p": 0.0023753914414200114, + "paired_sd": 0.10009664376624122, + "approx_iid_mde80": 0.001260537734820551 + }, + "old_supported/anchor_gate": { + "n": 2809, + "images": 1410, + "delta": 0.02076132130825853, + "ci": [ + 0.012520882677729401, + 0.028870305196242358 + ], + "helped": 871, + "harmed": 722, + "tied": 1216, + "sign_p": 0.00020676745505622437, + "paired_sd": 0.20249721198273424, + "approx_iid_mde80": 0.010704022562262574 + }, + "old_supported/cacp": { + "n": 2809, + "images": 1410, + "delta": 0.019273785483465616, + "ci": [ + 0.011510953624517725, + 0.027240227079416212 + ], + "helped": 857, + "harmed": 716, + "tied": 1236, + "sign_p": 0.00041233642256268083, + "paired_sd": 0.19842746606881392, + "approx_iid_mde80": 0.01048889539256607 + }, + "old_supported/safe_anchor": { + "n": 2809, + "images": 1410, + "delta": 0.019052165504741023, + "ci": [ + 0.013340217368466727, + 0.024695080295746505 + ], + "helped": 517, + "harmed": 364, + "tied": 1928, + "sign_p": 2.8461141130824936e-7, + "paired_sd": 0.15253505898535458, + "approx_iid_mde80": 0.008063018235799229 + }, + "old_supported/source_unconstrained_s11": { + "n": 2809, + "images": 1410, + "delta": -0.01818853380226436, + "ci": [ + -0.027998662655238045, + -0.008746929409001762 + ], + "helped": 563, + "harmed": 1049, + "tied": 1197, + "sign_p": 4.309068387688053e-34, + "paired_sd": 0.24605802947194425, + "approx_iid_mde80": 0.013006651663520833 + }, + "old_supported/constrained_0.05_s11": { + "n": 2809, + "images": 1410, + "delta": 0.015047050046010398, + "ci": [ + 0.007656642601357097, + 0.02235025253599728 + ], + "helped": 757, + "harmed": 738, + "tied": 1314, + "sign_p": 0.6415632781755626, + "paired_sd": 0.17914722007306821, + "approx_iid_mde80": 0.009469739690995072 + }, + "scope_safe/anchor_gate": { + "n": 1557, + "images": 973, + "delta": 0.03437221124137285, + "ci": [ + 0.02371354056018948, + 0.0447413742463135 + ], + "helped": 517, + "harmed": 364, + "tied": 676, + "sign_p": 2.8461141130824936e-7, + "paired_sd": 0.20362033120074755, + "approx_iid_mde80": 0.014457082872135084 + }, + "scope_safe/cacp": { + "n": 1557, + "images": 973, + "delta": 0.03094680860374368, + "ci": [ + 0.020644714298856986, + 0.04160315494933394 + ], + "helped": 506, + "harmed": 363, + "tied": 688, + "sign_p": 0.0000013834311812113568, + "paired_sd": 0.19892573098837862, + "approx_iid_mde80": 0.014123765349658176 + }, + "scope_safe/safe_anchor": { + "n": 1557, + "images": 973, + "delta": 0.03437221124137285, + "ci": [ + 0.02371354056018948, + 0.0447413742463135 + ], + "helped": 517, + "harmed": 364, + "tied": 676, + "sign_p": 2.8461141130824936e-7, + "paired_sd": 0.20362033120074755, + "approx_iid_mde80": 0.014457082872135084 + }, + "scope_safe/source_unconstrained_s11": { + "n": 1557, + "images": 973, + "delta": -0.012935921192946797, + "ci": [ + -0.024955695795662102, + 0.000022340128144548998 + ], + "helped": 307, + "harmed": 549, + "tied": 701, + "sign_p": 1.1097268501635485e-16, + "paired_sd": 0.2484689531356484, + "approx_iid_mde80": 0.017641343698106753 + }, + "scope_safe/constrained_0.05_s11": { + "n": 1557, + "images": 973, + "delta": 0.023967073700784564, + "ci": [ + 0.01501502893490453, + 0.033168433994319874 + ], + "helped": 428, + "harmed": 390, + "tied": 739, + "sign_p": 0.19574719097000812, + "paired_sd": 0.18463867949952917, + "approx_iid_mde80": 0.013109381932468257 + }, + "old_relational/anchor_gate": { + "n": 821, + "images": 424, + "delta": 0.015828170178326353, + "ci": [ + 0.0021940333106163948, + 0.031000063406755717 + ], + "helped": 89, + "harmed": 31, + "tied": 701, + "sign_p": 1.1187721865433782e-7, + "paired_sd": 0.16778362356676757, + "approx_iid_mde80": 0.016405211289272227 + }, + "old_relational/cacp": { + "n": 821, + "images": 424, + "delta": 0.010738659664509915, + "ci": [ + -0.001541524579754581, + 0.024497607160419196 + ], + "helped": 75, + "harmed": 25, + "tied": 721, + "sign_p": 5.636282034205402e-7, + "paired_sd": 0.14998422531580666, + "approx_iid_mde80": 0.014664857356501684 + }, + "old_relational/safe_anchor": { + "n": 821, + "images": 424, + "delta": 0.008106141524390523, + "ci": [ + -0.00015457569667732594, + 0.01677886902388341 + ], + "helped": 33, + "harmed": 10, + "tied": 778, + "sign_p": 0.0006061066312668117, + "paired_sd": 0.12288691531401305, + "approx_iid_mde80": 0.012015390820374366 + }, + "old_relational/source_unconstrained_s11": { + "n": 821, + "images": 424, + "delta": 0.047708690357051386, + "ci": [ + 0.02809427442252599, + 0.06865797992460057 + ], + "helped": 80, + "harmed": 107, + "tied": 634, + "sign_p": 0.05697078139259503, + "paired_sd": 0.27676721182118563, + "approx_iid_mde80": 0.02706119042698171 + }, + "old_relational/constrained_0.05_s11": { + "n": 821, + "images": 424, + "delta": 0.023609000487243535, + "ci": [ + 0.012260723053831102, + 0.03767467635591623 + ], + "helped": 74, + "harmed": 19, + "tied": 728, + "sign_p": 7.72091844381201e-9, + "paired_sd": 0.14749871694208125, + "approx_iid_mde80": 0.014421834294027446 + }, + "safe_relational/anchor_gate": { + "n": 382, + "images": 286, + "delta": 0.017421838197708425, + "ci": [ + 0.000006682156604049498, + 0.03498356241255817 + ], + "helped": 33, + "harmed": 10, + "tied": 339, + "sign_p": 0.0006061066312668117, + "paired_sd": 0.17982918227154598, + "approx_iid_mde80": 0.025776997254158506 + }, + "safe_relational/cacp": { + "n": 382, + "images": 286, + "delta": 0.003460183991455487, + "ci": [ + -0.0122851661514121, + 0.018357111375458906 + ], + "helped": 22, + "harmed": 9, + "tied": 351, + "sign_p": 0.029449373483657837, + "paired_sd": 0.15491480995878534, + "approx_iid_mde80": 0.022205732020213604 + }, + "safe_relational/safe_anchor": { + "n": 382, + "images": 286, + "delta": 0.017421838197708425, + "ci": [ + 0.000006682156604049498, + 0.03498356241255817 + ], + "helped": 33, + "harmed": 10, + "tied": 339, + "sign_p": 0.0006061066312668117, + "paired_sd": 0.17982918227154598, + "approx_iid_mde80": 0.025776997254158506 + }, + "safe_relational/source_unconstrained_s11": { + "n": 382, + "images": 286, + "delta": 0.09416903178840969, + "ci": [ + 0.06447169560493062, + 0.12259372309473889 + ], + "helped": 47, + "harmed": 24, + "tied": 311, + "sign_p": 0.008554538502693429, + "paired_sd": 0.31724193596727635, + "approx_iid_mde80": 0.04547395705767122 + }, + "safe_relational/constrained_0.05_s11": { + "n": 382, + "images": 286, + "delta": 0.028866443995108463, + "ci": [ + 0.014714194575885546, + 0.04590916297542331 + ], + "helped": 25, + "harmed": 5, + "tied": 352, + "sign_p": 0.0003249142318964005, + "paired_sd": 0.16823644353525744, + "approx_iid_mde80": 0.024115275887254595 + }, + "positive/anchor_gate": { + "n": 31466, + "images": 2985, + "delta": 0.002457209418257745, + "ci": [ + 0.0018119259992407093, + 0.0031316002514523633 + ], + "helped": 871, + "harmed": 703, + "tied": 29892, + "sign_p": 0.00002519094812732695, + "paired_sd": 0.055569559112180075, + "approx_iid_mde80": 0.0008776472962516515 + }, + "positive/cacp": { + "n": 31466, + "images": 2985, + "delta": 0.0022926353341083997, + "ci": [ + 0.0016499430138384526, + 0.0029399774974906757 + ], + "helped": 857, + "harmed": 698, + "tied": 29911, + "sign_p": 0.00006072099008158273, + "paired_sd": 0.05449412466789472, + "approx_iid_mde80": 0.0008606622391915881 + }, + "positive/safe_anchor": { + "n": 31466, + "images": 2985, + "delta": 0.001955047762754005, + "ci": [ + 0.001506940536987718, + 0.002420091291885168 + ], + "helped": 517, + "harmed": 356, + "tied": 30593, + "sign_p": 5.635362455675596e-8, + "paired_sd": 0.04302000633928404, + "approx_iid_mde80": 0.0006794437971368728 + }, + "positive/source_unconstrained_s11": { + "n": 31466, + "images": 2985, + "delta": -0.060206536863968825, + "ci": [ + -0.06282518474044288, + -0.05748457300982578 + ], + "helped": 483, + "harmed": 8455, + "tied": 22528, + "sign_p": 0, + "paired_sd": 0.15037597236914346, + "approx_iid_mde80": 0.0023749885311230455 + }, + "positive/constrained_0.05_s11": { + "n": 31466, + "images": 2985, + "delta": 0.0007129866494904258, + "ci": [ + 0.00012027179186045118, + 0.001326538045685991 + ], + "helped": 747, + "harmed": 1017, + "tied": 29702, + "sign_p": 1.3900988461982252e-10, + "paired_sd": 0.0500062156259304, + "approx_iid_mde80": 0.0007897816833723142 + }, + "safe_positive/anchor_gate": { + "n": 1257, + "images": 783, + "delta": 0.04893996253207441, + "ci": [ + 0.03708475903876858, + 0.06084868122234294 + ], + "helped": 517, + "harmed": 356, + "tied": 384, + "sign_p": 5.635362455675596e-8, + "paired_sd": 0.2099107683256046, + "approx_iid_mde80": 0.01658711733133577 + }, + "safe_positive/cacp": { + "n": 1257, + "images": 783, + "delta": 0.04469704136517813, + "ci": [ + 0.03316045614830593, + 0.05725453911230563 + ], + "helped": 506, + "harmed": 355, + "tied": 396, + "sign_p": 2.982340091474361e-7, + "paired_sd": 0.20455219585239487, + "approx_iid_mde80": 0.016163683740717284 + }, + "safe_positive/safe_anchor": { + "n": 1257, + "images": 783, + "delta": 0.04893996253207441, + "ci": [ + 0.03708475903876858, + 0.06084868122234294 + ], + "helped": 517, + "harmed": 356, + "tied": 384, + "sign_p": 5.635362455675596e-8, + "paired_sd": 0.2099107683256046, + "approx_iid_mde80": 0.01658711733133577 + }, + "safe_positive/source_unconstrained_s11": { + "n": 1257, + "images": 783, + "delta": -0.05341386578951326, + "ci": [ + -0.06412107788091889, + -0.04185187028157284 + ], + "helped": 260, + "harmed": 549, + "tied": 448, + "sign_p": 1.359310509635919e-24, + "paired_sd": 0.19082615748610052, + "approx_iid_mde80": 0.015079054254139534 + }, + "safe_positive/constrained_0.05_s11": { + "n": 1257, + "images": 783, + "delta": 0.024118324385140465, + "ci": [ + 0.013771845372021523, + 0.035310255147493384 + ], + "helped": 420, + "harmed": 389, + "tied": 448, + "sign_p": 0.29153698532153705, + "paired_sd": 0.1876129549156565, + "approx_iid_mde80": 0.01482514747045976 + } + }, + "coverage": { + "all": { + "records": 49492, + "images": 3000 + }, + "old_supported": { + "records": 2809, + "images": 1410 + }, + "scope_safe": { + "records": 1557, + "images": 973 + }, + "old_relational": { + "records": 821, + "images": 424 + }, + "safe_relational": { + "records": 382, + "images": 286 + }, + "positive": { + "records": 31466, + "images": 2985 + }, + "safe_positive": { + "records": 1257, + "images": 783 + } + }, + "cost": { + "total_primary_query_requests": 51431, + "total_cf_query_requests": 53943, + "average_primary_requests": 1.0391780489776126, + "average_cf_requests": 1.089933726662895 + }, + "scope_reasons": { + "outside_grammar": 46683, + "accepted": 1557, + "nested_or_modified_clause": 522, + "exact_cardinality_unsupported": 688, + "nested_relation": 42 + }, + "exact_cf": { + "changed": 24, + "nogate_changed": 4 + }, + "added_abstention": { + "source_unconstrained_s11": 0.2994660903832708, + "target_unconstrained_s11": 0.02199199135574906, + "constrained_0.01_s11": 0, + "constrained_0.025_s11": 0, + "constrained_0.05_s11": 0.01690713786309032, + "constrained_0.1_s11": 0.028665861564863664 + } +} diff --git a/source/results/analysis/natural_groundedsam.json b/source/results/analysis/natural_groundedsam.json new file mode 100644 index 0000000000000000000000000000000000000000..553a3d1fb132ed1fe0d0a8eab21563ac0b9e13a8 --- /dev/null +++ b/source/results/analysis/natural_groundedsam.json @@ -0,0 +1,2508 @@ +{ + "records": 49492, + "images": 3000, + "tables": [ + { + "split": "val", + "grid": "scores", + "variant": "frozen", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2598947137107548, + "cIoU": 0.2825672629774077, + "positive_mIoU": 0.5989935915458922, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.6326070623591284 + }, + { + "split": "val", + "grid": "scores", + "variant": "action_only", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2598947137107548, + "cIoU": 0.2825672629774077, + "positive_mIoU": 0.5989935915458922, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.6326070623591284 + }, + { + "split": "val", + "grid": "scores", + "variant": "largest", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2272238141812776, + "cIoU": 0.261048242052473, + "positive_mIoU": 0.5116768692684822, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.5343726521412472 + }, + { + "split": "val", + "grid": "scores", + "variant": "global_direction", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.22756547645402572, + "cIoU": 0.2623619108633655, + "positive_mIoU": 0.5125900008385298, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.5353117956423742 + }, + { + "split": "val", + "grid": "scores", + "variant": "target_only", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.26134602755123776, + "cIoU": 0.28290944754443126, + "positive_mIoU": 0.5991158200650945, + "Nacc": 0.05940482874789444, + "false_empty": 0.002441773102930128, + "Pr50": 0.6339218632607062 + }, + { + "split": "val", + "grid": "scores", + "variant": "anchor_nogate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25879292818217675, + "cIoU": 0.2825531947421759, + "positive_mIoU": 0.5969880869842588, + "Nacc": 0.056597417181358786, + "false_empty": 0.002253944402704733, + "Pr50": 0.6311044327573253 + }, + { + "split": "val", + "grid": "scores", + "variant": "anchor_gate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25926669221172205, + "cIoU": 0.28274782145994004, + "positive_mIoU": 0.5978786182345217, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6314800901577761 + }, + { + "split": "val", + "grid": "scores", + "variant": "counterfactual_nogate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25873370835372056, + "cIoU": 0.28251564559538217, + "positive_mIoU": 0.5968298152075675, + "Nacc": 0.056597417181358786, + "false_empty": 0.002253944402704733, + "Pr50": 0.6309166040570999 + }, + { + "split": "val", + "grid": "scores", + "variant": "cacp", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2592350270780354, + "cIoU": 0.28269150208700644, + "positive_mIoU": 0.5977939895366955, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6311044327573253 + }, + { + "split": "val", + "grid": "scores", + "variant": "safe_anchor", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2596602570942857, + "cIoU": 0.2828626153739959, + "positive_mIoU": 0.598930465476069, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6326070623591284 + }, + { + "split": "val", + "grid": "scores", + "variant": "source_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.3318256449507227, + "cIoU": 0.2864992048005381, + "positive_mIoU": 0.5078037381675119, + "Nacc": 0.22661426165075801, + "false_empty": 0.1861382419233659, + "Pr50": 0.5443275732531931 + }, + { + "split": "val", + "grid": "scores", + "variant": "target_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.41803213926569854, + "cIoU": 0.27734200720611324, + "positive_mIoU": 0.5022876238939941, + "Nacc": 0.36765861875350925, + "false_empty": 0.16453794139744554, + "Pr50": 0.5294891059353869 + }, + { + "split": "val", + "grid": "scores", + "variant": "constrained_0.01_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2592350270780354, + "cIoU": 0.28269150208700644, + "positive_mIoU": 0.5977939895366955, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6311044327573253 + }, + { + "split": "val", + "grid": "scores", + "variant": "constrained_0.025_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2592350270780354, + "cIoU": 0.28269150208700644, + "positive_mIoU": 0.5977939895366955, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6311044327573253 + }, + { + "split": "val", + "grid": "scores", + "variant": "constrained_0.05_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.26661401704771076, + "cIoU": 0.2827225776933208, + "positive_mIoU": 0.5977931721585042, + "Nacc": 0.06861313868613139, + "false_empty": 0.002441773102930128, + "Pr50": 0.6311044327573253 + }, + { + "split": "val", + "grid": "scores", + "variant": "constrained_0.1_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.31207562131236355, + "cIoU": 0.28758171721419434, + "positive_mIoU": 0.5940127752918146, + "Nacc": 0.14351487928130263, + "false_empty": 0.012584522915101428, + "Pr50": 0.6267843726521413 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "frozen", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25983957772650035, + "cIoU": 0.28356029867316135, + "positive_mIoU": 0.5988462343107388, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.6322314049586777 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "action_only", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25983957772650035, + "cIoU": 0.28356029867316135, + "positive_mIoU": 0.5988462343107388, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.6322314049586777 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "largest", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2271904783943394, + "cIoU": 0.26147501992423194, + "positive_mIoU": 0.5115877755584252, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.5343726521412472 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "global_direction", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2275311232854544, + "cIoU": 0.2628931916220294, + "positive_mIoU": 0.5124981880594912, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.5353117956423742 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "target_only", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.26129155094319606, + "cIoU": 0.2839643310180812, + "positive_mIoU": 0.5989702250884179, + "Nacc": 0.05940482874789444, + "false_empty": 0.002441773102930128, + "Pr50": 0.6333583771600301 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "anchor_nogate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2587391230753023, + "cIoU": 0.28366298788539845, + "positive_mIoU": 0.5968442866713892, + "Nacc": 0.056597417181358786, + "false_empty": 0.002253944402704733, + "Pr50": 0.6305409466566492 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "anchor_gate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.2592124447012583, + "cIoU": 0.2836829924898619, + "positive_mIoU": 0.5977336355473714, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6309166040570999 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "counterfactual_nogate", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25867989955944737, + "cIoU": 0.2836263657819131, + "positive_mIoU": 0.5966860050397026, + "Nacc": 0.056597417181358786, + "false_empty": 0.002253944402704733, + "Pr50": 0.6303531179564238 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "cacp", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25918077057252437, + "cIoU": 0.2836245008221134, + "positive_mIoU": 0.5976489828092505, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6305409466566492 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25960518053340387, + "cIoU": 0.28383781110717393, + "positive_mIoU": 0.5987832670566873, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6322314049586777 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.3317797714168141, + "cIoU": 0.2863965959664144, + "positive_mIoU": 0.5076811358921575, + "Nacc": 0.22661426165075801, + "false_empty": 0.1861382419233659, + "Pr50": 0.5441397445529677 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "target_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.41798339484880537, + "cIoU": 0.2777887831081186, + "positive_mIoU": 0.5021573488549308, + "Nacc": 0.36765861875350925, + "false_empty": 0.16453794139744554, + "Pr50": 0.5291134485349361 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.01_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25918077057252437, + "cIoU": 0.2836245008221134, + "positive_mIoU": 0.5976489828092505, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6305409466566492 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.025_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25918077057252437, + "cIoU": 0.2836245008221134, + "positive_mIoU": 0.5976489828092505, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6305409466566492 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.26655976767784484, + "cIoU": 0.2836563716869841, + "positive_mIoU": 0.5976481845018885, + "Nacc": 0.06861313868613139, + "false_empty": 0.002441773102930128, + "Pr50": 0.6305409466566492 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.1_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.31202131857115506, + "cIoU": 0.2885251181348139, + "positive_mIoU": 0.5938676449941708, + "Nacc": 0.14351487928130263, + "false_empty": 0.012584522915101428, + "Pr50": 0.626220886551465 + }, + { + "split": "testA", + "grid": "scores", + "variant": "frozen", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4959964051658767, + "cIoU": 0.47167579769029344, + "positive_mIoU": 0.5638646271139393, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.5856832971800434 + }, + { + "split": "testA", + "grid": "scores", + "variant": "action_only", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4959964051658767, + "cIoU": 0.47167579769029344, + "positive_mIoU": 0.5638646271139393, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.5856832971800434 + }, + { + "split": "testA", + "grid": "scores", + "variant": "largest", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.44444956219573695, + "cIoU": 0.4224879596707497, + "positive_mIoU": 0.4967754605584429, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.5154555314533622 + }, + { + "split": "testA", + "grid": "scores", + "variant": "global_direction", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.45627923690056954, + "cIoU": 0.4372727203979696, + "positive_mIoU": 0.5121720003044289, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.538909978308026 + }, + { + "split": "testA", + "grid": "scores", + "variant": "target_only", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4953083259224523, + "cIoU": 0.470188451063724, + "positive_mIoU": 0.5626301421984194, + "Nacc": 0.2720323741007194, + "false_empty": 0.010574837310195227, + "Pr50": 0.5837852494577006 + }, + { + "split": "testA", + "grid": "scores", + "variant": "anchor_nogate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4949578519108248, + "cIoU": 0.4705329880468489, + "positive_mIoU": 0.5625807183221148, + "Nacc": 0.27068345323741005, + "false_empty": 0.008541214750542299, + "Pr50": 0.5841919739696312 + }, + { + "split": "testA", + "grid": "scores", + "variant": "anchor_gate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.49539262154523167, + "cIoU": 0.4706494900602283, + "positive_mIoU": 0.563078791599, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584666485900217 + }, + { + "split": "testA", + "grid": "scores", + "variant": "counterfactual_nogate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.49483305594114424, + "cIoU": 0.4705324594892438, + "positive_mIoU": 0.5624182940665652, + "Nacc": 0.27068345323741005, + "false_empty": 0.008541214750542299, + "Pr50": 0.5839886117136659 + }, + { + "split": "testA", + "grid": "scores", + "variant": "cacp", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.49539262154523167, + "cIoU": 0.47066040986612173, + "positive_mIoU": 0.563078791599, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584666485900217 + }, + { + "split": "testA", + "grid": "scores", + "variant": "safe_anchor", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.49605625589991653, + "cIoU": 0.47120327268216067, + "positive_mIoU": 0.5639425239478306, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.5852087852494577 + }, + { + "split": "testA", + "grid": "scores", + "variant": "source_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4551193044164223, + "cIoU": 0.4255996968511713, + "positive_mIoU": 0.4791411771146494, + "Nacc": 0.3754496402877698, + "false_empty": 0.19224511930585683, + "Pr50": 0.5033893709327549 + }, + { + "split": "testA", + "grid": "scores", + "variant": "target_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4864388267423586, + "cIoU": 0.4394480290655865, + "positive_mIoU": 0.4992967376256294, + "Nacc": 0.443794964028777, + "false_empty": 0.13557483731019523, + "Pr50": 0.5202684381778742 + }, + { + "split": "testA", + "grid": "scores", + "variant": "constrained_0.01_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.49539262154523167, + "cIoU": 0.47066040986612173, + "positive_mIoU": 0.563078791599, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584666485900217 + }, + { + "split": "testA", + "grid": "scores", + "variant": "constrained_0.025_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.49539262154523167, + "cIoU": 0.47066040986612173, + "positive_mIoU": 0.563078791599, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584666485900217 + }, + { + "split": "testA", + "grid": "scores", + "variant": "constrained_0.05_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.496505923838964, + "cIoU": 0.47065782532701755, + "positive_mIoU": 0.5626975147578708, + "Nacc": 0.27697841726618705, + "false_empty": 0.009693600867678958, + "Pr50": 0.5843275488069414 + }, + { + "split": "testA", + "grid": "scores", + "variant": "constrained_0.1_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.5017142094007612, + "cIoU": 0.47048136607179125, + "positive_mIoU": 0.5570033094153073, + "Nacc": 0.3183453237410072, + "false_empty": 0.02697939262472885, + "Pr50": 0.5786334056399133 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "frozen", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4957641166957091, + "cIoU": 0.4745197616153505, + "positive_mIoU": 0.56356229938704, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.5850732104121475 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "action_only", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4957641166957091, + "cIoU": 0.4745197616153505, + "positive_mIoU": 0.56356229938704, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.5850732104121475 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "largest", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.44425349760524313, + "cIoU": 0.4252428656297578, + "positive_mIoU": 0.4965202788788413, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.5147098698481561 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "global_direction", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.45606415100750025, + "cIoU": 0.44000629616668385, + "positive_mIoU": 0.5118920620488073, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.538232104121475 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "target_only", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4950730118045944, + "cIoU": 0.47309726931573354, + "positive_mIoU": 0.5623238765352638, + "Nacc": 0.2720323741007194, + "false_empty": 0.010574837310195227, + "Pr50": 0.5832429501084598 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "anchor_nogate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4947246948057364, + "cIoU": 0.4734495850213585, + "positive_mIoU": 0.5622772600508499, + "Nacc": 0.27068345323741005, + "false_empty": 0.008541214750542299, + "Pr50": 0.5835818872017353 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "anchor_gate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.495159367880164, + "cIoU": 0.4734910926818755, + "positive_mIoU": 0.5627752076531419, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584056399132321 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "counterfactual_nogate", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4945998040385743, + "cIoU": 0.4734381375785082, + "positive_mIoU": 0.5621147124146302, + "Nacc": 0.27068345323741005, + "false_empty": 0.008541214750542299, + "Pr50": 0.58337852494577 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "cacp", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.495159367880164, + "cIoU": 0.47350115034895585, + "positive_mIoU": 0.5627752076531419, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584056399132321 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.49582096488448796, + "cIoU": 0.4740132297294638, + "positive_mIoU": 0.5636362883529128, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584666485900217 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4548901565403726, + "cIoU": 0.4284784677497938, + "positive_mIoU": 0.4788429369289015, + "Nacc": 0.3754496402877698, + "false_empty": 0.19224511930585683, + "Pr50": 0.502847071583514 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "target_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4862400944583618, + "cIoU": 0.44088657843833406, + "positive_mIoU": 0.49903808389374626, + "Nacc": 0.443794964028777, + "false_empty": 0.13557483731019523, + "Pr50": 0.5197261388286334 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.01_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.495159367880164, + "cIoU": 0.47350115034895585, + "positive_mIoU": 0.5627752076531419, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584056399132321 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.025_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.495159367880164, + "cIoU": 0.47350115034895585, + "positive_mIoU": 0.5627752076531419, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584056399132321 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4962745118579765, + "cIoU": 0.4734962736041272, + "positive_mIoU": 0.5623963277978004, + "Nacc": 0.27697841726618705, + "false_empty": 0.009693600867678958, + "Pr50": 0.5837174620390455 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.1_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.5014976655694641, + "cIoU": 0.4732949959282839, + "positive_mIoU": 0.5567214736262005, + "Nacc": 0.3183453237410072, + "false_empty": 0.02697939262472885, + "Pr50": 0.5778877440347071 + }, + { + "split": "testB", + "grid": "scores", + "variant": "frozen", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3936462727230193, + "cIoU": 0.3505914204464129, + "positive_mIoU": 0.46296225449954864, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.44723441615452153 + }, + { + "split": "testB", + "grid": "scores", + "variant": "action_only", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3936462727230193, + "cIoU": 0.3505914204464129, + "positive_mIoU": 0.46296225449954864, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.44723441615452153 + }, + { + "split": "testB", + "grid": "scores", + "variant": "largest", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.36511432298233215, + "cIoU": 0.32840832262327974, + "positive_mIoU": 0.4227244398652504, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.4280948200175593 + }, + { + "split": "testB", + "grid": "scores", + "variant": "global_direction", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3702108435054149, + "cIoU": 0.3345398811066874, + "positive_mIoU": 0.4299119209154942, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.4384547848990342 + }, + { + "split": "testB", + "grid": "scores", + "variant": "target_only", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3966561499967293, + "cIoU": 0.3524679777500775, + "positive_mIoU": 0.46632903752392124, + "Nacc": 0.22683500962978814, + "false_empty": 0.007374890254609306, + "Pr50": 0.4520632133450395 + }, + { + "split": "testB", + "grid": "scores", + "variant": "anchor_nogate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39526481979215605, + "cIoU": 0.3536051960715899, + "positive_mIoU": 0.46524484638467095, + "Nacc": 0.2246950567087524, + "false_empty": 0.0064969271290605795, + "Pr50": 0.4517998244073749 + }, + { + "split": "testB", + "grid": "scores", + "variant": "anchor_gate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39589109980857284, + "cIoU": 0.3531988684921792, + "positive_mIoU": 0.4661280716615545, + "Nacc": 0.2246950567087524, + "false_empty": 0.006760316066725197, + "Pr50": 0.45223880597014926 + }, + { + "split": "testB", + "grid": "scores", + "variant": "counterfactual_nogate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39517274960943527, + "cIoU": 0.3536321918672057, + "positive_mIoU": 0.4651150023684248, + "Nacc": 0.2246950567087524, + "false_empty": 0.0064969271290605795, + "Pr50": 0.4517998244073749 + }, + { + "split": "testB", + "grid": "scores", + "variant": "cacp", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3959172202080519, + "cIoU": 0.3532660051441571, + "positive_mIoU": 0.46616490853397174, + "Nacc": 0.2246950567087524, + "false_empty": 0.006760316066725197, + "Pr50": 0.4523266022827041 + }, + { + "split": "testB", + "grid": "scores", + "variant": "safe_anchor", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39604976036036094, + "cIoU": 0.3531657962959382, + "positive_mIoU": 0.466351826221991, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.4523266022827041 + }, + { + "split": "testB", + "grid": "scores", + "variant": "source_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.37984838371245166, + "cIoU": 0.334484138413756, + "positive_mIoU": 0.38942094710914066, + "Nacc": 0.3565161566445538, + "false_empty": 0.22054433713784022, + "Pr50": 0.38647936786654963 + }, + { + "split": "testB", + "grid": "scores", + "variant": "target_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39484149016794184, + "cIoU": 0.3172877448156452, + "positive_mIoU": 0.3734274676529983, + "Nacc": 0.4470361652043655, + "false_empty": 0.22019315188762073, + "Pr50": 0.3641791044776119 + }, + { + "split": "testB", + "grid": "scores", + "variant": "constrained_0.01_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3959172202080519, + "cIoU": 0.3532660051441571, + "positive_mIoU": 0.46616490853397174, + "Nacc": 0.2246950567087524, + "false_empty": 0.006760316066725197, + "Pr50": 0.4523266022827041 + }, + { + "split": "testB", + "grid": "scores", + "variant": "constrained_0.025_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3959172202080519, + "cIoU": 0.3532660051441571, + "positive_mIoU": 0.46616490853397174, + "Nacc": 0.2246950567087524, + "false_empty": 0.006760316066725197, + "Pr50": 0.4523266022827041 + }, + { + "split": "testB", + "grid": "scores", + "variant": "constrained_0.05_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3977083325573535, + "cIoU": 0.3532743932127546, + "positive_mIoU": 0.4660569750543256, + "Nacc": 0.2311149154718596, + "false_empty": 0.008077260755048289, + "Pr50": 0.45215100965759436 + }, + { + "split": "testB", + "grid": "scores", + "variant": "constrained_0.1_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40900638719651294, + "cIoU": 0.35456205108076844, + "positive_mIoU": 0.458021913743423, + "Nacc": 0.28953563021613526, + "false_empty": 0.034767339771729584, + "Pr50": 0.4453906935908692 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "frozen", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39357218117955056, + "cIoU": 0.35370129488655183, + "positive_mIoU": 0.4628577652578685, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.44714661984196663 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "action_only", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39357218117955056, + "cIoU": 0.35370129488655183, + "positive_mIoU": 0.4628577652578685, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.44714661984196663 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "largest", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3650492339724511, + "cIoU": 0.33083805349340106, + "positive_mIoU": 0.4226326466461354, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.4281826163301141 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "global_direction", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3701535062847476, + "cIoU": 0.33692501035910066, + "positive_mIoU": 0.42983105982896397, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.43863037752414397 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "target_only", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39653022374177904, + "cIoU": 0.3552590172532012, + "positive_mIoU": 0.4661514472312728, + "Nacc": 0.22683500962978814, + "false_empty": 0.007374890254609306, + "Pr50": 0.4519754170324846 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "anchor_nogate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3951311617035936, + "cIoU": 0.35636246974456176, + "positive_mIoU": 0.4650563521022672, + "Nacc": 0.2246950567087524, + "false_empty": 0.0064969271290605795, + "Pr50": 0.45171202809482003 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "anchor_gate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39575731769442046, + "cIoU": 0.35600016784019506, + "positive_mIoU": 0.4659394024693131, + "Nacc": 0.2246950567087524, + "false_empty": 0.006760316066725197, + "Pr50": 0.45215100965759436 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "counterfactual_nogate", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39503820782762794, + "cIoU": 0.3563539981185699, + "positive_mIoU": 0.4649252618380324, + "Nacc": 0.2246950567087524, + "false_empty": 0.0064969271290605795, + "Pr50": 0.45171202809482003 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "cacp", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39578319167058307, + "cIoU": 0.35606704393381045, + "positive_mIoU": 0.4659758918177854, + "Nacc": 0.2246950567087524, + "false_empty": 0.006760316066725197, + "Pr50": 0.45223880597014926 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39591626706805716, + "cIoU": 0.35600945983298743, + "positive_mIoU": 0.4661635643471644, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.45223880597014926 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.37977370185597503, + "cIoU": 0.3375546963558787, + "positive_mIoU": 0.3893156253654546, + "Nacc": 0.3565161566445538, + "false_empty": 0.22054433713784022, + "Pr50": 0.38665496049165937 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "target_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39473376770523905, + "cIoU": 0.3180167413277286, + "positive_mIoU": 0.37327554966191884, + "Nacc": 0.4470361652043655, + "false_empty": 0.22019315188762073, + "Pr50": 0.3640913081650571 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.01_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39578319167058307, + "cIoU": 0.35606704393381045, + "positive_mIoU": 0.4659758918177854, + "Nacc": 0.2246950567087524, + "false_empty": 0.006760316066725197, + "Pr50": 0.45223880597014926 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.025_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39578319167058307, + "cIoU": 0.35606704393381045, + "positive_mIoU": 0.4659758918177854, + "Nacc": 0.2246950567087524, + "false_empty": 0.006760316066725197, + "Pr50": 0.45223880597014926 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3975770581215255, + "cIoU": 0.35607491891548604, + "positive_mIoU": 0.46587184237103285, + "Nacc": 0.2311149154718596, + "false_empty": 0.008077260755048289, + "Pr50": 0.4520632133450395 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.1_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4088815827215675, + "cIoU": 0.35762630540252005, + "positive_mIoU": 0.4578459054658945, + "Nacc": 0.28953563021613526, + "false_empty": 0.034767339771729584, + "Pr50": 0.4453028972783143 + }, + { + "split": "all", + "grid": "scores", + "variant": "frozen", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3948984268028171, + "cIoU": 0.37590069444584434, + "positive_mIoU": 0.5332839553589596, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.5435072776965614 + }, + { + "split": "all", + "grid": "scores", + "variant": "action_only", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3948984268028171, + "cIoU": 0.37590069444584434, + "positive_mIoU": 0.5332839553589596, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.5435072776965614 + }, + { + "split": "all", + "grid": "scores", + "variant": "largest", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.35624809294853216, + "cIoU": 0.34453809508981786, + "positive_mIoU": 0.47249191559806625, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.4870336235937202 + }, + { + "split": "all", + "grid": "scores", + "variant": "global_direction", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.36258965675629895, + "cIoU": 0.3529207624682938, + "positive_mIoU": 0.4824663856919452, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.5019386003940761 + }, + { + "split": "all", + "grid": "scores", + "variant": "target_only", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3960256247703691, + "cIoU": 0.3760512571415462, + "positive_mIoU": 0.5339445821246777, + "Nacc": 0.15527571285920339, + "false_empty": 0.008040424585266636, + "Pr50": 0.5445878090637514 + }, + { + "split": "all", + "grid": "scores", + "variant": "anchor_nogate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3947040760549873, + "cIoU": 0.3766004904067189, + "positive_mIoU": 0.5331689484559026, + "Nacc": 0.1530012204593365, + "false_empty": 0.0067374308777728344, + "Pr50": 0.5442064450518019 + }, + { + "split": "all", + "grid": "scores", + "variant": "anchor_gate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3952122127490129, + "cIoU": 0.37647712670088446, + "positive_mIoU": 0.5338728415869238, + "Nacc": 0.1531676467324975, + "false_empty": 0.006832771880760186, + "Pr50": 0.5446513697324096 + }, + { + "split": "all", + "grid": "scores", + "variant": "counterfactual_nogate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39460875469189804, + "cIoU": 0.37660565499132936, + "positive_mIoU": 0.5330190201236705, + "Nacc": 0.1530012204593365, + "false_empty": 0.0067374308777728344, + "Pr50": 0.5440793237144855 + }, + { + "split": "all", + "grid": "scores", + "variant": "cacp", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3952115865627527, + "cIoU": 0.37648164472632145, + "positive_mIoU": 0.5338718566758963, + "Nacc": 0.1531676467324975, + "false_empty": 0.006832771880760186, + "Pr50": 0.5446195893980804 + }, + { + "split": "all", + "grid": "scores", + "variant": "safe_anchor", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39563430882044504, + "cIoU": 0.3766703541490416, + "positive_mIoU": 0.5345367448084112, + "Nacc": 0.1531676467324975, + "false_empty": 0.006864552215089303, + "Pr50": 0.5451280747473464 + }, + { + "split": "all", + "grid": "scores", + "variant": "source_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39524251059509113, + "cIoU": 0.3569032763966694, + "positive_mIoU": 0.4515140893145698, + "Nacc": 0.2970154221679796, + "false_empty": 0.20145553931227356, + "Pr50": 0.46799720333057904 + }, + { + "split": "all", + "grid": "scores", + "variant": "target_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.43704323203007683, + "cIoU": 0.3542042700509594, + "positive_mIoU": 0.45424088348161695, + "Nacc": 0.4070231887273938, + "false_empty": 0.1711053200279667, + "Pr50": 0.4653276552469332 + }, + { + "split": "all", + "grid": "scores", + "variant": "constrained_0.01_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3952115865627527, + "cIoU": 0.37648164472632145, + "positive_mIoU": 0.5338718566758963, + "Nacc": 0.1531676467324975, + "false_empty": 0.006832771880760186, + "Pr50": 0.5446195893980804 + }, + { + "split": "all", + "grid": "scores", + "variant": "constrained_0.025_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3952115865627527, + "cIoU": 0.37648164472632145, + "positive_mIoU": 0.5338718566758963, + "Nacc": 0.1531676467324975, + "false_empty": 0.006832771880760186, + "Pr50": 0.5446195893980804 + }, + { + "split": "all", + "grid": "scores", + "variant": "constrained_0.05_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39834626873330553, + "cIoU": 0.37649451970041947, + "positive_mIoU": 0.533653897290687, + "Nacc": 0.16215466548319094, + "false_empty": 0.00788152291362105, + "Pr50": 0.5443971270577767 + }, + { + "split": "all", + "grid": "scores", + "variant": "constrained_0.1_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4171039043418294, + "cIoU": 0.3789602637709627, + "positive_mIoU": 0.5274361670910133, + "Nacc": 0.22450904249417508, + "false_empty": 0.027362867857369858, + "Pr50": 0.5385495455412191 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "frozen", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3947684138510286, + "cIoU": 0.378485528674543, + "positive_mIoU": 0.5330794615875901, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.5431259136846119 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "action_only", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3947684138510286, + "cIoU": 0.378485528674543, + "positive_mIoU": 0.5330794615875901, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.5431259136846119 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "largest", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.35614132216102007, + "cIoU": 0.3466388335869054, + "positive_mIoU": 0.4723239787832328, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.48671582025042903 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "global_direction", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3624777302195231, + "cIoU": 0.3550326713675089, + "positive_mIoU": 0.48229033954187495, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.5016843577194432 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "target_only", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39587780427105684, + "cIoU": 0.37854975603345825, + "positive_mIoU": 0.5337120793549591, + "Nacc": 0.15527571285920339, + "false_empty": 0.008040424585266636, + "Pr50": 0.5442064450518019 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "anchor_nogate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39455477598305666, + "cIoU": 0.37910801708857744, + "positive_mIoU": 0.532934118507387, + "Nacc": 0.1530012204593365, + "false_empty": 0.0067374308777728344, + "Pr50": 0.5437933007055235 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "anchor_gate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3950627077725457, + "cIoU": 0.3789245430065969, + "positive_mIoU": 0.5336376893497373, + "Nacc": 0.1531676467324975, + "false_empty": 0.006832771880760186, + "Pr50": 0.5442382253861311 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "counterfactual_nogate", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39445912997468663, + "cIoU": 0.37909530345515785, + "positive_mIoU": 0.5327836795495834, + "Nacc": 0.1530012204593365, + "false_empty": 0.0067374308777728344, + "Pr50": 0.5436661793682069 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "cacp", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3950619990216636, + "cIoU": 0.378927623089996, + "positive_mIoU": 0.5336365745751025, + "Nacc": 0.1531676467324975, + "false_empty": 0.006832771880760186, + "Pr50": 0.5442064450518019 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3954838688577179, + "cIoU": 0.3791343724706563, + "positive_mIoU": 0.5343001219572292, + "Nacc": 0.1531676467324975, + "false_empty": 0.006864552215089303, + "Pr50": 0.5447784910697261 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3951161873833655, + "cIoU": 0.3591601362485221, + "positive_mIoU": 0.4513153990331637, + "Nacc": 0.2970154221679796, + "false_empty": 0.20145553931227356, + "Pr50": 0.4677747409902752 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "target_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.43691715932986047, + "cIoU": 0.3553712538485391, + "positive_mIoU": 0.4540425872228263, + "Nacc": 0.4070231887273938, + "false_empty": 0.1711053200279667, + "Pr50": 0.4649780715693129 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.01_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3950619990216636, + "cIoU": 0.378927623089996, + "positive_mIoU": 0.5336365745751025, + "Nacc": 0.1531676467324975, + "false_empty": 0.006832771880760186, + "Pr50": 0.5442064450518019 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.025_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3950619990216636, + "cIoU": 0.378927623089996, + "positive_mIoU": 0.5336365745751025, + "Nacc": 0.1531676467324975, + "false_empty": 0.006832771880760186, + "Pr50": 0.5442064450518019 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39819829157373454, + "cIoU": 0.3789397420664814, + "positive_mIoU": 0.533421148114386, + "Nacc": 0.16215466548319094, + "false_empty": 0.00788152291362105, + "Pr50": 0.5439839827114982 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.1_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4169637796843776, + "cIoU": 0.3815372246379147, + "positive_mIoU": 0.527215768897833, + "Nacc": 0.22450904249417508, + "false_empty": 0.027362867857369858, + "Pr50": 0.5380728405262823 + } + ], + "comparisons": { + "all/anchor_gate": { + "n": 49492, + "images": 3000, + "delta": 0.00029429392151707814, + "ci": [ + -0.00018537974058767355, + 0.000773944716226568 + ], + "helped": 962, + "harmed": 936, + "tied": 47594, + "sign_p": 0.5660865555734518, + "paired_sd": 0.04960875953989398, + "approx_iid_mde80": 0.000624733367921029 + }, + "all/cacp": { + "n": 49492, + "images": 3000, + "delta": 0.00029358517063499736, + "ci": [ + -0.0001759897208230776, + 0.0007812018461668709 + ], + "helped": 958, + "harmed": 935, + "tied": 47599, + "sign_p": 0.6131161760540024, + "paired_sd": 0.049459684347975805, + "approx_iid_mde80": 0.000622856033200623 + }, + "all/safe_anchor": { + "n": 49492, + "images": 3000, + "delta": 0.0007154550066892769, + "ci": [ + 0.00034917566727769893, + 0.0010771329425123598 + ], + "helped": 590, + "harmed": 497, + "tied": 48405, + "sign_p": 0.005239989968083901, + "paired_sd": 0.04062201491654927, + "approx_iid_mde80": 0.0005115614344306651 + }, + "all/source_unconstrained_s11": { + "n": 49492, + "images": 3000, + "delta": 0.00034777353233694965, + "ci": [ + -0.0030443842162695585, + 0.0038719268561381755 + ], + "helped": 3217, + "harmed": 6695, + "tied": 39580, + "sign_p": 6.1491514470663064e-273, + "paired_sd": 0.2921593199485373, + "approx_iid_mde80": 0.00367922273432756 + }, + "all/constrained_0.05_s11": { + "n": 49492, + "images": 3000, + "delta": 0.003429877722705895, + "ci": [ + 0.002702137041318359, + 0.00418432565878338 + ], + "helped": 1105, + "harmed": 938, + "tied": 47449, + "sign_p": 0.00023833660634386557, + "paired_sd": 0.07473562167867685, + "approx_iid_mde80": 0.0009411611390412815 + }, + "old_supported/anchor_gate": { + "n": 2809, + "images": 1410, + "delta": 0.005185188595131089, + "ci": [ + -0.003079918690535931, + 0.012958319118789526 + ], + "helped": 962, + "harmed": 936, + "tied": 911, + "sign_p": 0.5660865555734518, + "paired_sd": 0.20820727002007608, + "approx_iid_mde80": 0.01100585679230001 + }, + "old_supported/cacp": { + "n": 2809, + "images": 1410, + "delta": 0.005172701055559733, + "ci": [ + -0.0029961673036336713, + 0.012821657840771845 + ], + "helped": 958, + "harmed": 935, + "tied": 916, + "sign_p": 0.6131161760540024, + "paired_sd": 0.20758153079608457, + "approx_iid_mde80": 0.010972780155312688 + }, + "old_supported/safe_anchor": { + "n": 2809, + "images": 1410, + "delta": 0.012605660089379031, + "ci": [ + 0.006010749703666618, + 0.01843250687670357 + ], + "helped": 590, + "harmed": 497, + "tied": 1722, + "sign_p": 0.005239989968083901, + "paired_sd": 0.17009974405852105, + "approx_iid_mde80": 0.008991489218097204 + }, + "old_supported/source_unconstrained_s11": { + "n": 2809, + "images": 1410, + "delta": -0.07699547540094762, + "ci": [ + -0.09148822319556393, + -0.06258287967236753 + ], + "helped": 728, + "harmed": 1370, + "tied": 711, + "sign_p": 3.4608487595158235e-45, + "paired_sd": 0.365799073024821, + "approx_iid_mde80": 0.01933617501482575 + }, + "old_supported/constrained_0.05_s11": { + "n": 2809, + "images": 1410, + "delta": 0.005613339922611913, + "ci": [ + -0.0025319947550198722, + 0.013708295796060994 + ], + "helped": 951, + "harmed": 936, + "tied": 922, + "sign_p": 0.7472453452447086, + "paired_sd": 0.20922563934056215, + "approx_iid_mde80": 0.011059687894844418 + }, + "scope_safe/anchor_gate": { + "n": 1557, + "images": 973, + "delta": 0.02274200333401779, + "ci": [ + 0.011841469045159534, + 0.0330840964490847 + ], + "helped": 590, + "harmed": 497, + "tied": 470, + "sign_p": 0.005239989968083901, + "paired_sd": 0.22800060711897935, + "approx_iid_mde80": 0.016188087174686294 + }, + "scope_safe/cacp": { + "n": 1557, + "images": 973, + "delta": 0.022779174841014986, + "ci": [ + 0.011872120725655124, + 0.0331200978676498 + ], + "helped": 590, + "harmed": 497, + "tied": 470, + "sign_p": 0.005239989968083901, + "paired_sd": 0.22800166442239736, + "approx_iid_mde80": 0.01618816224343333 + }, + "scope_safe/safe_anchor": { + "n": 1557, + "images": 973, + "delta": 0.02274200333401779, + "ci": [ + 0.011841469045159534, + 0.0330840964490847 + ], + "helped": 590, + "harmed": 497, + "tied": 470, + "sign_p": 0.005239989968083901, + "paired_sd": 0.22800060711897935, + "approx_iid_mde80": 0.016188087174686294 + }, + "scope_safe/source_unconstrained_s11": { + "n": 1557, + "images": 973, + "delta": -0.05491976689789844, + "ci": [ + -0.07441492871132499, + -0.034935583348317166 + ], + "helped": 446, + "harmed": 738, + "tied": 373, + "sign_p": 1.896988861274396e-17, + "paired_sd": 0.38647108606307207, + "approx_iid_mde80": 0.027439521809781688 + }, + "scope_safe/constrained_0.05_s11": { + "n": 1557, + "images": 973, + "delta": 0.02228961451831079, + "ci": [ + 0.01119209890952658, + 0.03299772448781509 + ], + "helped": 581, + "harmed": 498, + "tied": 478, + "sign_p": 0.012512639465754075, + "paired_sd": 0.22796214194223785, + "approx_iid_mde80": 0.016185356139702883 + }, + "old_relational/anchor_gate": { + "n": 821, + "images": 424, + "delta": 0.010662669899216194, + "ci": [ + -0.0000266453002713522, + 0.021613883622592485 + ], + "helped": 62, + "harmed": 40, + "tied": 719, + "sign_p": 0.03706676743856045, + "paired_sd": 0.14051214519044364, + "approx_iid_mde80": 0.013738715266456406 + }, + "old_relational/cacp": { + "n": 821, + "images": 424, + "delta": 0.010619944565895928, + "ci": [ + 0.000275826041385952, + 0.021090888138455943 + ], + "helped": 58, + "harmed": 39, + "tied": 724, + "sign_p": 0.06705179535289094, + "paired_sd": 0.13730691281904914, + "approx_iid_mde80": 0.013425320471624019 + }, + "old_relational/safe_anchor": { + "n": 821, + "images": 424, + "delta": 0.009234814447512387, + "ci": [ + 0.0030502219254708225, + 0.016776399073144158 + ], + "helped": 19, + "harmed": 10, + "tied": 792, + "sign_p": 0.13604594767093658, + "paired_sd": 0.08931068333028526, + "approx_iid_mde80": 0.008732441219685357 + }, + "old_relational/source_unconstrained_s11": { + "n": 821, + "images": 424, + "delta": 0.07713888113391923, + "ci": [ + 0.05192823880395501, + 0.10414259551148912 + ], + "helped": 136, + "harmed": 134, + "tied": 551, + "sign_p": 0.9514872319029763, + "paired_sd": 0.35883668551558073, + "approx_iid_mde80": 0.03508561514576333 + }, + "old_relational/constrained_0.05_s11": { + "n": 821, + "images": 424, + "delta": 0.016710078548843554, + "ci": [ + 0.00551584206203646, + 0.028864217356862818 + ], + "helped": 63, + "harmed": 39, + "tied": 719, + "sign_p": 0.02229766182469301, + "paired_sd": 0.1574296757320575, + "approx_iid_mde80": 0.015392843703594665 + }, + "safe_relational/anchor_gate": { + "n": 382, + "images": 286, + "delta": 0.019847598590072436, + "ci": [ + 0.006344380713843232, + 0.03442947563858501 + ], + "helped": 19, + "harmed": 10, + "tied": 353, + "sign_p": 0.13604594767093658, + "paired_sd": 0.13021466897174166, + "approx_iid_mde80": 0.018665175040763354 + }, + "safe_relational/cacp": { + "n": 382, + "images": 286, + "delta": 0.019999106538749478, + "ci": [ + 0.006524192032927455, + 0.03455016724253577 + ], + "helped": 19, + "harmed": 10, + "tied": 353, + "sign_p": 0.13604594767093658, + "paired_sd": 0.13022553906521578, + "approx_iid_mde80": 0.018666733177024084 + }, + "safe_relational/safe_anchor": { + "n": 382, + "images": 286, + "delta": 0.019847598590072436, + "ci": [ + 0.006344380713843232, + 0.03442947563858501 + ], + "helped": 19, + "harmed": 10, + "tied": 353, + "sign_p": 0.13604594767093658, + "paired_sd": 0.13021466897174166, + "approx_iid_mde80": 0.018665175040763354 + }, + "safe_relational/source_unconstrained_s11": { + "n": 382, + "images": 286, + "delta": 0.1719114835961556, + "ci": [ + 0.13385947839132062, + 0.21267739980634526 + ], + "helped": 80, + "harmed": 28, + "tied": 274, + "sign_p": 5.648694223312712e-7, + "paired_sd": 0.38714624579299395, + "approx_iid_mde80": 0.055494150552798306 + }, + "safe_relational/constrained_0.05_s11": { + "n": 382, + "images": 286, + "delta": 0.027852509680110733, + "ci": [ + 0.012693526588023838, + 0.04503156095864471 + ], + "helped": 22, + "harmed": 10, + "tied": 350, + "sign_p": 0.050102459732443094, + "paired_sd": 0.1563838942896022, + "approx_iid_mde80": 0.022416312874128687 + }, + "positive/anchor_gate": { + "n": 31466, + "images": 2985, + "delta": 0.0005582277621471821, + "ci": [ + -0.00015596881598378454, + 0.0012700640463090668 + ], + "helped": 962, + "harmed": 933, + "tied": 29571, + "sign_p": 0.5200980070495975, + "paired_sd": 0.061444363217392384, + "approx_iid_mde80": 0.0009704320154634612 + }, + "positive/cacp": { + "n": 31466, + "images": 2985, + "delta": 0.0005571129875124671, + "ci": [ + -0.00014039795528625454, + 0.0012575747508407028 + ], + "helped": 958, + "harmed": 932, + "tied": 29576, + "sign_p": 0.5652658391694269, + "paired_sd": 0.06125504790628315, + "approx_iid_mde80": 0.0009674420318539341 + }, + "positive/safe_anchor": { + "n": 31466, + "images": 2985, + "delta": 0.0012206603696391565, + "ci": [ + 0.0006619418756154202, + 0.00179214763596632 + ], + "helped": 590, + "harmed": 494, + "tied": 30382, + "sign_p": 0.0038887380291072133, + "paired_sd": 0.049994733065755, + "approx_iid_mde80": 0.0007896003316025144 + }, + "positive/source_unconstrained_s11": { + "n": 31466, + "images": 2985, + "delta": -0.08176406255442635, + "ci": [ + -0.08628675942618148, + -0.07720121299022166 + ], + "helped": 624, + "harmed": 6692, + "tied": 24150, + "sign_p": 0, + "paired_sd": 0.21229123574251074, + "approx_iid_mde80": 0.003352857788401968 + }, + "positive/constrained_0.05_s11": { + "n": 31466, + "images": 2985, + "delta": 0.000341686526795911, + "ci": [ + -0.0003803140816830466, + 0.0010619764130213223 + ], + "helped": 946, + "harmed": 938, + "tied": 29582, + "sign_p": 0.8718850554668589, + "paired_sd": 0.061240483355746486, + "approx_iid_mde80": 0.0009672120041444499 + }, + "safe_positive/anchor_gate": { + "n": 1257, + "images": 783, + "delta": 0.030556323938795305, + "ci": [ + 0.016512587415315232, + 0.04389657310137775 + ], + "helped": 590, + "harmed": 494, + "tied": 173, + "sign_p": 0.0038887380291072133, + "paired_sd": 0.24843325332509517, + "approx_iid_mde80": 0.019631158300163144 + }, + "safe_positive/cacp": { + "n": 1257, + "images": 783, + "delta": 0.030602366927176078, + "ci": [ + 0.01660379745320689, + 0.04393946249166157 + ], + "helped": 590, + "harmed": 494, + "tied": 173, + "sign_p": 0.0038887380291072133, + "paired_sd": 0.24843300521164302, + "approx_iid_mde80": 0.019631138694275484 + }, + "safe_positive/safe_anchor": { + "n": 1257, + "images": 783, + "delta": 0.030556323938795305, + "ci": [ + 0.016512587415315232, + 0.04389657310137775 + ], + "helped": 590, + "harmed": 494, + "tied": 173, + "sign_p": 0.0038887380291072133, + "paired_sd": 0.24843325332509517, + "approx_iid_mde80": 0.019631158300163144 + }, + "safe_positive/source_unconstrained_s11": { + "n": 1257, + "images": 783, + "delta": -0.12212416631664906, + "ci": [ + -0.14278674095370744, + -0.10257894312613859 + ], + "helped": 375, + "harmed": 735, + "tied": 147, + "sign_p": 1.5636781236774908e-27, + "paired_sd": 0.33901424669191466, + "approx_iid_mde80": 0.026788854767806018 + }, + "safe_positive/constrained_0.05_s11": { + "n": 1257, + "images": 783, + "delta": 0.025222696742251315, + "ci": [ + 0.01111771623233758, + 0.039394182033901146 + ], + "helped": 578, + "harmed": 498, + "tied": 181, + "sign_p": 0.015985148704445916, + "paired_sd": 0.24893742379477873, + "approx_iid_mde80": 0.01967099777482346 + } + }, + "coverage": { + "all": { + "records": 49492, + "images": 3000 + }, + "old_supported": { + "records": 2809, + "images": 1410 + }, + "scope_safe": { + "records": 1557, + "images": 973 + }, + "old_relational": { + "records": 821, + "images": 424 + }, + "safe_relational": { + "records": 382, + "images": 286 + }, + "positive": { + "records": 31466, + "images": 2985 + }, + "safe_positive": { + "records": 1257, + "images": 783 + } + }, + "cost": { + "total_primary_query_requests": 51431, + "total_cf_query_requests": 53943, + "average_primary_requests": 1.0391780489776126, + "average_cf_requests": 1.089933726662895 + }, + "scope_reasons": { + "outside_grammar": 46683, + "accepted": 1557, + "nested_or_modified_clause": 522, + "exact_cardinality_unsupported": 688, + "nested_relation": 42 + }, + "exact_cf": { + "changed": 14, + "nogate_changed": 64 + }, + "added_abstention": { + "source_unconstrained_s11": 0.19462276743151338, + "target_unconstrained_s11": 0.16427254814720652, + "constrained_0.01_s11": 0, + "constrained_0.025_s11": 0, + "constrained_0.05_s11": 0.0010487510328608656, + "constrained_0.1_s11": 0.020530095976609673 + } +} diff --git a/source/results/analysis/paper_results.json b/source/results/analysis/paper_results.json new file mode 100644 index 0000000000000000000000000000000000000000..4905dc7fbf28731a241b76300539c833b39e0ee4 --- /dev/null +++ b/source/results/analysis/paper_results.json @@ -0,0 +1,2184 @@ +{ + "natural": { + "clipseg": { + "tables": [ + { + "split": "val", + "grid": "official480_scores", + "variant": "frozen", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5848092276958614, + "cIoU": 0.2948740239673872, + "positive_mIoU": 0.30376605951998764, + "Nacc": 0.752835485682201, + "false_empty": 0.23873027798647634, + "Pr50": 0.2736664162283997 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5845803980764505, + "cIoU": 0.29512763248735574, + "positive_mIoU": 0.3039058009447432, + "Nacc": 0.7523862998315554, + "false_empty": 0.23873027798647634, + "Pr50": 0.2738542449286251 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.6605471284178085, + "cIoU": 0.266341401860431, + "positive_mIoU": 0.23909186518726466, + "Nacc": 0.912521055586749, + "false_empty": 0.5495867768595041, + "Pr50": 0.24511645379413974 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5992343942514419, + "cIoU": 0.29542123236593315, + "positive_mIoU": 0.3034384289638929, + "Nacc": 0.7760808534531163, + "false_empty": 0.25075131480090157, + "Pr50": 0.27554470323065366 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "frozen", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3631019370238275, + "cIoU": 0.2749623142612412, + "positive_mIoU": 0.25681651239543707, + "Nacc": 0.7156025179856115, + "false_empty": 0.302060737527115, + "Pr50": 0.2245797180043384 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3656252455970457, + "cIoU": 0.27911723381690834, + "positive_mIoU": 0.26010064502869285, + "Nacc": 0.7156025179856115, + "false_empty": 0.2959598698481562, + "Pr50": 0.22885032537960953 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.3538771167479468, + "cIoU": 0.23506049943219656, + "positive_mIoU": 0.18705535802335818, + "Nacc": 0.9071492805755396, + "false_empty": 0.6372017353579176, + "Pr50": 0.18831344902386118 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.37158895689857907, + "cIoU": 0.2779040613556853, + "positive_mIoU": 0.2582367117985845, + "Nacc": 0.7475269784172662, + "false_empty": 0.31636388286334055, + "Pr50": 0.2272234273318872 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "frozen", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40276609702716604, + "cIoU": 0.3386108681829043, + "positive_mIoU": 0.3098886581692158, + "Nacc": 0.6291461587845067, + "false_empty": 0.2344161545215101, + "Pr50": 0.29165935030728707 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40328443264016667, + "cIoU": 0.3389774657502737, + "positive_mIoU": 0.3109708377084282, + "Nacc": 0.6282901776160924, + "false_empty": 0.23125548726953468, + "Pr50": 0.29280070237050043 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.4183287609730467, + "cIoU": 0.32137781885940664, + "positive_mIoU": 0.2641452930210755, + "Nacc": 0.7941365289963621, + "false_empty": 0.46733977172958735, + "Pr50": 0.26409130816505705 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.40695139002338615, + "cIoU": 0.33892829165724225, + "positive_mIoU": 0.3101720963955796, + "Nacc": 0.6428418574791355, + "false_empty": 0.24196663740122915, + "Pr50": 0.2920105355575066 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "frozen", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.43971630785357774, + "cIoU": 0.30333932746289816, + "positive_mIoU": 0.2839712549510351, + "Nacc": 0.7115832686120048, + "false_empty": 0.26685946736159666, + "Pr50": 0.2571664653912159 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44079764489598494, + "cIoU": 0.3052221098704716, + "positive_mIoU": 0.28592630271378905, + "Nacc": 0.711139465216909, + "false_empty": 0.2628551452361279, + "Pr50": 0.2596135511345579 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.4629633197148554, + "cIoU": 0.274317086124645, + "positive_mIoU": 0.22376471808706624, + "Nacc": 0.8805059358704094, + "false_empty": 0.5608911205745885, + "Pr50": 0.22535435072776966 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.44851439315853336, + "cIoU": 0.30476640557179785, + "positive_mIoU": 0.28468424160052547, + "Nacc": 0.7344946188838345, + "false_empty": 0.2783321680544079, + "Pr50": 0.2588508231106591 + } + ], + "comparisons": { + "all/anchor_gate": { + "n": 49492, + "images": 3000, + "delta": 0.0011783429959366808, + "ci": [ + 0.0007048881084350094, + 0.0016592426219794582 + ], + "helped": 871, + "harmed": 722, + "tied": 47899, + "sign_p": 0.00020676745505622437, + "paired_sd": 0.04847275122823104, + "approx_iid_mde80": 0.0006104273803270286 + }, + "all/cacp": { + "n": 49492, + "images": 3000, + "delta": 0.0010939154494272795, + "ci": [ + 0.0006276944671543883, + 0.0015514923265178898 + ], + "helped": 857, + "harmed": 716, + "tied": 47919, + "sign_p": 0.00041233642256268083, + "paired_sd": 0.047474654075447556, + "approx_iid_mde80": 0.0005978581364766683 + }, + "all/safe_anchor": { + "n": 49492, + "images": 3000, + "delta": 0.0010813370424072079, + "ci": [ + 0.000772914027971522, + 0.0014038221241202175 + ], + "helped": 517, + "harmed": 364, + "tied": 48611, + "sign_p": 2.8461141130824936e-07, + "paired_sd": 0.03659977083920481, + "approx_iid_mde80": 0.0004609084829691581 + }, + "all/source_unconstrained_s11": { + "n": 49492, + "images": 3000, + "delta": 0.023247011861277717, + "ci": [ + 0.020556406811495252, + 0.02609422781413391 + ], + "helped": 3528, + "harmed": 8455, + "tied": 37509, + "sign_p": 0.0, + "paired_sd": 0.2786883821439651, + "approx_iid_mde80": 0.00350958042877994 + }, + "all/constrained_0.05_s11": { + "n": 49492, + "images": 3000, + "delta": 0.008798085304955666, + "ci": [ + 0.007914989929998584, + 0.009735376123162545 + ], + "helped": 1164, + "harmed": 1021, + "tied": 47307, + "sign_p": 0.0023753914414200114, + "paired_sd": 0.10009664376624122, + "approx_iid_mde80": 0.001260537734820551 + }, + "old_supported/anchor_gate": { + "n": 2809, + "images": 1410, + "delta": 0.02076132130825853, + "ci": [ + 0.012520882677729401, + 0.028870305196242358 + ], + "helped": 871, + "harmed": 722, + "tied": 1216, + "sign_p": 0.00020676745505622437, + "paired_sd": 0.20249721198273424, + "approx_iid_mde80": 0.010704022562262574 + }, + "old_supported/cacp": { + "n": 2809, + "images": 1410, + "delta": 0.019273785483465616, + "ci": [ + 0.011510953624517725, + 0.027240227079416212 + ], + "helped": 857, + "harmed": 716, + "tied": 1236, + "sign_p": 0.00041233642256268083, + "paired_sd": 0.19842746606881392, + "approx_iid_mde80": 0.01048889539256607 + }, + "old_supported/safe_anchor": { + "n": 2809, + "images": 1410, + "delta": 0.019052165504741023, + "ci": [ + 0.013340217368466727, + 0.024695080295746505 + ], + "helped": 517, + "harmed": 364, + "tied": 1928, + "sign_p": 2.8461141130824936e-07, + "paired_sd": 0.15253505898535458, + "approx_iid_mde80": 0.008063018235799229 + }, + "old_supported/source_unconstrained_s11": { + "n": 2809, + "images": 1410, + "delta": -0.01818853380226436, + "ci": [ + -0.027998662655238045, + -0.008746929409001762 + ], + "helped": 563, + "harmed": 1049, + "tied": 1197, + "sign_p": 4.309068387688053e-34, + "paired_sd": 0.24605802947194425, + "approx_iid_mde80": 0.013006651663520833 + }, + "old_supported/constrained_0.05_s11": { + "n": 2809, + "images": 1410, + "delta": 0.015047050046010398, + "ci": [ + 0.007656642601357097, + 0.02235025253599728 + ], + "helped": 757, + "harmed": 738, + "tied": 1314, + "sign_p": 0.6415632781755626, + "paired_sd": 0.17914722007306821, + "approx_iid_mde80": 0.009469739690995072 + }, + "scope_safe/anchor_gate": { + "n": 1557, + "images": 973, + "delta": 0.03437221124137285, + "ci": [ + 0.02371354056018948, + 0.0447413742463135 + ], + "helped": 517, + "harmed": 364, + "tied": 676, + "sign_p": 2.8461141130824936e-07, + "paired_sd": 0.20362033120074755, + "approx_iid_mde80": 0.014457082872135084 + }, + "scope_safe/cacp": { + "n": 1557, + "images": 973, + "delta": 0.03094680860374368, + "ci": [ + 0.020644714298856986, + 0.04160315494933394 + ], + "helped": 506, + "harmed": 363, + "tied": 688, + "sign_p": 1.3834311812113568e-06, + "paired_sd": 0.19892573098837862, + "approx_iid_mde80": 0.014123765349658176 + }, + "scope_safe/safe_anchor": { + "n": 1557, + "images": 973, + "delta": 0.03437221124137285, + "ci": [ + 0.02371354056018948, + 0.0447413742463135 + ], + "helped": 517, + "harmed": 364, + "tied": 676, + "sign_p": 2.8461141130824936e-07, + "paired_sd": 0.20362033120074755, + "approx_iid_mde80": 0.014457082872135084 + }, + "scope_safe/source_unconstrained_s11": { + "n": 1557, + "images": 973, + "delta": -0.012935921192946797, + "ci": [ + -0.024955695795662102, + 2.2340128144548998e-05 + ], + "helped": 307, + "harmed": 549, + "tied": 701, + "sign_p": 1.1097268501635485e-16, + "paired_sd": 0.2484689531356484, + "approx_iid_mde80": 0.017641343698106753 + }, + "scope_safe/constrained_0.05_s11": { + "n": 1557, + "images": 973, + "delta": 0.023967073700784564, + "ci": [ + 0.01501502893490453, + 0.033168433994319874 + ], + "helped": 428, + "harmed": 390, + "tied": 739, + "sign_p": 0.19574719097000812, + "paired_sd": 0.18463867949952917, + "approx_iid_mde80": 0.013109381932468257 + }, + "old_relational/anchor_gate": { + "n": 821, + "images": 424, + "delta": 0.015828170178326353, + "ci": [ + 0.0021940333106163948, + 0.031000063406755717 + ], + "helped": 89, + "harmed": 31, + "tied": 701, + "sign_p": 1.1187721865433782e-07, + "paired_sd": 0.16778362356676757, + "approx_iid_mde80": 0.016405211289272227 + }, + "old_relational/cacp": { + "n": 821, + "images": 424, + "delta": 0.010738659664509915, + "ci": [ + -0.001541524579754581, + 0.024497607160419196 + ], + "helped": 75, + "harmed": 25, + "tied": 721, + "sign_p": 5.636282034205402e-07, + "paired_sd": 0.14998422531580666, + "approx_iid_mde80": 0.014664857356501684 + }, + "old_relational/safe_anchor": { + "n": 821, + "images": 424, + "delta": 0.008106141524390523, + "ci": [ + -0.00015457569667732594, + 0.01677886902388341 + ], + "helped": 33, + "harmed": 10, + "tied": 778, + "sign_p": 0.0006061066312668117, + "paired_sd": 0.12288691531401305, + "approx_iid_mde80": 0.012015390820374366 + }, + "old_relational/source_unconstrained_s11": { + "n": 821, + "images": 424, + "delta": 0.047708690357051386, + "ci": [ + 0.02809427442252599, + 0.06865797992460057 + ], + "helped": 80, + "harmed": 107, + "tied": 634, + "sign_p": 0.05697078139259503, + "paired_sd": 0.27676721182118563, + "approx_iid_mde80": 0.02706119042698171 + }, + "old_relational/constrained_0.05_s11": { + "n": 821, + "images": 424, + "delta": 0.023609000487243535, + "ci": [ + 0.012260723053831102, + 0.03767467635591623 + ], + "helped": 74, + "harmed": 19, + "tied": 728, + "sign_p": 7.72091844381201e-09, + "paired_sd": 0.14749871694208125, + "approx_iid_mde80": 0.014421834294027446 + }, + "safe_relational/anchor_gate": { + "n": 382, + "images": 286, + "delta": 0.017421838197708425, + "ci": [ + 6.682156604049498e-06, + 0.03498356241255817 + ], + "helped": 33, + "harmed": 10, + "tied": 339, + "sign_p": 0.0006061066312668117, + "paired_sd": 0.17982918227154598, + "approx_iid_mde80": 0.025776997254158506 + }, + "safe_relational/cacp": { + "n": 382, + "images": 286, + "delta": 0.003460183991455487, + "ci": [ + -0.0122851661514121, + 0.018357111375458906 + ], + "helped": 22, + "harmed": 9, + "tied": 351, + "sign_p": 0.029449373483657837, + "paired_sd": 0.15491480995878534, + "approx_iid_mde80": 0.022205732020213604 + }, + "safe_relational/safe_anchor": { + "n": 382, + "images": 286, + "delta": 0.017421838197708425, + "ci": [ + 6.682156604049498e-06, + 0.03498356241255817 + ], + "helped": 33, + "harmed": 10, + "tied": 339, + "sign_p": 0.0006061066312668117, + "paired_sd": 0.17982918227154598, + "approx_iid_mde80": 0.025776997254158506 + }, + "safe_relational/source_unconstrained_s11": { + "n": 382, + "images": 286, + "delta": 0.09416903178840969, + "ci": [ + 0.06447169560493062, + 0.12259372309473889 + ], + "helped": 47, + "harmed": 24, + "tied": 311, + "sign_p": 0.008554538502693429, + "paired_sd": 0.31724193596727635, + "approx_iid_mde80": 0.04547395705767122 + }, + "safe_relational/constrained_0.05_s11": { + "n": 382, + "images": 286, + "delta": 0.028866443995108463, + "ci": [ + 0.014714194575885546, + 0.04590916297542331 + ], + "helped": 25, + "harmed": 5, + "tied": 352, + "sign_p": 0.0003249142318964005, + "paired_sd": 0.16823644353525744, + "approx_iid_mde80": 0.024115275887254595 + }, + "positive/anchor_gate": { + "n": 31466, + "images": 2985, + "delta": 0.002457209418257745, + "ci": [ + 0.0018119259992407093, + 0.0031316002514523633 + ], + "helped": 871, + "harmed": 703, + "tied": 29892, + "sign_p": 2.519094812732695e-05, + "paired_sd": 0.055569559112180075, + "approx_iid_mde80": 0.0008776472962516515 + }, + "positive/cacp": { + "n": 31466, + "images": 2985, + "delta": 0.0022926353341083997, + "ci": [ + 0.0016499430138384526, + 0.0029399774974906757 + ], + "helped": 857, + "harmed": 698, + "tied": 29911, + "sign_p": 6.072099008158273e-05, + "paired_sd": 0.05449412466789472, + "approx_iid_mde80": 0.0008606622391915881 + }, + "positive/safe_anchor": { + "n": 31466, + "images": 2985, + "delta": 0.001955047762754005, + "ci": [ + 0.001506940536987718, + 0.002420091291885168 + ], + "helped": 517, + "harmed": 356, + "tied": 30593, + "sign_p": 5.635362455675596e-08, + "paired_sd": 0.04302000633928404, + "approx_iid_mde80": 0.0006794437971368728 + }, + "positive/source_unconstrained_s11": { + "n": 31466, + "images": 2985, + "delta": -0.060206536863968825, + "ci": [ + -0.06282518474044288, + -0.05748457300982578 + ], + "helped": 483, + "harmed": 8455, + "tied": 22528, + "sign_p": 0.0, + "paired_sd": 0.15037597236914346, + "approx_iid_mde80": 0.0023749885311230455 + }, + "positive/constrained_0.05_s11": { + "n": 31466, + "images": 2985, + "delta": 0.0007129866494904258, + "ci": [ + 0.00012027179186045118, + 0.001326538045685991 + ], + "helped": 747, + "harmed": 1017, + "tied": 29702, + "sign_p": 1.3900988461982252e-10, + "paired_sd": 0.0500062156259304, + "approx_iid_mde80": 0.0007897816833723142 + }, + "safe_positive/anchor_gate": { + "n": 1257, + "images": 783, + "delta": 0.04893996253207441, + "ci": [ + 0.03708475903876858, + 0.06084868122234294 + ], + "helped": 517, + "harmed": 356, + "tied": 384, + "sign_p": 5.635362455675596e-08, + "paired_sd": 0.2099107683256046, + "approx_iid_mde80": 0.01658711733133577 + }, + "safe_positive/cacp": { + "n": 1257, + "images": 783, + "delta": 0.04469704136517813, + "ci": [ + 0.03316045614830593, + 0.05725453911230563 + ], + "helped": 506, + "harmed": 355, + "tied": 396, + "sign_p": 2.982340091474361e-07, + "paired_sd": 0.20455219585239487, + "approx_iid_mde80": 0.016163683740717284 + }, + "safe_positive/safe_anchor": { + "n": 1257, + "images": 783, + "delta": 0.04893996253207441, + "ci": [ + 0.03708475903876858, + 0.06084868122234294 + ], + "helped": 517, + "harmed": 356, + "tied": 384, + "sign_p": 5.635362455675596e-08, + "paired_sd": 0.2099107683256046, + "approx_iid_mde80": 0.01658711733133577 + }, + "safe_positive/source_unconstrained_s11": { + "n": 1257, + "images": 783, + "delta": -0.05341386578951326, + "ci": [ + -0.06412107788091889, + -0.04185187028157284 + ], + "helped": 260, + "harmed": 549, + "tied": 448, + "sign_p": 1.359310509635919e-24, + "paired_sd": 0.19082615748610052, + "approx_iid_mde80": 0.015079054254139534 + }, + "safe_positive/constrained_0.05_s11": { + "n": 1257, + "images": 783, + "delta": 0.024118324385140465, + "ci": [ + 0.013771845372021523, + 0.035310255147493384 + ], + "helped": 420, + "harmed": 389, + "tied": 448, + "sign_p": 0.29153698532153705, + "paired_sd": 0.1876129549156565, + "approx_iid_mde80": 0.01482514747045976 + } + }, + "coverage": { + "all": { + "records": 49492, + "images": 3000 + }, + "old_supported": { + "records": 2809, + "images": 1410 + }, + "scope_safe": { + "records": 1557, + "images": 973 + }, + "old_relational": { + "records": 821, + "images": 424 + }, + "safe_relational": { + "records": 382, + "images": 286 + }, + "positive": { + "records": 31466, + "images": 2985 + }, + "safe_positive": { + "records": 1257, + "images": 783 + } + }, + "cost": { + "total_primary_query_requests": 51431, + "total_cf_query_requests": 53943, + "average_primary_requests": 1.0391780489776126, + "average_cf_requests": 1.089933726662895 + } + }, + "groundedsam": { + "tables": [ + { + "split": "val", + "grid": "official480_scores", + "variant": "frozen", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25983957772650035, + "cIoU": 0.28356029867316135, + "positive_mIoU": 0.5988462343107388, + "Nacc": 0.05715889949466592, + "false_empty": 0.002253944402704733, + "Pr50": 0.6322314049586777 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.25960518053340387, + "cIoU": 0.28383781110717393, + "positive_mIoU": 0.5987832670566873, + "Nacc": 0.05682201010668164, + "false_empty": 0.002253944402704733, + "Pr50": 0.6322314049586777 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.3317797714168141, + "cIoU": 0.2863965959664144, + "positive_mIoU": 0.5076811358921575, + "Nacc": 0.22661426165075801, + "false_empty": 0.1861382419233659, + "Pr50": 0.5441397445529677 + }, + { + "split": "val", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.26655976767784484, + "cIoU": 0.2836563716869841, + "positive_mIoU": 0.5976481845018885, + "Nacc": 0.06861313868613139, + "false_empty": 0.002441773102930128, + "Pr50": 0.6305409466566492 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "frozen", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4957641166957091, + "cIoU": 0.4745197616153505, + "positive_mIoU": 0.56356229938704, + "Nacc": 0.270908273381295, + "false_empty": 0.00908351409978308, + "Pr50": 0.5850732104121475 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.49582096488448796, + "cIoU": 0.4740132297294638, + "positive_mIoU": 0.5636362883529128, + "Nacc": 0.270908273381295, + "false_empty": 0.008541214750542299, + "Pr50": 0.584666485900217 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4548901565403726, + "cIoU": 0.4284784677497938, + "positive_mIoU": 0.4788429369289015, + "Nacc": 0.3754496402877698, + "false_empty": 0.19224511930585683, + "Pr50": 0.502847071583514 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.4962745118579765, + "cIoU": 0.4734962736041272, + "positive_mIoU": 0.5623963277978004, + "Nacc": 0.27697841726618705, + "false_empty": 0.009693600867678958, + "Pr50": 0.5837174620390455 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "frozen", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39357218117955056, + "cIoU": 0.35370129488655183, + "positive_mIoU": 0.4628577652578685, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.44714661984196663 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.39591626706805716, + "cIoU": 0.35600945983298743, + "positive_mIoU": 0.4661635643471644, + "Nacc": 0.2246950567087524, + "false_empty": 0.00684811237928007, + "Pr50": 0.45223880597014926 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.37977370185597503, + "cIoU": 0.3375546963558787, + "positive_mIoU": 0.3893156253654546, + "Nacc": 0.3565161566445538, + "false_empty": 0.22054433713784022, + "Pr50": 0.38665496049165937 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.3975770581215255, + "cIoU": 0.35607491891548604, + "positive_mIoU": 0.46587184237103285, + "Nacc": 0.2311149154718596, + "false_empty": 0.008077260755048289, + "Pr50": 0.4520632133450395 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "frozen", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3947684138510286, + "cIoU": 0.378485528674543, + "positive_mIoU": 0.5330794615875901, + "Nacc": 0.1533340730056585, + "false_empty": 0.00711879488972224, + "Pr50": 0.5431259136846119 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "safe_anchor", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3954838688577179, + "cIoU": 0.3791343724706563, + "positive_mIoU": 0.5343001219572292, + "Nacc": 0.1531676467324975, + "false_empty": 0.006864552215089303, + "Pr50": 0.5447784910697261 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "source_unconstrained_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.3951161873833655, + "cIoU": 0.3591601362485221, + "positive_mIoU": 0.4513153990331637, + "Nacc": 0.2970154221679796, + "false_empty": 0.20145553931227356, + "Pr50": 0.4677747409902752 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "constrained_0.05_s11", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.39819829157373454, + "cIoU": 0.3789397420664814, + "positive_mIoU": 0.533421148114386, + "Nacc": 0.16215466548319094, + "false_empty": 0.00788152291362105, + "Pr50": 0.5439839827114982 + } + ], + "comparisons": { + "all/anchor_gate": { + "n": 49492, + "images": 3000, + "delta": 0.00029429392151707814, + "ci": [ + -0.00018537974058767355, + 0.000773944716226568 + ], + "helped": 962, + "harmed": 936, + "tied": 47594, + "sign_p": 0.5660865555734518, + "paired_sd": 0.04960875953989398, + "approx_iid_mde80": 0.000624733367921029 + }, + "all/cacp": { + "n": 49492, + "images": 3000, + "delta": 0.00029358517063499736, + "ci": [ + -0.0001759897208230776, + 0.0007812018461668709 + ], + "helped": 958, + "harmed": 935, + "tied": 47599, + "sign_p": 0.6131161760540024, + "paired_sd": 0.049459684347975805, + "approx_iid_mde80": 0.000622856033200623 + }, + "all/safe_anchor": { + "n": 49492, + "images": 3000, + "delta": 0.0007154550066892769, + "ci": [ + 0.00034917566727769893, + 0.0010771329425123598 + ], + "helped": 590, + "harmed": 497, + "tied": 48405, + "sign_p": 0.005239989968083901, + "paired_sd": 0.04062201491654927, + "approx_iid_mde80": 0.0005115614344306651 + }, + "all/source_unconstrained_s11": { + "n": 49492, + "images": 3000, + "delta": 0.00034777353233694965, + "ci": [ + -0.0030443842162695585, + 0.0038719268561381755 + ], + "helped": 3217, + "harmed": 6695, + "tied": 39580, + "sign_p": 6.1491514470663064e-273, + "paired_sd": 0.2921593199485373, + "approx_iid_mde80": 0.00367922273432756 + }, + "all/constrained_0.05_s11": { + "n": 49492, + "images": 3000, + "delta": 0.003429877722705895, + "ci": [ + 0.002702137041318359, + 0.00418432565878338 + ], + "helped": 1105, + "harmed": 938, + "tied": 47449, + "sign_p": 0.00023833660634386557, + "paired_sd": 0.07473562167867685, + "approx_iid_mde80": 0.0009411611390412815 + }, + "old_supported/anchor_gate": { + "n": 2809, + "images": 1410, + "delta": 0.005185188595131089, + "ci": [ + -0.003079918690535931, + 0.012958319118789526 + ], + "helped": 962, + "harmed": 936, + "tied": 911, + "sign_p": 0.5660865555734518, + "paired_sd": 0.20820727002007608, + "approx_iid_mde80": 0.01100585679230001 + }, + "old_supported/cacp": { + "n": 2809, + "images": 1410, + "delta": 0.005172701055559733, + "ci": [ + -0.0029961673036336713, + 0.012821657840771845 + ], + "helped": 958, + "harmed": 935, + "tied": 916, + "sign_p": 0.6131161760540024, + "paired_sd": 0.20758153079608457, + "approx_iid_mde80": 0.010972780155312688 + }, + "old_supported/safe_anchor": { + "n": 2809, + "images": 1410, + "delta": 0.012605660089379031, + "ci": [ + 0.006010749703666618, + 0.01843250687670357 + ], + "helped": 590, + "harmed": 497, + "tied": 1722, + "sign_p": 0.005239989968083901, + "paired_sd": 0.17009974405852105, + "approx_iid_mde80": 0.008991489218097204 + }, + "old_supported/source_unconstrained_s11": { + "n": 2809, + "images": 1410, + "delta": -0.07699547540094762, + "ci": [ + -0.09148822319556393, + -0.06258287967236753 + ], + "helped": 728, + "harmed": 1370, + "tied": 711, + "sign_p": 3.4608487595158235e-45, + "paired_sd": 0.365799073024821, + "approx_iid_mde80": 0.01933617501482575 + }, + "old_supported/constrained_0.05_s11": { + "n": 2809, + "images": 1410, + "delta": 0.005613339922611913, + "ci": [ + -0.0025319947550198722, + 0.013708295796060994 + ], + "helped": 951, + "harmed": 936, + "tied": 922, + "sign_p": 0.7472453452447086, + "paired_sd": 0.20922563934056215, + "approx_iid_mde80": 0.011059687894844418 + }, + "scope_safe/anchor_gate": { + "n": 1557, + "images": 973, + "delta": 0.02274200333401779, + "ci": [ + 0.011841469045159534, + 0.0330840964490847 + ], + "helped": 590, + "harmed": 497, + "tied": 470, + "sign_p": 0.005239989968083901, + "paired_sd": 0.22800060711897935, + "approx_iid_mde80": 0.016188087174686294 + }, + "scope_safe/cacp": { + "n": 1557, + "images": 973, + "delta": 0.022779174841014986, + "ci": [ + 0.011872120725655124, + 0.0331200978676498 + ], + "helped": 590, + "harmed": 497, + "tied": 470, + "sign_p": 0.005239989968083901, + "paired_sd": 0.22800166442239736, + "approx_iid_mde80": 0.01618816224343333 + }, + "scope_safe/safe_anchor": { + "n": 1557, + "images": 973, + "delta": 0.02274200333401779, + "ci": [ + 0.011841469045159534, + 0.0330840964490847 + ], + "helped": 590, + "harmed": 497, + "tied": 470, + "sign_p": 0.005239989968083901, + "paired_sd": 0.22800060711897935, + "approx_iid_mde80": 0.016188087174686294 + }, + "scope_safe/source_unconstrained_s11": { + "n": 1557, + "images": 973, + "delta": -0.05491976689789844, + "ci": [ + -0.07441492871132499, + -0.034935583348317166 + ], + "helped": 446, + "harmed": 738, + "tied": 373, + "sign_p": 1.896988861274396e-17, + "paired_sd": 0.38647108606307207, + "approx_iid_mde80": 0.027439521809781688 + }, + "scope_safe/constrained_0.05_s11": { + "n": 1557, + "images": 973, + "delta": 0.02228961451831079, + "ci": [ + 0.01119209890952658, + 0.03299772448781509 + ], + "helped": 581, + "harmed": 498, + "tied": 478, + "sign_p": 0.012512639465754075, + "paired_sd": 0.22796214194223785, + "approx_iid_mde80": 0.016185356139702883 + }, + "old_relational/anchor_gate": { + "n": 821, + "images": 424, + "delta": 0.010662669899216194, + "ci": [ + -2.66453002713522e-05, + 0.021613883622592485 + ], + "helped": 62, + "harmed": 40, + "tied": 719, + "sign_p": 0.03706676743856045, + "paired_sd": 0.14051214519044364, + "approx_iid_mde80": 0.013738715266456406 + }, + "old_relational/cacp": { + "n": 821, + "images": 424, + "delta": 0.010619944565895928, + "ci": [ + 0.000275826041385952, + 0.021090888138455943 + ], + "helped": 58, + "harmed": 39, + "tied": 724, + "sign_p": 0.06705179535289094, + "paired_sd": 0.13730691281904914, + "approx_iid_mde80": 0.013425320471624019 + }, + "old_relational/safe_anchor": { + "n": 821, + "images": 424, + "delta": 0.009234814447512387, + "ci": [ + 0.0030502219254708225, + 0.016776399073144158 + ], + "helped": 19, + "harmed": 10, + "tied": 792, + "sign_p": 0.13604594767093658, + "paired_sd": 0.08931068333028526, + "approx_iid_mde80": 0.008732441219685357 + }, + "old_relational/source_unconstrained_s11": { + "n": 821, + "images": 424, + "delta": 0.07713888113391923, + "ci": [ + 0.05192823880395501, + 0.10414259551148912 + ], + "helped": 136, + "harmed": 134, + "tied": 551, + "sign_p": 0.9514872319029763, + "paired_sd": 0.35883668551558073, + "approx_iid_mde80": 0.03508561514576333 + }, + "old_relational/constrained_0.05_s11": { + "n": 821, + "images": 424, + "delta": 0.016710078548843554, + "ci": [ + 0.00551584206203646, + 0.028864217356862818 + ], + "helped": 63, + "harmed": 39, + "tied": 719, + "sign_p": 0.02229766182469301, + "paired_sd": 0.1574296757320575, + "approx_iid_mde80": 0.015392843703594665 + }, + "safe_relational/anchor_gate": { + "n": 382, + "images": 286, + "delta": 0.019847598590072436, + "ci": [ + 0.006344380713843232, + 0.03442947563858501 + ], + "helped": 19, + "harmed": 10, + "tied": 353, + "sign_p": 0.13604594767093658, + "paired_sd": 0.13021466897174166, + "approx_iid_mde80": 0.018665175040763354 + }, + "safe_relational/cacp": { + "n": 382, + "images": 286, + "delta": 0.019999106538749478, + "ci": [ + 0.006524192032927455, + 0.03455016724253577 + ], + "helped": 19, + "harmed": 10, + "tied": 353, + "sign_p": 0.13604594767093658, + "paired_sd": 0.13022553906521578, + "approx_iid_mde80": 0.018666733177024084 + }, + "safe_relational/safe_anchor": { + "n": 382, + "images": 286, + "delta": 0.019847598590072436, + "ci": [ + 0.006344380713843232, + 0.03442947563858501 + ], + "helped": 19, + "harmed": 10, + "tied": 353, + "sign_p": 0.13604594767093658, + "paired_sd": 0.13021466897174166, + "approx_iid_mde80": 0.018665175040763354 + }, + "safe_relational/source_unconstrained_s11": { + "n": 382, + "images": 286, + "delta": 0.1719114835961556, + "ci": [ + 0.13385947839132062, + 0.21267739980634526 + ], + "helped": 80, + "harmed": 28, + "tied": 274, + "sign_p": 5.648694223312712e-07, + "paired_sd": 0.38714624579299395, + "approx_iid_mde80": 0.055494150552798306 + }, + "safe_relational/constrained_0.05_s11": { + "n": 382, + "images": 286, + "delta": 0.027852509680110733, + "ci": [ + 0.012693526588023838, + 0.04503156095864471 + ], + "helped": 22, + "harmed": 10, + "tied": 350, + "sign_p": 0.050102459732443094, + "paired_sd": 0.1563838942896022, + "approx_iid_mde80": 0.022416312874128687 + }, + "positive/anchor_gate": { + "n": 31466, + "images": 2985, + "delta": 0.0005582277621471821, + "ci": [ + -0.00015596881598378454, + 0.0012700640463090668 + ], + "helped": 962, + "harmed": 933, + "tied": 29571, + "sign_p": 0.5200980070495975, + "paired_sd": 0.061444363217392384, + "approx_iid_mde80": 0.0009704320154634612 + }, + "positive/cacp": { + "n": 31466, + "images": 2985, + "delta": 0.0005571129875124671, + "ci": [ + -0.00014039795528625454, + 0.0012575747508407028 + ], + "helped": 958, + "harmed": 932, + "tied": 29576, + "sign_p": 0.5652658391694269, + "paired_sd": 0.06125504790628315, + "approx_iid_mde80": 0.0009674420318539341 + }, + "positive/safe_anchor": { + "n": 31466, + "images": 2985, + "delta": 0.0012206603696391565, + "ci": [ + 0.0006619418756154202, + 0.00179214763596632 + ], + "helped": 590, + "harmed": 494, + "tied": 30382, + "sign_p": 0.0038887380291072133, + "paired_sd": 0.049994733065755, + "approx_iid_mde80": 0.0007896003316025144 + }, + "positive/source_unconstrained_s11": { + "n": 31466, + "images": 2985, + "delta": -0.08176406255442635, + "ci": [ + -0.08628675942618148, + -0.07720121299022166 + ], + "helped": 624, + "harmed": 6692, + "tied": 24150, + "sign_p": 0.0, + "paired_sd": 0.21229123574251074, + "approx_iid_mde80": 0.003352857788401968 + }, + "positive/constrained_0.05_s11": { + "n": 31466, + "images": 2985, + "delta": 0.000341686526795911, + "ci": [ + -0.0003803140816830466, + 0.0010619764130213223 + ], + "helped": 946, + "harmed": 938, + "tied": 29582, + "sign_p": 0.8718850554668589, + "paired_sd": 0.061240483355746486, + "approx_iid_mde80": 0.0009672120041444499 + }, + "safe_positive/anchor_gate": { + "n": 1257, + "images": 783, + "delta": 0.030556323938795305, + "ci": [ + 0.016512587415315232, + 0.04389657310137775 + ], + "helped": 590, + "harmed": 494, + "tied": 173, + "sign_p": 0.0038887380291072133, + "paired_sd": 0.24843325332509517, + "approx_iid_mde80": 0.019631158300163144 + }, + "safe_positive/cacp": { + "n": 1257, + "images": 783, + "delta": 0.030602366927176078, + "ci": [ + 0.01660379745320689, + 0.04393946249166157 + ], + "helped": 590, + "harmed": 494, + "tied": 173, + "sign_p": 0.0038887380291072133, + "paired_sd": 0.24843300521164302, + "approx_iid_mde80": 0.019631138694275484 + }, + "safe_positive/safe_anchor": { + "n": 1257, + "images": 783, + "delta": 0.030556323938795305, + "ci": [ + 0.016512587415315232, + 0.04389657310137775 + ], + "helped": 590, + "harmed": 494, + "tied": 173, + "sign_p": 0.0038887380291072133, + "paired_sd": 0.24843325332509517, + "approx_iid_mde80": 0.019631158300163144 + }, + "safe_positive/source_unconstrained_s11": { + "n": 1257, + "images": 783, + "delta": -0.12212416631664906, + "ci": [ + -0.14278674095370744, + -0.10257894312613859 + ], + "helped": 375, + "harmed": 735, + "tied": 147, + "sign_p": 1.5636781236774908e-27, + "paired_sd": 0.33901424669191466, + "approx_iid_mde80": 0.026788854767806018 + }, + "safe_positive/constrained_0.05_s11": { + "n": 1257, + "images": 783, + "delta": 0.025222696742251315, + "ci": [ + 0.01111771623233758, + 0.039394182033901146 + ], + "helped": 578, + "harmed": 498, + "tied": 181, + "sign_p": 0.015985148704445916, + "paired_sd": 0.24893742379477873, + "approx_iid_mde80": 0.01967099777482346 + } + }, + "coverage": { + "all": { + "records": 49492, + "images": 3000 + }, + "old_supported": { + "records": 2809, + "images": 1410 + }, + "scope_safe": { + "records": 1557, + "images": 973 + }, + "old_relational": { + "records": 821, + "images": 424 + }, + "safe_relational": { + "records": 382, + "images": 286 + }, + "positive": { + "records": 31466, + "images": 2985 + }, + "safe_positive": { + "records": 1257, + "images": 783 + } + }, + "cost": { + "total_primary_query_requests": 51431, + "total_cf_query_requests": 53943, + "average_primary_requests": 1.0391780489776126, + "average_cf_requests": 1.089933726662895 + } + }, + "rela": { + "tables": [ + { + "split": "val", + "grid": "official480_scores", + "variant": "frozen", + "n": 14229, + "images": 1501, + "positive": 5324, + "negative": 8905, + "gIoU": 0.5575590695161042, + "cIoU": 0.556469143970543, + "positive_mIoU": 0.7162862509663127, + "Nacc": 0.4626614261650758, + "false_empty": 0.001314800901577761, + "Pr50": 0.8046581517655897 + }, + { + "split": "testA", + "grid": "official480_scores", + "variant": "frozen", + "n": 19200, + "images": 750, + "positive": 14752, + "negative": 4448, + "gIoU": 0.6503868743619489, + "cIoU": 0.6542368596898667, + "positive_mIoU": 0.6938332421196732, + "Nacc": 0.5062949640287769, + "false_empty": 0.010100325379609544, + "Pr50": 0.7880965292841648 + }, + { + "split": "testB", + "grid": "official480_scores", + "variant": "frozen", + "n": 16063, + "images": 750, + "positive": 11390, + "negative": 4673, + "gIoU": 0.5886131460577101, + "cIoU": 0.5738774324801442, + "positive_mIoU": 0.6119309012401226, + "Nacc": 0.5317783008773806, + "false_empty": 0.021334503950834065, + "Pr50": 0.6705004389815628 + }, + { + "split": "all", + "grid": "official480_scores", + "variant": "frozen", + "n": 49492, + "images": 3000, + "positive": 31466, + "negative": 18026, + "gIoU": 0.6036496596019368, + "cIoU": 0.604133178068629, + "positive_mIoU": 0.6679854113334731, + "Nacc": 0.4913458337956285, + "false_empty": 0.01268035339731774, + "Pr50": 0.7483315324477213 + } + ], + "comparisons": {}, + "coverage": { + "all": { + "records": 49492, + "images": 3000 + }, + "old_supported": { + "records": 0, + "images": 0 + }, + "scope_safe": { + "records": 0, + "images": 0 + }, + "old_relational": { + "records": 0, + "images": 0 + }, + "safe_relational": { + "records": 0, + "images": 0 + }, + "positive": { + "records": 31466, + "images": 2985 + }, + "safe_positive": { + "records": 0, + "images": 0 + } + }, + "cost": { + "total_primary_query_requests": 49492, + "total_cf_query_requests": 49492, + "average_primary_requests": 1.0, + "average_cf_requests": 1.0 + } + } + }, + "rich": { + "clipseg": { + "tables": [ + { + "render": "flat", + "family": "primary", + "variant": "frozen", + "PC50": 0.045208333333333336, + "PC50_ci": [ + 0.03916666666666667, + 0.051875 + ], + "single_Pr50": 0.2090625, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.254979027780484, + "cIoU": 0.2723567919650074, + "positive_mIoU": 0.27545222222531507, + "Nacc": 0.11166666666666666, + "false_empty": 0.07404761904761904, + "Pr50": 0.22297619047619047 + }, + { + "render": "flat", + "family": "primary", + "variant": "cacp", + "PC50": 0.166875, + "PC50_ci": [ + 0.15311979166666667, + 0.18063020833333332 + ], + "single_Pr50": 0.3440625, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.34750800450497743, + "cIoU": 0.35996620310751665, + "positive_mIoU": 0.3864377194342599, + "Nacc": 0.075, + "false_empty": 0.016666666666666666, + "Pr50": 0.3825 + }, + { + "render": "flat", + "family": "primary", + "variant": "safe_anchor", + "PC50": 0.17479166666666668, + "PC50_ci": [ + 0.16083333333333333, + 0.18916666666666668 + ], + "single_Pr50": 0.35083333333333333, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.3526576588146978, + "cIoU": 0.3649340386843656, + "positive_mIoU": 0.3923230386453689, + "Nacc": 0.075, + "false_empty": 0.014642857142857143, + "Pr50": 0.3902380952380952 + }, + { + "render": "rich", + "family": "primary", + "variant": "frozen", + "PC50": 0.03270833333333333, + "PC50_ci": [ + 0.027291666666666665, + 0.03895833333333333 + ], + "single_Pr50": 0.17979166666666666, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.22856952759756516, + "cIoU": 0.2294119877604671, + "positive_mIoU": 0.23646041249245542, + "Nacc": 0.17333333333333334, + "false_empty": 0.10476190476190476, + "Pr50": 0.18071428571428572 + }, + { + "render": "rich", + "family": "primary", + "variant": "cacp", + "PC50": 0.08625, + "PC50_ci": [ + 0.07604166666666666, + 0.0968802083333333 + ], + "single_Pr50": 0.25635416666666666, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.28932952551909435, + "cIoU": 0.28699199219864996, + "positive_mIoU": 0.31685279106944114, + "Nacc": 0.09666666666666666, + "false_empty": 0.030833333333333334, + "Pr50": 0.2791666666666667 + }, + { + "render": "rich", + "family": "primary", + "variant": "safe_anchor", + "PC50": 0.09, + "PC50_ci": [ + 0.079375, + 0.10145833333333333 + ], + "single_Pr50": 0.2608333333333333, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.2935436626773994, + "cIoU": 0.29071897772534283, + "positive_mIoU": 0.3216689478217898, + "Nacc": 0.09666666666666666, + "false_empty": 0.028333333333333332, + "Pr50": 0.2842857142857143 + } + ], + "comparisons": { + "flat/anchor_gate": { + "delta": 0.12958333333333333, + "ci": [ + 0.11749479166666665, + 0.14229166666666668 + ] + }, + "flat/cacp": { + "delta": 0.12166666666666667, + "ci": [ + 0.10978645833333332, + 0.13375 + ] + }, + "flat/safe_anchor": { + "delta": 0.12958333333333333, + "ci": [ + 0.11749479166666665, + 0.14229166666666668 + ] + }, + "rich/anchor_gate": { + "delta": 0.057291666666666664, + "ci": [ + 0.04708333333333333, + 0.06791666666666667 + ] + }, + "rich/cacp": { + "delta": 0.05354166666666667, + "ci": [ + 0.04375, + 0.06354687499999997 + ] + }, + "rich/safe_anchor": { + "delta": 0.057291666666666664, + "ci": [ + 0.04708333333333333, + 0.06791666666666667 + ] + } + } + }, + "groundedsam": { + "tables": [ + { + "render": "flat", + "family": "primary", + "variant": "frozen", + "PC50": 0.0008333333333333334, + "PC50_ci": [ + 0.0, + 0.0020833333333333333 + ], + "single_Pr50": 0.0340625, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.18350235671330292, + "cIoU": 0.11837691880387607, + "positive_mIoU": 0.20971697910091763, + "Nacc": 0.0, + "false_empty": 0.0, + "Pr50": 0.03892857142857143 + }, + { + "render": "flat", + "family": "primary", + "variant": "cacp", + "PC50": 0.07875, + "PC50_ci": [ + 0.07, + 0.08792187499999997 + ], + "single_Pr50": 0.2353125, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.3300938052617003, + "cIoU": 0.22178578579200267, + "positive_mIoU": 0.37725006315622894, + "Nacc": 0.0, + "false_empty": 0.0, + "Pr50": 0.2689285714285714 + }, + { + "render": "flat", + "family": "primary", + "variant": "safe_anchor", + "PC50": 0.08, + "PC50_ci": [ + 0.07104166666666667, + 0.089375 + ], + "single_Pr50": 0.23697916666666666, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.33149276400470906, + "cIoU": 0.22324344005175184, + "positive_mIoU": 0.37884887314823884, + "Nacc": 0.0, + "false_empty": 0.0, + "Pr50": 0.2708333333333333 + }, + { + "render": "rich", + "family": "primary", + "variant": "frozen", + "PC50": 0.005, + "PC50_ci": [ + 0.003125, + 0.007083333333333333 + ], + "single_Pr50": 0.095, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.2204937640954517, + "cIoU": 0.12131515461150863, + "positive_mIoU": 0.2519928732519448, + "Nacc": 0.0, + "false_empty": 0.0, + "Pr50": 0.10857142857142857 + }, + { + "render": "rich", + "family": "primary", + "variant": "cacp", + "PC50": 0.16854166666666667, + "PC50_ci": [ + 0.15666666666666668, + 0.18083333333333335 + ], + "single_Pr50": 0.38625, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.42337113384225183, + "cIoU": 0.2764135948429942, + "positive_mIoU": 0.48385272439114496, + "Nacc": 0.0, + "false_empty": 0.0, + "Pr50": 0.44142857142857145 + }, + { + "render": "rich", + "family": "primary", + "variant": "safe_anchor", + "PC50": 0.17333333333333334, + "PC50_ci": [ + 0.16083333333333333, + 0.18583333333333332 + ], + "single_Pr50": 0.38989583333333333, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.426307507644656, + "cIoU": 0.28067789203075255, + "positive_mIoU": 0.48720858016532115, + "Nacc": 0.0, + "false_empty": 0.0, + "Pr50": 0.4455952380952381 + } + ], + "comparisons": { + "flat/anchor_gate": { + "delta": 0.07916666666666666, + "ci": [ + 0.07041145833333333, + 0.08854166666666667 + ] + }, + "flat/cacp": { + "delta": 0.07791666666666666, + "ci": [ + 0.06916666666666667, + 0.08729166666666667 + ] + }, + "flat/safe_anchor": { + "delta": 0.07916666666666666, + "ci": [ + 0.07041145833333333, + 0.08854166666666667 + ] + }, + "rich/anchor_gate": { + "delta": 0.16833333333333333, + "ci": [ + 0.15603645833333332, + 0.180625 + ] + }, + "rich/cacp": { + "delta": 0.16354166666666667, + "ci": [ + 0.15166666666666667, + 0.17583333333333334 + ] + }, + "rich/safe_anchor": { + "delta": 0.16833333333333333, + "ci": [ + 0.15603645833333332, + 0.180625 + ] + } + } + }, + "rela": { + "tables": [ + { + "render": "flat", + "family": "primary", + "variant": "frozen", + "PC50": 0.058541666666666665, + "PC50_ci": [ + 0.050833333333333335, + 0.06583333333333333 + ], + "single_Pr50": 0.22072916666666667, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.2535491329628164, + "cIoU": 0.2515943282521206, + "positive_mIoU": 0.2869132948146473, + "Nacc": 0.02, + "false_empty": 0.13714285714285715, + "Pr50": 0.2494047619047619 + }, + { + "render": "rich", + "family": "primary", + "variant": "frozen", + "PC50": 0.07395833333333333, + "PC50_ci": [ + 0.06541666666666666, + 0.08208333333333333 + ], + "single_Pr50": 0.26645833333333335, + "n": 9600, + "images": 1200, + "positive": 8400, + "negative": 1200, + "gIoU": 0.30124387672535735, + "cIoU": 0.2922739158172377, + "positive_mIoU": 0.34415966863850367, + "Nacc": 0.0008333333333333334, + "false_empty": 0.030714285714285715, + "Pr50": 0.3044047619047619 + } + ], + "comparisons": {} + } + }, + "timing": { + "clipseg": { + "frozen": { + "n": 36, + "median_seconds": 0.033848744817078114, + "mean_seconds": 0.034317627290470734 + }, + "sfap": { + "n": 36, + "median_seconds": 0.0786953940987587, + "mean_seconds": 0.07908907755174571 + }, + "cacp": { + "n": 36, + "median_seconds": 0.10787984263151884, + "mean_seconds": 0.1079349144258433 + } + }, + "groundedsam": { + "frozen": { + "n": 36, + "median_seconds": 0.5593048958107829, + "mean_seconds": 0.5634174176698757 + }, + "sfap": { + "n": 36, + "median_seconds": 1.0831583654507995, + "mean_seconds": 1.0609002561929326 + }, + "cacp": { + "n": 36, + "median_seconds": 1.3025170508772135, + "mean_seconds": 1.311752757574949 + } + } + }, + "files": { + "natural_clipseg_evaluated.jsonl.gz": { + "bytes": 12044672, + "sha256": "08f8df87a5c81cfec532cde459ed3bbef6981363561a1db7231ae9fffe38e9ce", + "remote_path": "/arf/scratch/egitimg16u1/mcp-workspace/refseg_ca_r2/results/analysis/natural_clipseg_evaluated.jsonl.gz" + }, + "natural_groundedsam_evaluated.jsonl.gz": { + "bytes": 13798962, + "sha256": "4ddea0f2659487779a5e7ba4e664908658383e588b8cae463695c9a29c6f083c", + "remote_path": "/arf/scratch/egitimg16u1/mcp-workspace/refseg_ca_r2/results/analysis/natural_groundedsam_evaluated.jsonl.gz" + }, + "natural_rela_evaluated.jsonl.gz": { + "bytes": 5840861, + "sha256": "9047c35f6c6e9d6a859ada22c86b4a2a166a7841707c0fffb1dd6eb4e7f8af63", + "remote_path": "/arf/scratch/egitimg16u1/mcp-workspace/refseg_ca_r2/results/analysis/natural_rela_evaluated.jsonl.gz" + }, + "rich_clipseg_evaluated.jsonl.gz": { + "bytes": 3661612, + "sha256": "406e9b9adb934084ca84bbe276bfc7f04563d211d7cf73703643ba5cf28581f9", + "remote_path": "/arf/scratch/egitimg16u1/mcp-workspace/refseg_ca_r2/results/analysis/rich_clipseg_evaluated.jsonl.gz" + }, + "rich_groundedsam_evaluated.jsonl.gz": { + "bytes": 3759628, + "sha256": "04761c6c21d76b75c76ea7f6d2187c129aa52740740fb9a26bebc136e3b26b4d", + "remote_path": "/arf/scratch/egitimg16u1/mcp-workspace/refseg_ca_r2/results/analysis/rich_groundedsam_evaluated.jsonl.gz" + }, + "rich_rela_evaluated.jsonl.gz": { + "bytes": 2102624, + "sha256": "d6599b600af75bd4891428d71fd141db4855614612c5740de16f51c7150d3eaf", + "remote_path": "/arf/scratch/egitimg16u1/mcp-workspace/refseg_ca_r2/results/analysis/rich_rela_evaluated.jsonl.gz" + } + } +} diff --git a/source/results/analysis/phase1_exact_audit.json b/source/results/analysis/phase1_exact_audit.json new file mode 100644 index 0000000000000000000000000000000000000000..55296f2f383df5f62defce5f838b6df57aa80a60 --- /dev/null +++ b/source/results/analysis/phase1_exact_audit.json @@ -0,0 +1,264 @@ +{ + "clipseg": { + "all": { + "anchor_records": 3660, + "changed": 44, + "helped": 2, + "harmed": 35, + "tied": 7, + "nogate_changed": 0, + "reasons": { + "projected": 1877, + "relation_unsatisfied": 622, + "no_target_proposal": 161, + "anchor_ambiguous": 740, + "counterfactual_veto": 45, + "anchor_missing": 215 + } + }, + "controlled_clean_test": { + "anchor_records": 1600, + "changed": 18, + "helped": 0, + "harmed": 15, + "tied": 3, + "nogate_changed": 0, + "reasons": { + "projected": 858, + "relation_unsatisfied": 286, + "anchor_ambiguous": 284, + "anchor_missing": 92, + "no_target_proposal": 62, + "counterfactual_veto": 18 + } + }, + "natural_eval": { + "anchor_records": 37, + "changed": 1, + "helped": 1, + "harmed": 0, + "tied": 0, + "nogate_changed": 0, + "reasons": { + "no_target_proposal": 18, + "anchor_missing": 8, + "projected": 5, + "relation_unsatisfied": 3, + "anchor_ambiguous": 1, + "counterfactual_veto": 2 + } + }, + "sensitivity": [ + { + "setting": "0/0", + "PC50": 0.19625, + "mIoU": 0.3830121271845627 + }, + { + "setting": "0/0.015", + "PC50": 0.19375, + "mIoU": 0.38354904772190596 + }, + { + "setting": "0/0.03", + "PC50": 0.1875, + "mIoU": 0.38212434928647937 + }, + { + "setting": "0/0.06", + "PC50": 0.17875, + "mIoU": 0.3780522705069575 + }, + { + "setting": "0.25/0", + "PC50": 0.19625, + "mIoU": 0.3830121271845627 + }, + { + "setting": "0.25/0.015", + "PC50": 0.19375, + "mIoU": 0.38354904772190596 + }, + { + "setting": "0.25/0.03", + "PC50": 0.1875, + "mIoU": 0.38212434928647937 + }, + { + "setting": "0.25/0.06", + "PC50": 0.17875, + "mIoU": 0.3780522705069575 + }, + { + "setting": "0.5/0", + "PC50": 0.19625, + "mIoU": 0.3830121271845627 + }, + { + "setting": "0.5/0.015", + "PC50": 0.19375, + "mIoU": 0.38354904772190596 + }, + { + "setting": "0.5/0.03", + "PC50": 0.1875, + "mIoU": 0.38212434928647937 + }, + { + "setting": "0.5/0.06", + "PC50": 0.17875, + "mIoU": 0.3780522705069575 + }, + { + "setting": "1/0", + "PC50": 0.19625, + "mIoU": 0.38351365638949625 + }, + { + "setting": "1/0.015", + "PC50": 0.19375, + "mIoU": 0.3839319240346248 + }, + { + "setting": "1/0.03", + "PC50": 0.1875, + "mIoU": 0.38250722559919814 + }, + { + "setting": "1/0.06", + "PC50": 0.17875, + "mIoU": 0.37843514681967627 + } + ] + }, + "groundedsam": { + "all": { + "anchor_records": 3660, + "changed": 1, + "helped": 0, + "harmed": 1, + "tied": 0, + "nogate_changed": 5, + "reasons": { + "projected": 1981, + "anchor_ambiguous": 1161, + "relation_unsatisfied": 503, + "assignment_ambiguous": 6, + "anchor_missing": 6, + "no_target_proposal": 2, + "counterfactual_veto": 1 + } + }, + "controlled_clean_test": { + "anchor_records": 1600, + "changed": 1, + "helped": 0, + "harmed": 1, + "tied": 0, + "nogate_changed": 0, + "reasons": { + "projected": 860, + "anchor_ambiguous": 528, + "relation_unsatisfied": 211, + "counterfactual_veto": 1 + } + }, + "natural_eval": { + "anchor_records": 37, + "changed": 0, + "helped": 0, + "harmed": 0, + "tied": 0, + "nogate_changed": 3, + "reasons": { + "relation_unsatisfied": 9, + "projected": 7, + "anchor_ambiguous": 15, + "anchor_missing": 4, + "assignment_ambiguous": 2 + } + }, + "sensitivity": [ + { + "setting": "0/0", + "PC50": 0.12125, + "mIoU": 0.35465186952428623 + }, + { + "setting": "0/0.015", + "PC50": 0.1575, + "mIoU": 0.3736583130588595 + }, + { + "setting": "0/0.03", + "PC50": 0.1575, + "mIoU": 0.37297976323287785 + }, + { + "setting": "0/0.06", + "PC50": 0.1575, + "mIoU": 0.37300431940488166 + }, + { + "setting": "0.25/0", + "PC50": 0.12125, + "mIoU": 0.3549399709359832 + }, + { + "setting": "0.25/0.015", + "PC50": 0.1575, + "mIoU": 0.3740256899875884 + }, + { + "setting": "0.25/0.03", + "PC50": 0.1575, + "mIoU": 0.37334714016160675 + }, + { + "setting": "0.25/0.06", + "PC50": 0.1575, + "mIoU": 0.37337169633361056 + }, + { + "setting": "0.5/0", + "PC50": 0.12125, + "mIoU": 0.3549399709359832 + }, + { + "setting": "0.5/0.015", + "PC50": 0.1575, + "mIoU": 0.3740256899875884 + }, + { + "setting": "0.5/0.03", + "PC50": 0.1575, + "mIoU": 0.37334714016160675 + }, + { + "setting": "0.5/0.06", + "PC50": 0.1575, + "mIoU": 0.37337169633361056 + }, + { + "setting": "1/0", + "PC50": 0.12125, + "mIoU": 0.3549399709359832 + }, + { + "setting": "1/0.015", + "PC50": 0.1575, + "mIoU": 0.3740256899875884 + }, + { + "setting": "1/0.03", + "PC50": 0.1575, + "mIoU": 0.37334714016160675 + }, + { + "setting": "1/0.06", + "PC50": 0.1575, + "mIoU": 0.37337169633361056 + } + ] + } +} diff --git a/source/results/analysis/phase1_multiplicity.json b/source/results/analysis/phase1_multiplicity.json new file mode 100644 index 0000000000000000000000000000000000000000..3f4b395f12eefd310d79170b9ff6cad7e605a3a0 --- /dev/null +++ b/source/results/analysis/phase1_multiplicity.json @@ -0,0 +1,132 @@ +{ + "clipseg": { + "frozen": { + "delta": 0.253125, + "pointwise_ci": [ + 0.2371875, + 0.26875 + ], + "simultaneous_ci": [ + 0.23197786458333333, + 0.275 + ] + }, + "global_direction": { + "delta": 0.0846875, + "pointwise_ci": [ + 0.068125, + 0.1003125 + ], + "simultaneous_ci": [ + 0.063125, + 0.105625 + ] + }, + "anchor_gate": { + "delta": -0.001875, + "pointwise_ci": [ + -0.0034375, + -0.000625 + ], + "simultaneous_ci": [ + -0.0040625, + -0.0003125 + ] + }, + "all_natural": { + "n": 1800, + "images": 1800, + "delta": -0.0009721236601384541, + "ci": [ + -0.0035761313689241583, + 0.0013680912970241335 + ], + "helped": 26, + "harmed": 42, + "tied": 1732, + "sign_p": 0.06811867428409976, + "paired_sd": 0.05407193472657569, + "approx_iid_mde80": 0.003570585967948234 + }, + "supported_natural": { + "n": 122, + "images": 122, + "delta": -0.014342808100403415, + "ci": [ + -0.050980912947633086, + 0.020843896193455995 + ], + "helped": 26, + "harmed": 42, + "tied": 54, + "sign_p": 0.06811867428409976, + "paired_sd": 0.2080303801191783, + "approx_iid_mde80": 0.0527655761503328 + } + }, + "groundedsam": { + "frozen": { + "delta": 0.183125, + "pointwise_ci": [ + 0.1696875, + 0.195625 + ], + "simultaneous_ci": [ + 0.16583072916666666, + 0.19958463541666666 + ] + }, + "global_direction": { + "delta": 0.025, + "pointwise_ci": [ + 0.012492187500000002, + 0.0378125 + ], + "simultaneous_ci": [ + 0.008540364583333333, + 0.042084635416666676 + ] + }, + "anchor_gate": { + "delta": -0.0003125, + "pointwise_ci": [ + -0.0009375, + 0.0 + ], + "simultaneous_ci": [ + -0.00125, + 0.0 + ] + }, + "all_natural": { + "n": 1800, + "images": 1800, + "delta": -0.00038529401767105136, + "ci": [ + -0.0025189091413087604, + 0.0018698848994975095 + ], + "helped": 37, + "harmed": 42, + "tied": 1721, + "sign_p": 0.6529643755164601, + "paired_sd": 0.04842828466157272, + "approx_iid_mde80": 0.0031979131972769506 + }, + "supported_natural": { + "n": 122, + "images": 122, + "delta": -0.005684665834490921, + "ci": [ + -0.04077751143597103, + 0.02625331999543932 + ], + "helped": 37, + "harmed": 42, + "tied": 43, + "sign_p": 0.6529643755164601, + "paired_sd": 0.18665204272474514, + "approx_iid_mde80": 0.047343097524339676 + } + } +} \ No newline at end of file diff --git a/source/results/analysis/phase1_threshold_curves.json b/source/results/analysis/phase1_threshold_curves.json new file mode 100644 index 0000000000000000000000000000000000000000..e59407fe08c89d83802da08614558f543d5433b0 --- /dev/null +++ b/source/results/analysis/phase1_threshold_curves.json @@ -0,0 +1,730 @@ +[ + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.3, + "PC": 0.2621875, + "Pr": 0.54765625 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.35, + "PC": 0.191875, + "Pr": 0.49515625 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.39999999999999997, + "PC": 0.1534375, + "Pr": 0.45875 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.44999999999999996, + "PC": 0.1303125, + "Pr": 0.42453125 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.49999999999999994, + "PC": 0.1040625, + "Pr": 0.38203125 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.5499999999999999, + "PC": 0.0846875, + "Pr": 0.33890625 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.5999999999999999, + "PC": 0.0653125, + "Pr": 0.2940625 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.6499999999999999, + "PC": 0.04875, + "Pr": 0.24296875 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.7, + "PC": 0.0359375, + "Pr": 0.201875 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.7499999999999999, + "PC": 0.0246875, + "Pr": 0.15953125 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.7999999999999998, + "PC": 0.015, + "Pr": 0.11609375 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.8499999999999999, + "PC": 0.0059375, + "Pr": 0.06890625 + }, + { + "model": "clipseg", + "variant": "frozen", + "tau": 0.8999999999999999, + "PC": 0.0003125, + "Pr": 0.02484375 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.3, + "PC": 0.4340625, + "Pr": 0.62453125 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.35, + "PC": 0.400625, + "Pr": 0.5915625 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.39999999999999997, + "PC": 0.3625, + "Pr": 0.56109375 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.44999999999999996, + "PC": 0.3246875, + "Pr": 0.52796875 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.49999999999999994, + "PC": 0.2725, + "Pr": 0.48546875 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.5499999999999999, + "PC": 0.23375, + "Pr": 0.44546875 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.5999999999999999, + "PC": 0.1921875, + "Pr": 0.39984375 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.6499999999999999, + "PC": 0.1515625, + "Pr": 0.34890625 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.7, + "PC": 0.1175, + "Pr": 0.30421875 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.7499999999999999, + "PC": 0.0859375, + "Pr": 0.2534375 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.7999999999999998, + "PC": 0.056875, + "Pr": 0.19078125 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.8499999999999999, + "PC": 0.0271875, + "Pr": 0.12328125 + }, + { + "model": "clipseg", + "variant": "global_direction", + "tau": 0.8999999999999999, + "PC": 0.0046875, + "Pr": 0.045 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.3, + "PC": 0.4884375, + "Pr": 0.703125 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.35, + "PC": 0.4596875, + "Pr": 0.679375 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.39999999999999997, + "PC": 0.4253125, + "Pr": 0.65171875 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.44999999999999996, + "PC": 0.395, + "Pr": 0.6234375 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.49999999999999994, + "PC": 0.3590625, + "Pr": 0.58765625 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.5499999999999999, + "PC": 0.3221875, + "Pr": 0.54609375 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.5999999999999999, + "PC": 0.280625, + "Pr": 0.50015625 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.6499999999999999, + "PC": 0.2359375, + "Pr": 0.44703125 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.7, + "PC": 0.194375, + "Pr": 0.39171875 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.7499999999999999, + "PC": 0.141875, + "Pr": 0.3190625 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.7999999999999998, + "PC": 0.0915625, + "Pr": 0.235 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.8499999999999999, + "PC": 0.048125, + "Pr": 0.14875 + }, + { + "model": "clipseg", + "variant": "anchor_gate", + "tau": 0.8999999999999999, + "PC": 0.0009375, + "Pr": 0.0403125 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.3, + "PC": 0.4865625, + "Pr": 0.70171875 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.35, + "PC": 0.458125, + "Pr": 0.6778125 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.39999999999999997, + "PC": 0.42375, + "Pr": 0.65 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.44999999999999996, + "PC": 0.3934375, + "Pr": 0.62171875 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.49999999999999994, + "PC": 0.3571875, + "Pr": 0.5859375 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.5499999999999999, + "PC": 0.320625, + "Pr": 0.5446875 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.5999999999999999, + "PC": 0.28, + "Pr": 0.4990625 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.6499999999999999, + "PC": 0.235625, + "Pr": 0.44625 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.7, + "PC": 0.1940625, + "Pr": 0.39109375 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.7499999999999999, + "PC": 0.1415625, + "Pr": 0.31875 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.7999999999999998, + "PC": 0.09125, + "Pr": 0.23484375 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.8499999999999999, + "PC": 0.0478125, + "Pr": 0.14859375 + }, + { + "model": "clipseg", + "variant": "cacp", + "tau": 0.8999999999999999, + "PC": 0.0009375, + "Pr": 0.0403125 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.3, + "PC": 0.0709375, + "Pr": 0.49109375 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.35, + "PC": 0.023125, + "Pr": 0.41515625 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.39999999999999997, + "PC": 0.004375, + "Pr": 0.3425 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.44999999999999996, + "PC": 0.000625, + "Pr": 0.2625 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.49999999999999994, + "PC": 0.0003125, + "Pr": 0.1890625 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.5499999999999999, + "PC": 0.0, + "Pr": 0.11703125 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.5999999999999999, + "PC": 0.0, + "Pr": 0.065625 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.6499999999999999, + "PC": 0.0, + "Pr": 0.0365625 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.7, + "PC": 0.0, + "Pr": 0.02015625 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.7499999999999999, + "PC": 0.0, + "Pr": 0.01296875 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.7999999999999998, + "PC": 0.0, + "Pr": 0.00578125 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.8499999999999999, + "PC": 0.0, + "Pr": 0.0028125 + }, + { + "model": "groundedsam", + "variant": "frozen", + "tau": 0.8999999999999999, + "PC": 0.0, + "Pr": 0.00109375 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.3, + "PC": 0.3534375, + "Pr": 0.64203125 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.35, + "PC": 0.3278125, + "Pr": 0.584375 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.39999999999999997, + "PC": 0.2903125, + "Pr": 0.5184375 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.44999999999999996, + "PC": 0.226875, + "Pr": 0.43828125 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.49999999999999994, + "PC": 0.1584375, + "Pr": 0.36484375 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.5499999999999999, + "PC": 0.0853125, + "Pr": 0.28890625 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.5999999999999999, + "PC": 0.0365625, + "Pr": 0.23578125 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.6499999999999999, + "PC": 0.015, + "Pr": 0.20828125 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.7, + "PC": 0.0075, + "Pr": 0.19703125 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.7499999999999999, + "PC": 0.005, + "Pr": 0.19328125 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.7999999999999998, + "PC": 0.0015625, + "Pr": 0.18765625 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.8499999999999999, + "PC": 0.000625, + "Pr": 0.18609375 + }, + { + "model": "groundedsam", + "variant": "global_direction", + "tau": 0.8999999999999999, + "PC": 0.0003125, + "Pr": 0.185625 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.3, + "PC": 0.3115625, + "Pr": 0.6328125 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.35, + "PC": 0.28625, + "Pr": 0.5946875 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.39999999999999997, + "PC": 0.259375, + "Pr": 0.55 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.44999999999999996, + "PC": 0.22125, + "Pr": 0.48890625 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.49999999999999994, + "PC": 0.18375, + "Pr": 0.42890625 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.5499999999999999, + "PC": 0.1328125, + "Pr": 0.35265625 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.5999999999999999, + "PC": 0.086875, + "Pr": 0.28015625 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.6499999999999999, + "PC": 0.055, + "Pr": 0.2221875 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.7, + "PC": 0.0353125, + "Pr": 0.18953125 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.7499999999999999, + "PC": 0.0221875, + "Pr": 0.16515625 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.7999999999999998, + "PC": 0.01, + "Pr": 0.14328125 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.8499999999999999, + "PC": 0.003125, + "Pr": 0.1309375 + }, + { + "model": "groundedsam", + "variant": "anchor_gate", + "tau": 0.8999999999999999, + "PC": 0.0028125, + "Pr": 0.13015625 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.3, + "PC": 0.31125, + "Pr": 0.63265625 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.35, + "PC": 0.2859375, + "Pr": 0.59453125 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.39999999999999997, + "PC": 0.2590625, + "Pr": 0.54984375 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.44999999999999996, + "PC": 0.2209375, + "Pr": 0.48875 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.49999999999999994, + "PC": 0.1834375, + "Pr": 0.42875 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.5499999999999999, + "PC": 0.1325, + "Pr": 0.3525 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.5999999999999999, + "PC": 0.0865625, + "Pr": 0.28 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.6499999999999999, + "PC": 0.0546875, + "Pr": 0.22203125 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.7, + "PC": 0.0353125, + "Pr": 0.18953125 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.7499999999999999, + "PC": 0.0221875, + "Pr": 0.16515625 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.7999999999999998, + "PC": 0.01, + "Pr": 0.14328125 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.8499999999999999, + "PC": 0.003125, + "Pr": 0.1309375 + }, + { + "model": "groundedsam", + "variant": "cacp", + "tau": 0.8999999999999999, + "PC": 0.0028125, + "Pr": 0.13015625 + } +] \ No newline at end of file diff --git a/source/results/analysis/rela_metric_verification.json b/source/results/analysis/rela_metric_verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871578eabb72016dcf6b7014a97b4715aeb55e3d --- /dev/null +++ b/source/results/analysis/rela_metric_verification.json @@ -0,0 +1,18 @@ +{ + "status": "PASS", + "independent_equation_replay": { + "n": 49492, + "gIoU": 0.6036496596019391, + "cIoU": 0.604133178068629, + "Nacc": 0.4913458337956285, + "positive_mIoU": 0.6679854113334764, + "false_empty": 0.01268035339731774, + "Pr50": 0.7483315324477213 + }, + "fixture_check": { + "fixtures": 6, + "gIoU": 0.4166666666666667, + "cIoU": 0.3684210526315789 + }, + "reference": "ReLA gres_model/evaluation/refer_evaluation.py" +} diff --git a/source/results/r3/jobs/clipseg_0of16.meta.json b/source/results/r3/jobs/clipseg_0of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..6e6adb9bd247ebb177ad3c01a3258c9333bab4f7 --- /dev/null +++ b/source/results/r3/jobs/clipseg_0of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 94, + "images": 61, + "seconds": 6.9787256717681885, + "args": { + "model": "clipseg", + "shard": 0, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334006" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_10of16.meta.json b/source/results/r3/jobs/clipseg_10of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..d486970d88169f10e6799f68256d887098dddba4 --- /dev/null +++ b/source/results/r3/jobs/clipseg_10of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 98, + "images": 61, + "seconds": 8.540688037872314, + "args": { + "model": "clipseg", + "shard": 10, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334016" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_11of16.meta.json b/source/results/r3/jobs/clipseg_11of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..c30ac94c2d877629677fd3069d27a0add5ead409 --- /dev/null +++ b/source/results/r3/jobs/clipseg_11of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 84, + "images": 61, + "seconds": 7.6332666873931885, + "args": { + "model": "clipseg", + "shard": 11, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334017" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_12of16.meta.json b/source/results/r3/jobs/clipseg_12of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..f58dbfb975dda7d449bb60b15d2c5f888212dbf8 --- /dev/null +++ b/source/results/r3/jobs/clipseg_12of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 105, + "images": 61, + "seconds": 9.143516302108765, + "args": { + "model": "clipseg", + "shard": 12, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334018" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_13of16.meta.json b/source/results/r3/jobs/clipseg_13of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..7bb61527aba5a178d4918102f3683d49db811f68 --- /dev/null +++ b/source/results/r3/jobs/clipseg_13of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 90, + "images": 60, + "seconds": 8.010075569152832, + "args": { + "model": "clipseg", + "shard": 13, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334019" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_14of16.meta.json b/source/results/r3/jobs/clipseg_14of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..d93dfa515b142caed6e138aa1592710afcbaee92 --- /dev/null +++ b/source/results/r3/jobs/clipseg_14of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 103, + "images": 60, + "seconds": 9.516514539718628, + "args": { + "model": "clipseg", + "shard": 14, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334020" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_15of16.meta.json b/source/results/r3/jobs/clipseg_15of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..a98aa2521f740a5adce7716bb9af891ee1bc4496 --- /dev/null +++ b/source/results/r3/jobs/clipseg_15of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 102, + "images": 60, + "seconds": 9.05295443534851, + "args": { + "model": "clipseg", + "shard": 15, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334021" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_1of16.meta.json b/source/results/r3/jobs/clipseg_1of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..a351bb0877dbbfbcab3f9d6494d7ab69ca0eb50b --- /dev/null +++ b/source/results/r3/jobs/clipseg_1of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 99, + "images": 61, + "seconds": 7.135345220565796, + "args": { + "model": "clipseg", + "shard": 1, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334007" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_2of16.meta.json b/source/results/r3/jobs/clipseg_2of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..abb76ed9a3a97719b719b1cd52023e66fa345ae8 --- /dev/null +++ b/source/results/r3/jobs/clipseg_2of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 91, + "images": 61, + "seconds": 7.047706127166748, + "args": { + "model": "clipseg", + "shard": 2, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334008" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_3of16.meta.json b/source/results/r3/jobs/clipseg_3of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..66b412c29600c54f39cfd0b561f0ce3193dc0c4d --- /dev/null +++ b/source/results/r3/jobs/clipseg_3of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 111, + "images": 61, + "seconds": 8.467118740081787, + "args": { + "model": "clipseg", + "shard": 3, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334009" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_4of16.meta.json b/source/results/r3/jobs/clipseg_4of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..f1bb17573b759a2c3b646a884fdbd9f592a19d93 --- /dev/null +++ b/source/results/r3/jobs/clipseg_4of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 90, + "images": 61, + "seconds": 6.669534921646118, + "args": { + "model": "clipseg", + "shard": 4, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334010" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_5of16.meta.json b/source/results/r3/jobs/clipseg_5of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..d3770deab5158f34d043efad1017a9fc577bb24f --- /dev/null +++ b/source/results/r3/jobs/clipseg_5of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 101, + "images": 61, + "seconds": 6.824836492538452, + "args": { + "model": "clipseg", + "shard": 5, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334011" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_6of16.meta.json b/source/results/r3/jobs/clipseg_6of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..c92be5a072e5ae34bd7e23509464d051b8924b10 --- /dev/null +++ b/source/results/r3/jobs/clipseg_6of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 98, + "images": 61, + "seconds": 7.096818208694458, + "args": { + "model": "clipseg", + "shard": 6, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334012" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_7of16.meta.json b/source/results/r3/jobs/clipseg_7of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..3bfc3abac96f7b75c8060700a334c2fcef4e557a --- /dev/null +++ b/source/results/r3/jobs/clipseg_7of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 94, + "images": 61, + "seconds": 6.829067230224609, + "args": { + "model": "clipseg", + "shard": 7, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334013" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_8of16.meta.json b/source/results/r3/jobs/clipseg_8of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..8ee8175a84d9754163e3305315e869934da029bd --- /dev/null +++ b/source/results/r3/jobs/clipseg_8of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 95, + "images": 61, + "seconds": 7.216134309768677, + "args": { + "model": "clipseg", + "shard": 8, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334014" +} \ No newline at end of file diff --git a/source/results/r3/jobs/clipseg_9of16.meta.json b/source/results/r3/jobs/clipseg_9of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..790439af875e1d7a2d5c104cd6a99b3066201086 --- /dev/null +++ b/source/results/r3/jobs/clipseg_9of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 102, + "images": 61, + "seconds": 7.593204975128174, + "args": { + "model": "clipseg", + "shard": 9, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334015" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_0of16.meta.json b/source/results/r3/jobs/groundedsam_0of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..8a82b4bed92a120a85542d19908d0c2ec83c1a67 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_0of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 94, + "images": 61, + "seconds": 10.721068382263184, + "args": { + "model": "groundedsam", + "shard": 0, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334022" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_10of16.meta.json b/source/results/r3/jobs/groundedsam_10of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..bcf412f9806b331523b60dd0ba453f9d8460859d --- /dev/null +++ b/source/results/r3/jobs/groundedsam_10of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 98, + "images": 61, + "seconds": 8.175151348114014, + "args": { + "model": "groundedsam", + "shard": 10, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334032" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_11of16.meta.json b/source/results/r3/jobs/groundedsam_11of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..453f5069b947e5efc8d2b52ed335d2dd147ac19b --- /dev/null +++ b/source/results/r3/jobs/groundedsam_11of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 84, + "images": 61, + "seconds": 7.363343715667725, + "args": { + "model": "groundedsam", + "shard": 11, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334033" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_12of16.meta.json b/source/results/r3/jobs/groundedsam_12of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..116cab49c7aee208dc6efae2680bd2ec7383e2bd --- /dev/null +++ b/source/results/r3/jobs/groundedsam_12of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 105, + "images": 61, + "seconds": 8.55215859413147, + "args": { + "model": "groundedsam", + "shard": 12, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334034" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_13of16.meta.json b/source/results/r3/jobs/groundedsam_13of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..10f585d5a3de6aa5ffea85b7d9bb705310684500 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_13of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 90, + "images": 60, + "seconds": 7.951685667037964, + "args": { + "model": "groundedsam", + "shard": 13, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334035" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_14of16.meta.json b/source/results/r3/jobs/groundedsam_14of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..5d90f2386ff5fbbdb3b5fa537c00e41f28d36a55 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_14of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 103, + "images": 60, + "seconds": 9.714261770248413, + "args": { + "model": "groundedsam", + "shard": 14, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334036" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_15of16.meta.json b/source/results/r3/jobs/groundedsam_15of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..bb552a3dae5a81514a0d61f5680fed69de47b99b --- /dev/null +++ b/source/results/r3/jobs/groundedsam_15of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 102, + "images": 60, + "seconds": 8.019063949584961, + "args": { + "model": "groundedsam", + "shard": 15, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334005" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_1of16.meta.json b/source/results/r3/jobs/groundedsam_1of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..b36f7cc416966e5a87d86ca74c2d6df6cfc1eb16 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_1of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 99, + "images": 61, + "seconds": 10.413763523101807, + "args": { + "model": "groundedsam", + "shard": 1, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334023" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_2of16.meta.json b/source/results/r3/jobs/groundedsam_2of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..0b7554e7f9a4b3cc0da8058ac94e1072a2abf9ee --- /dev/null +++ b/source/results/r3/jobs/groundedsam_2of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 91, + "images": 61, + "seconds": 11.051585912704468, + "args": { + "model": "groundedsam", + "shard": 2, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334024" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_3of16.meta.json b/source/results/r3/jobs/groundedsam_3of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..59a031ac3b80d02044147009a3d787294e639ea9 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_3of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 111, + "images": 61, + "seconds": 12.22492504119873, + "args": { + "model": "groundedsam", + "shard": 3, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334025" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_4of16.meta.json b/source/results/r3/jobs/groundedsam_4of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..755aa79a9c01ed14c10848e6d31c67057c2a32c8 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_4of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 90, + "images": 61, + "seconds": 10.256789207458496, + "args": { + "model": "groundedsam", + "shard": 4, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334026" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_5of16.meta.json b/source/results/r3/jobs/groundedsam_5of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..96103ddb779924a4a0e72bac33b10505058700e8 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_5of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 101, + "images": 61, + "seconds": 10.174349069595337, + "args": { + "model": "groundedsam", + "shard": 5, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334027" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_6of16.meta.json b/source/results/r3/jobs/groundedsam_6of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..052034171c775a9684520b17d7ed4adb850b9e83 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_6of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 98, + "images": 61, + "seconds": 11.141555070877075, + "args": { + "model": "groundedsam", + "shard": 6, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334028" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_7of16.meta.json b/source/results/r3/jobs/groundedsam_7of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..eba6cab5179cca9dd3cdec47daf298197970d1f9 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_7of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 94, + "images": 61, + "seconds": 12.278854846954346, + "args": { + "model": "groundedsam", + "shard": 7, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334029" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_8of16.meta.json b/source/results/r3/jobs/groundedsam_8of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..3dec8f3cb199bd3845b1da671721427de68a77e6 --- /dev/null +++ b/source/results/r3/jobs/groundedsam_8of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 95, + "images": 61, + "seconds": 9.051699161529541, + "args": { + "model": "groundedsam", + "shard": 8, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334030" +} \ No newline at end of file diff --git a/source/results/r3/jobs/groundedsam_9of16.meta.json b/source/results/r3/jobs/groundedsam_9of16.meta.json new file mode 100644 index 0000000000000000000000000000000000000000..b755804396cdfe91e2d8c43d9e027d1409beff5c --- /dev/null +++ b/source/results/r3/jobs/groundedsam_9of16.meta.json @@ -0,0 +1,92 @@ +{ + "status": "COMPLETE", + "records": 102, + "images": 61, + "seconds": 11.808109045028687, + "args": { + "model": "groundedsam", + "shard": 9, + "shards": 16, + "limit": 0 + }, + "configs": { + "primary": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.02": { + "anchor_margin": 0.02, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "anchor_margin_0.1": { + "anchor_margin": 0.1, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.02": { + "anchor_margin": 0.05, + "target_margin": 0.02, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "target_margin_0.1": { + "anchor_margin": 0.05, + "target_margin": 0.1, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.01": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.01, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "geometry_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.05, + "size_factor": 1.0, + "threshold_offset": 0.0 + }, + "size_factor_0.5": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 0.5, + "threshold_offset": 0.0 + }, + "size_factor_2.0": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 2.0, + "threshold_offset": 0.0 + }, + "threshold_offset_-0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": -0.05 + }, + "threshold_offset_0.05": { + "anchor_margin": 0.05, + "target_margin": 0.05, + "geometry": 0.03, + "size_factor": 1.0, + "threshold_offset": 0.05 + } + }, + "job_id": "6334031" +} \ No newline at end of file diff --git a/source/results/r3/review_results.json b/source/results/r3/review_results.json new file mode 100644 index 0000000000000000000000000000000000000000..5f9df345a26dfcfcb49b9984ab1c56ed028f13cb --- /dev/null +++ b/source/results/r3/review_results.json @@ -0,0 +1,526 @@ +{ + "clipseg": { + "coverage": [ + { + "n": 49492, + "delta": 6.588036401691545e-05, + "ci": [ + -6.872003935637332e-05, + 0.00019699501021544123 + ], + "helped": 23, + "harmed": 10, + "tied": 49459, + "scope": "short_relations", + "accepted": 292, + "coverage": 0.005899943425200033, + "conditional_delta": 0.01116627046549719, + "gIoU": 0.4397821882175946, + "accepted_tied": 259 + }, + { + "n": 49492, + "delta": 0.00013446904937211308, + "ci": [ + -1.477004753536489e-05, + 0.00027393342491270525 + ], + "helped": 33, + "harmed": 10, + "tied": 49449, + "scope": "relations", + "accepted": 382, + "coverage": 0.007718419138446618, + "conditional_delta": 0.017421838197708425, + "gIoU": 0.4398507769029498, + "accepted_tied": 339 + }, + { + "n": 49492, + "delta": 0.0010813370424072079, + "ci": [ + 0.0007478964675145184, + 0.0014130676104949784 + ], + "helped": 517, + "harmed": 364, + "tied": 48611, + "scope": "primary", + "accepted": 1557, + "coverage": 0.03145962983916593, + "conditional_delta": 0.03437221124137282, + "gIoU": 0.44079764489598494, + "accepted_tied": 676 + }, + { + "n": 49492, + "delta": 0.0011783429959366808, + "ci": [ + 0.000702272211481839, + 0.0016518294666723215 + ], + "helped": 871, + "harmed": 722, + "tied": 47899, + "scope": "legacy", + "accepted": 2809, + "coverage": 0.0567566475389962, + "conditional_delta": 0.020761321308258522, + "gIoU": 0.4408946508495144, + "accepted_tied": 1216 + } + ], + "sensitivity": [ + { + "n": 49492, + "delta": 0.0010813370424072079, + "ci": [ + 0.0007478964675145184, + 0.0014130676104949784 + ], + "helped": 517, + "harmed": 364, + "tied": 48611, + "config": "primary", + "accepted": 1557, + "conditional_delta": 0.03437221124137282, + "changed": 950 + }, + { + "n": 49492, + "delta": 0.0011065396502352737, + "ci": [ + 0.000768365175922019, + 0.0014501704892040416 + ], + "helped": 520, + "harmed": 364, + "tied": 48608, + "config": "anchor_margin_0.02", + "accepted": 1557, + "conditional_delta": 0.035173320725397646, + "changed": 955 + }, + { + "n": 49492, + "delta": 0.0010771391218310756, + "ci": [ + 0.000741676062139111, + 0.0014091729107663196 + ], + "helped": 515, + "harmed": 364, + "tied": 48613, + "config": "anchor_margin_0.1", + "accepted": 1557, + "conditional_delta": 0.03423877290794061, + "changed": 948 + }, + { + "n": 49492, + "delta": 0.001089654582011919, + "ci": [ + 0.0007562323163415912, + 0.001420901702316247 + ], + "helped": 520, + "harmed": 364, + "tied": 48608, + "config": "target_margin_0.02", + "accepted": 1557, + "conditional_delta": 0.03463659895499924, + "changed": 955 + }, + { + "n": 49492, + "delta": 0.0010516401564936097, + "ci": [ + 0.0007249333290875428, + 0.0013845841280515276 + ], + "helped": 512, + "harmed": 363, + "tied": 48617, + "config": "target_margin_0.1", + "accepted": 1557, + "conditional_delta": 0.03342824317609613, + "changed": 940 + }, + { + "n": 49492, + "delta": 0.0010860709116670704, + "ci": [ + 0.0007499866852942684, + 0.0014187459159629822 + ], + "helped": 518, + "harmed": 365, + "tied": 48609, + "config": "geometry_0.01", + "accepted": 1557, + "conditional_delta": 0.034522685652040204, + "changed": 953 + }, + { + "n": 49492, + "delta": 0.0010889898262150578, + "ci": [ + 0.0007557631207769255, + 0.0014202525907814408 + ], + "helped": 517, + "harmed": 364, + "tied": 48611, + "config": "geometry_0.05", + "accepted": 1557, + "conditional_delta": 0.03461546851575824, + "changed": 950 + }, + { + "n": 49492, + "delta": 0.0010784736454519266, + "ci": [ + 0.0007471044756112741, + 0.0014055056079331186 + ], + "helped": 518, + "harmed": 370, + "tied": 48604, + "config": "size_factor_0.5", + "accepted": 1557, + "conditional_delta": 0.03428119310257331, + "changed": 958 + }, + { + "n": 49492, + "delta": 0.0011144030178704691, + "ci": [ + 0.0007873781879772924, + 0.0014411894180324024 + ], + "helped": 520, + "harmed": 357, + "tied": 48615, + "config": "size_factor_2.0", + "accepted": 1557, + "conditional_delta": 0.03542327177934824, + "changed": 946 + }, + { + "n": 49492, + "delta": 0.001060739034299282, + "ci": [ + 0.0007462250671607397, + 0.0013759365208996883 + ], + "helped": 541, + "harmed": 386, + "tied": 48565, + "config": "threshold_offset_-0.05", + "accepted": 1557, + "conditional_delta": 0.03371746710696211, + "changed": 994 + }, + { + "n": 49492, + "delta": 0.0010575196021963237, + "ci": [ + 0.0007235227814752307, + 0.001385105843567776 + ], + "helped": 499, + "harmed": 346, + "tied": 48647, + "config": "threshold_offset_0.05", + "accepted": 1557, + "conditional_delta": 0.03361513176101508, + "changed": 908 + } + ], + "harm": { + "accepted": 1557, + "harmed": 364, + "harm_fraction_accepted": 0.23378291586384073, + "mean_loss": 0.11967631826262771, + "sum_loss": 43.56217984759649, + "already_correct": 242, + "correct_to_incorrect": 64, + "to_empty": 0, + "empty_gt_harmed": 8, + "plural_flag_mismatch": 0, + "relation_cases": 25, + "anchor_cases": 10, + "boundary_sensitive": 1, + "component_filter_sensitive": 77, + "threshold_sensitive": 364, + "reason_counts": { + "plural": 339, + "projected": 10, + "extreme": 15 + } + }, + "primary_replay_max_error": 0.0 + }, + "groundedsam": { + "coverage": [ + { + "n": 49492, + "delta": 0.00013778210633906467, + "ci": [ + 4.928999354459656e-05, + 0.000239527489521167 + ], + "helped": 16, + "harmed": 7, + "tied": 49469, + "scope": "short_relations", + "accepted": 292, + "coverage": 0.005899943425200033, + "conditional_delta": 0.023353123311414342, + "gIoU": 0.3949061959573677, + "accepted_tied": 269 + }, + { + "n": 49492, + "delta": 0.0001531920848098212, + "ci": [ + 5.0455412684739806e-05, + 0.00026626377342422086 + ], + "helped": 19, + "harmed": 10, + "tied": 49463, + "scope": "relations", + "accepted": 382, + "coverage": 0.007718419138446618, + "conditional_delta": 0.019847598590072436, + "gIoU": 0.3949216059358384, + "accepted_tied": 353 + }, + { + "n": 49492, + "delta": 0.0007154550066892769, + "ci": [ + 0.0003213082354401277, + 0.0010769407648162348 + ], + "helped": 590, + "harmed": 497, + "tied": 48405, + "scope": "primary", + "accepted": 1557, + "coverage": 0.03145962983916593, + "conditional_delta": 0.022742003334017772, + "gIoU": 0.3954838688577179, + "accepted_tied": 470 + }, + { + "n": 49492, + "delta": 0.00029429392151707814, + "ci": [ + -0.00021258484023422043, + 0.0007507375082288799 + ], + "helped": 962, + "harmed": 936, + "tied": 47594, + "scope": "legacy", + "accepted": 2809, + "coverage": 0.0567566475389962, + "conditional_delta": 0.005185188595131088, + "gIoU": 0.3950627077725457, + "accepted_tied": 911 + } + ], + "sensitivity": [ + { + "n": 49492, + "delta": 0.0007154550066892769, + "ci": [ + 0.0003213082354401277, + 0.0010769407648162348 + ], + "helped": 590, + "harmed": 497, + "tied": 48405, + "config": "primary", + "accepted": 1557, + "conditional_delta": 0.022742003334017772, + "changed": 1185 + }, + { + "n": 49492, + "delta": 0.0006932639313577336, + "ci": [ + 0.00029859870709002435, + 0.001060722148007556 + ], + "helped": 591, + "harmed": 499, + "tied": 48402, + "config": "anchor_margin_0.02", + "accepted": 1557, + "conditional_delta": 0.022036620739086032, + "changed": 1193 + }, + { + "n": 49492, + "delta": 0.0007059568404509022, + "ci": [ + 0.000316533202994253, + 0.0010711804120932175 + ], + "helped": 589, + "harmed": 497, + "tied": 48406, + "config": "anchor_margin_0.1", + "accepted": 1557, + "conditional_delta": 0.022440087313806062, + "changed": 1180 + }, + { + "n": 49492, + "delta": 0.0006983776655448503, + "ci": [ + 0.0003089696634051528, + 0.0010618456944184993 + ], + "helped": 592, + "harmed": 503, + "tied": 48397, + "config": "target_margin_0.02", + "accepted": 1557, + "conditional_delta": 0.022199169828609956, + "changed": 1198 + }, + { + "n": 49492, + "delta": 0.0007323023730817758, + "ci": [ + 0.00034236547557707075, + 0.0010966165759574214 + ], + "helped": 590, + "harmed": 494, + "tied": 48408, + "config": "target_margin_0.1", + "accepted": 1557, + "conditional_delta": 0.02327752668501167, + "changed": 1181 + }, + { + "n": 49492, + "delta": 0.0007302170546811072, + "ci": [ + 0.00034013364246452294, + 0.0011041125478993931 + ], + "helped": 591, + "harmed": 499, + "tied": 48402, + "config": "geometry_0.01", + "accepted": 1557, + "conditional_delta": 0.02321124114982484, + "changed": 1189 + }, + { + "n": 49492, + "delta": 0.0007098367986181553, + "ci": [ + 0.00031549265572425653, + 0.0010702819885835793 + ], + "helped": 590, + "harmed": 498, + "tied": 48404, + "config": "geometry_0.05", + "accepted": 1557, + "conditional_delta": 0.022563418649460324, + "changed": 1187 + }, + { + "n": 49492, + "delta": 0.0006814704073758285, + "ci": [ + 0.0002917496604787536, + 0.0010439222153795433 + ], + "helped": 586, + "harmed": 499, + "tied": 48407, + "config": "size_factor_0.5", + "accepted": 1557, + "conditional_delta": 0.02166174271152506, + "changed": 1180 + }, + { + "n": 49492, + "delta": 0.0007662764573602305, + "ci": [ + 0.00037645772092021655, + 0.0011360537462402449 + ], + "helped": 602, + "harmed": 496, + "tied": 48394, + "config": "size_factor_2.0", + "accepted": 1557, + "conditional_delta": 0.02435745306851156, + "changed": 1202 + }, + { + "n": 49492, + "delta": 0.0007154550066892769, + "ci": [ + 0.0003213082354401277, + 0.0010769407648162348 + ], + "helped": 590, + "harmed": 497, + "tied": 48405, + "config": "threshold_offset_-0.05", + "accepted": 1557, + "conditional_delta": 0.022742003334017772, + "changed": 1185 + }, + { + "n": 49492, + "delta": 0.0010210160258335695, + "ci": [ + 0.0006395605672558335, + 0.0014335956168385522 + ], + "helped": 594, + "harmed": 438, + "tied": 48460, + "config": "threshold_offset_0.05", + "accepted": 1557, + "conditional_delta": 0.03245480099586064, + "changed": 1133 + } + ], + "harm": { + "accepted": 1557, + "harmed": 497, + "harm_fraction_accepted": 0.31920359666024406, + "mean_loss": 0.15302832135858366, + "sum_loss": 76.05507571521606, + "already_correct": 392, + "correct_to_incorrect": 112, + "to_empty": 0, + "empty_gt_harmed": 3, + "plural_flag_mismatch": 0, + "relation_cases": 23, + "anchor_cases": 10, + "boundary_sensitive": 0, + "component_filter_sensitive": 175, + "threshold_sensitive": 211, + "reason_counts": { + "plural": 474, + "extreme": 13, + "projected": 10 + } + }, + "primary_replay_max_error": 0.0 + } +} diff --git a/source/review/HUMAN_VALIDATION_PROTOCOL.md b/source/review/HUMAN_VALIDATION_PROTOCOL.md new file mode 100644 index 0000000000000000000000000000000000000000..228a07e00fd9cde41654254a542d2c9548d80e9a --- /dev/null +++ b/source/review/HUMAN_VALIDATION_PROTOCOL.md @@ -0,0 +1,48 @@ +# Human parser validation: independent forms and adjudication + +Status: prepared, not yet conducted. No independent human labels or expertise declarations have been supplied. The historical 122-item machine-assisted audit must not be treated as ground truth. + +## Participants and blinding + +Recruit two readers who can interpret English referring expressions and understand image segmentation. Record their actual expertise, relation to the project, and annotation dates in `annotator_metadata.json`; do not substitute assumed qualifications. They label independently before discussion. Do not give them the sampling key, model scores, provisional 122-item labels, or one another's form. + +Use `code/prepare_human_passes.py` to produce two ordered passes for each reader. In pass 1, show only the expression and collect representability/ambiguity judgments. Lock those responses before releasing pass 2, which reveals the proposed decomposition. Merge completed passes into each reader's combined form without overwriting the originals. The coordinator retains `parser_sampling_key.json`. The shared random order hides the explicit stratum labels. Model predictions and IoU values are not in these forms. + +## Population and sampling + +The population is all 49,492 gRefCOCO evaluation expressions. Three strata are sampled without replacement using seed 913: accepted by SFAP, supported by legacy grammar but rejected by SFAP, and outside legacy grammar. Each contributes 200 expressions (600 total). The key records population size, sample size, and expansion weight N_h/200. This enriched sample supports both acceptance and rejection assessment; an accepted-only sample cannot estimate recall. + +## Labels + +- `representable`: 1 if the expression's intended semantics can be expressed using the documented single-target phrase, optional single anchor, one supported spatial relation/extreme, unbounded plural union, or explicit action prohibition; otherwise 0. Exact counts, nested relations, relational modifiers, and implicit conditions outside this representation are 0. Decide independently of the proposed parser output. +- `decomposition_correct`: 1 only if every displayed target, anchor, relation, and plurality preserves the intended instruction; otherwise 0. A representable expression can still have an incorrect decomposition. +- `ambiguity`: 1 when the text admits materially different relevant readings; otherwise 0. Record uncertainty in `note`; use U temporarily instead of guessing. U must be resolved through adjudication or explicitly excluded with denominators and reasons changed before scoring. +- `error_type`: one or more of anchor phrase, target phrase, cardinality, relation, morphology, modifier scope, action polarity, ambiguity, other, none. +- `note`: quote the relevant phrase and explain a disagreement or uncertain label. Do not infer visual grounding correctness from text alone. + +Examples for training only (not measured study cases): “all dogs left of the chair” is representable; “exactly two dogs left of the chair” is not represented by unbounded union; “the dog left of the chair beside the table” requires unsupported nested scope. “both” encodes exact cardinality and needs explicit scrutiny even when a machine rule accepts it. + +## Agreement and adjudication + +Compute raw agreement and Cohen's kappa for the three binary fields on the independent forms, before adjudication. Report these as agreement on the stratified audit sample; they are not population accuracy. Inspect agreement separately by stratum as well. A third adjudicator, or an explicitly documented consensus meeting after independent labeling, resolves disagreements with reasons. Store the final 600 rows in `parser_adjudicated.csv`, retain both original forms, and record who adjudicated and when. + +The supplied scorer uses expansion weights to estimate the acceptance confusion table against semantic representability, acceptance precision/recall, false acceptance/rejection rates, and decomposition correctness among accepted expressions. Report the sample sizes and weighting alongside the metrics. These are separate constructs; high representability precision does not imply correct visual anchoring. Before publishing, add sampling-aware uncertainty estimates and publish representative adjudicated false acceptances and false rejections with their rationales. + +Run: + +```bash +python code/score_human_parser_audit.py \ + --a review/human/parser_annotator_A.csv \ + --b review/human/parser_annotator_B.csv \ + --key review/human/parser_sampling_key.json \ + --adjudicated review/human/parser_adjudicated.csv \ + --output review/human/human_audit_results.json +``` + +Blank or unresolved labels produce `INCOMPLETE`, with no parser-accuracy estimates. The current package is expected to produce that status. + +## Image-aware harm audit + +The two harm forms select 60 harmed expressions per model by a fixed SHA-256 order, not by handpicked visual appeal. For each case, retrieve the COCO image and exact cached full-query, target, anchor, native, repaired, and reference masks. A complete causal audit requires those visual records; query text and IoU alone are insufficient. + +Use separate binary labels for: anchor-grounding error; incorrect target decomposition; merged components spanning distinct instances; incorrect relation boundary; singular/plural selection; and modification of an already-correct original mask. Multiple labels may apply. The last item is also objectively available from native IoU >= 0.5. Record visual evidence; do not turn threshold sensitivity into a causal label. Keep the natural-language parser audit and this model-dependent image audit separate. diff --git a/source/review/INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md b/source/review/INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md new file mode 100644 index 0000000000000000000000000000000000000000..8b9f3cf29184039eafdc8fbb0ecec1cdbd8b4ecf --- /dev/null +++ b/source/review/INSAN_DEGERLENDIRMESI_UYGULAMA_KILAVUZU.md @@ -0,0 +1,53 @@ +# RefSeg-CA insan değerlendirmesi: uygulama kılavuzu + +Mevcut durum: hazırlık tamamlandı; insan etiketlemesi yapılmadı. Makaledeki R3 sayısal deney sonuçları bu çalışma beklenirken değiştirilmemeli. Yapay zekânın doldurduğu formlar insan gözlemi sayılamaz. + +## Kimler gerekli? + +İngilizce göndergesel ifadeleri anlayan ve segmentasyon görevine aşina iki bağımsız okuyucu seçin. Örneğin görüntü işleme alanında iki araştırmacı uygun olabilir; gerçek deneyimlerini kaydedin. Koda veya ön sonuçlara aşina olup olmadıklarını da belirtin. Yalnızca akademik unvan, etiketlerin doğru olduğunu göstermez. Anlaşmazlıklar için üçüncü bir değerlendirici tercih edin; bulunamazsa bağımsız etiketleme bittikten sonra gerekçeli bir uzlaşma oturumu düzenleyin. + +Katılımın gönüllü olduğunu, görevin kapsamını ve sonuçların nasıl raporlanacağını açıklayın. Ad/iletişim bilgilerini etiket dosyalarından ayrı tutun. Kurumunuzun bu tür okuyucu çalışmaları için uyguladığı inceleme veya izin sürecini danışmanınızla netleştirin; olmayan bir etik onay numarası yazmayın. + +## 1. Kısa eğitim ve pilot + +Ölçülecek 600 ifadeye dahil olmayan 20 örnek üzerinde yaklaşık 30–45 dakikalık eğitim yapın. Basit hedef, tek çapa, tek uzamsal ilişki, çoğulluk, tam sayı, iç içe ilişki ve olumsuz eylem ayrımını örnekleyin. Pilot sırasında belirsiz yönergeleri düzeltin; ana etiketleme başlamadan yönergenin sürümünü ve tarihini sabitleyin. + +Eğitimde özellikle şu ayrımları gösterin: “all dogs” sınırsız çoğul seçimi ister; “exactly two dogs” ayrı bir kardinalite şartıdır. “all dogs left of the chair” tek ilişkidir; “the dog left of the chair beside the table” iç içe kapsam gerektirebilir. Bunlar eğitim örnekleridir, ölçülmüş bulgu değildir. + +## 2. İki bağımsız okuma, 600 ifade + +Örneklem önceden sabittir: 200 kabul edilen, 200 eski dilbilgisinin destekleyip yeni korumanın reddettiği ve 200 eski dilbilgisinin dışındaki ifade. Her iki okuyucu da aynı 600 ifadeyi değerlendirir. Böylece toplam 1.200 bağımsız ifade okuması olur. Okuyuculara hangi örneğin hangi tabakadan geldiğini söylemeyin; örnekleme anahtarı koordinatörde kalır. + +Etiketlemeyi iki geçişte yürütün: + +1. Önce yalnızca ifadeyi gösterin. `representable` alanında niyetin yöntem temsiline sığıp sığmadığını; `ambiguity` alanında birden çok önemli okuma olup olmadığını işaretlesinler. Parser çıktısını ve model başarısını bu aşamada göstermeyin. +2. İlk geçişi kilitledikten sonra önerilen hedef/çapa/ilişki/çoğulluk ayrıştırmasını gösterin. `decomposition_correct` alanını ve hata türü/gerekçesini doldursunlar. İlk geçiş yanıtları geriye dönük sessizce değiştirilmemeli. + +Her temel alan 0/1 olmalı. Geçici `U` belirsizliği işaretler; sonuç hesabından önce gerekçeli uzlaştırılmalıdır. Emin olunmayan satırları sırf dosya tamamlanmış görünsün diye 0/1 ile doldurmayın. Her okuyucu kendi başına çalışmalı; yapay zekâ yanıtlarını veya diğer okuyucunun etiketlerini görmemeli. Süreyi pilotta ölçün; 600 ifadeyi birkaç oturuma bölüp mola verin. + +Mevcut birleşik CSV'ler koordinatörün nihai dosyalarıdır. İki geçişli görünüm için `code/prepare_human_passes.py` çalıştırın; `review/human/passes` altındaki A/B dosyalarını sırasıyla dağıtın. Her okuyucu için iki geçiş bitince aynı komutun `--merge A` veya `--merge B` seçeneği birleşik formu üretir. + +## 3. Anlaşma ve uzlaştırma + +Önce değiştirilmemiş bağımsız formlardan ham anlaşmayı ve Cohen kappa'yı üç temel alan için, toplamda ve her tabakada hesaplayın. Bir değerlendiricinin “1” deme oranının çok yüksek veya düşük olması kappa'yı etkileyebilir; ham anlaşmayı da raporlayın. Kappa'yı yükseltmek için anlaşmazlıkları bu hesaptan önce silmeyin. + +Ardından anlaşmazlıkları üçüncü okuyucu veya belgelenmiş ortak oturumla çözün. Son kararı `parser_adjudicated.csv` içinde saklayın; bağımsız A/B formlarının üzerine yazmayın. Uzlaştırıcı, tarih ve gerekçeler kayıtlı olsun. Tamamlanan dosyaları `score_human_parser_audit.py` ile puanlayın. Örnekleme ağırlıklı kabul precision/recall, yanlış kabul/reddetme oranları ve kabul edilenlerde ayrıştırma doğruluğu farklı ölçülerdir; tek bir “parser accuracy” sayısına indirgemeyin. Tasarıma uygun belirsizlik aralıklarını da ekleyin. + +## 4. Ayrı görüntülü hata incelemesi: 120 müdahale + +CLIPSeg ve Grounded SAM için önceden seçilmiş 60'ar zararlı müdahale vardır. Her örnekte özgün görüntü, referans maske, özgün tam-komut çıktısı, hedef/çapa tahminleri ve SFAP çıktısı birlikte incelenmelidir. İki okuyucu aynı 120 örneği bağımsız inceleyebilir. Model adını ve IoU değerlerini ilk görsel değerlendirmede gizleyin; tahmin–referans karşılaştırması için hangi panelin ne olduğu yine açık olsun. + +Birden fazla hata türüne izin verin: çapanın yanlış bulunması; hedef ayrıştırma hatası; ayrı nesnelerin tek bağlı bileşende birleşmesi; ilişki sınırı hatası; tekil/çoğul seçim hatası; önceden doğru maskenin bozulması. IoU ≥ 0,5 eşiğiyle “önceden doğru” tanımını ayrıca sayısal olarak raporlayın. İlk beş tür için görüntü kanıtı ve kısa gerekçe gerekir; yalnızca komuta veya IoU farkına bakarak neden atamayın. Çapa içermeyen bir örnekte çapa hatasını `not applicable` olarak işaretleyin; 0 ile karıştırmayın. + +Bu 120 örnek yalnızca zararlı müdahalelerden seçilmiştir. Sonuçlar zararlı müdahalelerdeki neden dağılımını anlatır; tüm 49.492 ifade için hata prevalansı olarak sunulamaz. Aynı görüntüye ait birden fazla örneğin bağımsız olmayabileceğini belirsizlik hesabında dikkate alın. + +## Makaleye dönecek çıktılar + +- Okuyucu sayısı, gerçek uzmanlık, bağımsızlık, eğitim, tarihler ve protokol sürümü. +- 600 ifadenin tabakalara göre sayıları; eksik/kararsız etiketlerin nasıl ele alındığı. +- Uzlaştırma öncesi anlaşma/kappa ve belirsizlik aralıkları. +- Uzlaştırılmış, örnekleme ağırlıklı kabul ve ayrıştırma ölçüleri. +- Gerekçeli yanlış kabul ve yanlış ret örnekleri. +- 120 zararlı müdahalede çoklu neden sayıları, uygulanabilir paydalar ve okuyucular arası anlaşma. + +Bu dosyalar geldikten sonra sonuçları hesaplayıp tablo ve şekilleri makaleye ekleyebiliriz. Etiketleyici sayısı, anlaşma veya başarı oranı önceden hedeflenip uydurulmamalı. diff --git a/source/review/Response_to_Major_Revision.md b/source/review/Response_to_Major_Revision.md new file mode 100644 index 0000000000000000000000000000000000000000..acb58065cd70fe3730adec0488ab44c009a848d3 --- /dev/null +++ b/source/review/Response_to_Major_Revision.md @@ -0,0 +1,67 @@ +# Response to the Major Revision report + +Manuscript: *RefSeg-CA: evaluating and repairing command compliance in generalized referring segmentation* + +This revision adds executed coverage, operating-point, and harm analyses, separates the trained comparator, strengthens the portable evidence package, and replaces the presentation-style graphics with restrained monochrome TikZ/PGFPlots figures. The unchanged primary rule was replayed independently with zero difference in archived official-grid IoU. The public deposit is now available at https://huggingface.co/datasets/Ethosoft/RefSeg-CA. Human semantic validation remains open; we do not describe that requirement as completed. + +## 1. Practical significance and coverage + +The abstract, introduction, full-benchmark results, discussion, and conclusion now distinguish conditional effectiveness, pooled effect, and unrestricted-language applicability. The exact identity Delta_all = coverage × Delta_accepted explains why 3.15% coverage limits pooled gains to 0.108 and 0.072 percentage points. Acceptance is explicitly not a certificate of beneficial intervention. + +A four-level, text-only coverage experiment reuses identical cached predictions: 292 short relations, 382 simple relations, 1,557 primary-accepted expressions, and 2,809 legacy-supported expressions. The new table and coverage figure report pooled/conditional gain and helped/harmed/tied counts. Relaxing the primary guard increases CLIPSeg gain from 0.108 to 0.118 points but harms from 364 to 722. Grounded SAM gain decreases from 0.072 to 0.029 points while harms increase from 497 to 936. Thus expanded grammar does not reliably improve practical utility. + +Status: addressed with executed exploratory analysis. The original operating point was retained; no test-set optimum was promoted to the primary method. + +## 2. Parser/scope-guard validation + +We agree that the historical 122 supported expressions and provisional machine-assisted labels cannot establish parser accuracy or recall. The manuscript no longer leaves any ambiguity about this limitation. A new 600-expression stratified annotation package samples 200 accepted, 200 legacy-supported/rejected, and 200 outside-grammar expressions. Two independent forms, a hidden sampling key, expansion weights, labeling rules, an annotator-expertise record, an adjudication procedure, and a fail-closed scorer are supplied. + +The scorer computes pre-adjudication agreement/kappa, then weighted acceptance precision/recall and decomposition correctness only after complete human labels and adjudication are available. Blank forms produce INCOMPLETE. Actual annotator identities/expertise, agreement, accuracy, and adjudicated false-acceptance/rejection examples cannot be reported because no such human observations have been supplied. + +Status: unresolved human-study requirement; protocol and executable scoring are complete. This response does not claim that preparation fulfills the requested completed study. Human forms must be returned, adjudicated, and analyzed before a publication-ready response can mark this point resolved. + +## 3. Novelty relative to modular grounding + +A design-comparison table now contrasts MAttNet, ReLA, InstAlign, and SFAP on training, target/anchor structure, relation decisions, ambiguity fallback, plurality, no-target handling, language-query counts, and weight changes. Language queries are distinguished from transformer object slots. The text continues to acknowledge that decomposition and relational reasoning are established ideas. SFAP's distinction is the inspectable frozen-interface projection, explicit preservation of the original output, and evidence about both benefit and harm. + +Status: addressed. Primary sources are cited in the manuscript; the table is architectural and does not imply a controlled performance comparison across training regimes. + +## 4. Harmful interventions + +An independently implemented trace replay reconstructs every accepted primary output. For CLIPSeg, 339 of 364 harms occur in the plural-union branch, 15 in extreme selection, and 10 in anchor projection. For Grounded SAM the counts are 474, 13, and 10 of 497. Thus 93.1% and 95.4% of harms arise in plural unions. Of harmed outputs, 242/392 started above IoU 0.5, and 64/112 cross below it after repair. Mean conditional losses are 0.120/0.153. Positive-target harms never become empty predictions in this replay. + +The harm figure distinguishes these observable signatures from causes. Component-size perturbations change 77/175 harmed masks; geometry perturbations change 1/0. Such changes do not prove merging or boundary error. A structured six-category failure protocol and 120 deterministic sample forms cover anchor failures, target decomposition, merging, boundaries, plurality, and already-correct originals. + +Status: quantitative harm analysis addressed; human causal attribution remains incomplete. gRefCOCO target masks do not supply independently verified anchor identities or complete semantic decomposition labels, so causal counts are not fabricated. + +## 5. Threshold robustness + +Thirty-two TRUBA array tasks replayed all 1,557 accepted expressions in both frozen interfaces at eleven operating points: anchor and target margins 0.02/0.05/0.10, geometry 0.01/0.03/0.05, minimum-area factors 0.5/1/2, and dense-map thresholds at native ±0.05. Each intervention uses a matched native comparator with the same threshold and component filter. Rejected expressions contribute zero paired delta. + +Mean pooled gains remain positive throughout: 0.1052–0.1114 points for CLIPSeg and 0.0681–0.1021 points for Grounded SAM. The figure includes descriptive image-cluster intervals. We do not claim threshold independence, joint robustness, or corrected significance over a selected grid. Detector box/text thresholds were not varied. These reviewer-requested diagnostics are explicitly labeled exploratory. + +Status: addressed for the named dense-map, anchor, target, and component-filter quantities; joint and detector-threshold robustness are retained as limitations. + +## 6. ReLA comparator + +The rich-suite SFAP table and paired performance figure now contain only native-versus-SFAP contrasts within CLIPSeg and Grounded SAM. Native ReLA results are moved to a separate subsection and table identifying their role as trained-model context. The text states that no ReLA+SFAP treatment effect was estimated and that absolute cross-architecture scores cannot identify the effect of SFAP. + +Status: addressed. + +## 7. Reproducibility + +The package now includes exact portable primary score rows for all 49,492 natural expressions and 28,800 rich records per model, the full natural manifest, both models' per-expression reviewer-replay records, all eleven configurations, job metadata, reconstruction code, hashes, and editable figures. `verify_portable_results.py` rebuilt 30 primary table rows and 22 sensitivity settings without cluster access; the maximum primary metric discrepancy was 2.22e-16. + +The public repository is https://huggingface.co/datasets/Ethosoft/RefSeg-CA, with immutable data tag r3-data-v1. It includes the full procedural images/masks, source code, editable figures, manuscript, exact metrics, and reconstruction metadata. A fresh unauthenticated download reproduced all 30 primary rows and 22 sensitivity settings to within 3.33e-15. Natural-image pixels, original natural-expression text, and checkpoints remain with their upstream sources. Large raw score-map caches remain separate. No DOI has yet been assigned. + +Status: portable evidence, public repository access, and independent download/reconstruction addressed. Source files are additionally browsable under the repository source/ tree. A DOI is not claimed. + +## Minor comments and visual revision + +- The abstract is shortened and organized around method, coverage, quantitative findings, and unresolved applicability. +- SFAP is identified as the proposed method early; CACP is explicitly historical and ablation-only. +- Captions state interpretations and limits, including overlapping harm signatures and the matched comparator used in sensitivity analysis. +- Limitations are connected to concrete future experiments: human semantic adjudication, instance/anchor annotations, joint-threshold perturbations, photorealistic paired scenes, and multiple trained checkpoints. +- Figure 1 is rebuilt as a compact mathematical diagram with sparse symbols and a geometric eligibility illustration. Written schematics and data plots use black/gray, serif type, thin rules, and distinct line/marker forms. Actual experimental raster scenes retain their colors. + +The revision is technically and visually stronger and the public deposit is complete. Independent human observations remain outstanding and cannot be replaced by automated labels. diff --git a/source/slurm/analyze_all_r2.sbatch b/source/slurm/analyze_all_r2.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..40e839981257ec2637438de7315d4fcfc373c6d8 --- /dev/null +++ b/source/slurm/analyze_all_r2.sbatch @@ -0,0 +1,15 @@ +#!/bin/bash +#SBATCH --job-name=r2-analyze-all +#SBATCH --partition=debug +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=16 +#SBATCH --mem=64G +#SBATCH --time=01:30:00 +#SBATCH --output=logs/analyze-all-%j.out +#SBATCH --error=logs/analyze-all-%j.err +set -euo pipefail +export OMP_NUM_THREADS=8 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=8 +export PYTHONPATH="/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor${PYTHONPATH:+:$PYTHONPATH}" +python3 -u code/analyze_r2.py --part natural +python3 -u code/analyze_r2.py --part rich diff --git a/source/slurm/build_public_data.sbatch b/source/slurm/build_public_data.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..498c100516b2aa1a0cce70dd6dc2fe2d2c43d93f --- /dev/null +++ b/source/slurm/build_public_data.sbatch @@ -0,0 +1,13 @@ +#!/bin/bash +#SBATCH --job-name=refseg-public-data +#SBATCH --partition=debug +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=4 +#SBATCH --mem=8G +#SBATCH --time=00:25:00 +#SBATCH --output=logs/public-data-%j.out +#SBATCH --error=logs/public-data-%j.err +set -euo pipefail +export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 +python3 -u code/build_hf_release.py diff --git a/source/slurm/full_clipseg.sbatch b/source/slurm/full_clipseg.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..20aa2b8ecdfcd538c070f876f541db248015d618 --- /dev/null +++ b/source/slurm/full_clipseg.sbatch @@ -0,0 +1,18 @@ +#!/bin/bash +#SBATCH --job-name=r2-full-clipseg +#SBATCH --partition=debug +#SBATCH --array=0-3%4 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=8 +#SBATCH --mem=32G +#SBATCH --gres=gpu:1 +#SBATCH --time=03:30:00 +#SBATCH --dependency=afterok:6332001 +#SBATCH --output=logs/full-clipseg-%A_%a.out +#SBATCH --error=logs/full-clipseg-%A_%a.err +set -euo pipefail +export OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=4 TOKENIZERS_PARALLELISM=false +export PYTHONPATH="/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor${PYTHONPATH:+:$PYTHONPATH}" +python3 -u code/infer_r2.py --model clipseg --shard "$SLURM_ARRAY_TASK_ID" --shards 4 + diff --git a/source/slurm/full_groundedsam.sbatch b/source/slurm/full_groundedsam.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..aa5d89fbf7a9dd2d62bbffd9c0349ba563249d44 --- /dev/null +++ b/source/slurm/full_groundedsam.sbatch @@ -0,0 +1,18 @@ +#!/bin/bash +#SBATCH --job-name=r2-full-groundedsam +#SBATCH --partition=debug +#SBATCH --array=0-15%16 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=8 +#SBATCH --mem=32G +#SBATCH --gres=gpu:1 +#SBATCH --time=03:30:00 +#SBATCH --dependency=afterok:6332001 +#SBATCH --output=logs/full-groundedsam-%A_%a.out +#SBATCH --error=logs/full-groundedsam-%A_%a.err +set -euo pipefail +export OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=4 TOKENIZERS_PARALLELISM=false +export PYTHONPATH="/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor${PYTHONPATH:+:$PYTHONPATH}" +python3 -u code/infer_r2.py --model groundedsam --shard "$SLURM_ARRAY_TASK_ID" --shards 16 + diff --git a/source/slurm/natural_full_rela.sbatch b/source/slurm/natural_full_rela.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..3568dde3328089b56914050a96c8f1de1708c06e --- /dev/null +++ b/source/slurm/natural_full_rela.sbatch @@ -0,0 +1,17 @@ +#!/bin/bash +#SBATCH --job-name=r2-natural_full-rela +#SBATCH --partition=debug +#SBATCH --array=0-31%32 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=8 +#SBATCH --mem=24G +#SBATCH --time=03:30:00 +#SBATCH --dependency=afterok:6332619 +#SBATCH --output=logs/natural_full-rela-%A_%a.out +#SBATCH --error=logs/natural_full-rela-%A_%a.err +set -euo pipefail +export OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=4 TOKENIZERS_PARALLELISM=false +export PYTHONPATH="$PWD/vendor:/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor${PYTHONPATH:+:$PYTHONPATH}" +python3 -u code/infer_r2.py --manifest natural_full --model rela --frozen-only --device cpu --shard "$SLURM_ARRAY_TASK_ID" --shards 32 + diff --git a/source/slurm/r3_replay.sbatch b/source/slurm/r3_replay.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..2e10fbda2f277a3d66825c099111ca7d110e2d9c --- /dev/null +++ b/source/slurm/r3_replay.sbatch @@ -0,0 +1,18 @@ +#!/bin/bash +#SBATCH --job-name=r3-replay +#SBATCH --partition=debug +#SBATCH --array=0-31%32 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=4 +#SBATCH --mem=16G +#SBATCH --time=03:30:00 +#SBATCH --output=logs/r3-replay-%A_%a.out +#SBATCH --error=logs/r3-replay-%A_%a.err +set -euo pipefail +export OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 +export PYTHONPATH="$PWD/vendor:/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor" +idx=$SLURM_ARRAY_TASK_ID +model=clipseg +if (( idx >= 16 )); then model=groundedsam; idx=$((idx-16)); fi +python3 -u code/r3_replay.py --model "$model" --shard "$idx" --shards 16 diff --git a/source/slurm/r3_summary.sbatch b/source/slurm/r3_summary.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..24c9b74462d613025acaa4e2517f333f192c5125 --- /dev/null +++ b/source/slurm/r3_summary.sbatch @@ -0,0 +1,16 @@ +#!/bin/bash +#SBATCH --job-name=r3-summary +#SBATCH --partition=debug +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=4 +#SBATCH --mem=20G +#SBATCH --time=00:30:00 +#SBATCH --dependency=afterok:6334005 +#SBATCH --output=logs/r3-summary-%j.out +#SBATCH --error=logs/r3-summary-%j.err +set -euo pipefail +export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 +export PYTHONPATH="$PWD/vendor:/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor" +python3 -u code/r3_summarize.py + diff --git a/source/slurm/rich_clipseg.sbatch b/source/slurm/rich_clipseg.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..fa8616aab2da84d12d2608b08496d3a9aa0c55c1 --- /dev/null +++ b/source/slurm/rich_clipseg.sbatch @@ -0,0 +1,17 @@ +#!/bin/bash +#SBATCH --job-name=r2-rich-clipseg +#SBATCH --partition=debug +#SBATCH --array=0-3%4 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=8 +#SBATCH --mem=32G +#SBATCH --gres=gpu:1 +#SBATCH --time=03:00:00 +#SBATCH --output=logs/rich-clipseg-%A_%a.out +#SBATCH --error=logs/rich-clipseg-%A_%a.err +set -euo pipefail +export OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=4 TOKENIZERS_PARALLELISM=false +export PYTHONPATH="/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor${PYTHONPATH:+:$PYTHONPATH}" +python3 -u code/infer_r2.py --manifest rich_synthetic --model clipseg --shard "$SLURM_ARRAY_TASK_ID" --shards 4 + diff --git a/source/slurm/rich_groundedsam.sbatch b/source/slurm/rich_groundedsam.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..9dfcd59686c7b965395f1f19d2c51b560daea56a --- /dev/null +++ b/source/slurm/rich_groundedsam.sbatch @@ -0,0 +1,17 @@ +#!/bin/bash +#SBATCH --job-name=r2-rich-groundedsam +#SBATCH --partition=debug +#SBATCH --array=0-11%12 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=8 +#SBATCH --mem=32G +#SBATCH --gres=gpu:1 +#SBATCH --time=03:00:00 +#SBATCH --output=logs/rich-groundedsam-%A_%a.out +#SBATCH --error=logs/rich-groundedsam-%A_%a.err +set -euo pipefail +export OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=4 TOKENIZERS_PARALLELISM=false +export PYTHONPATH="/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor${PYTHONPATH:+:$PYTHONPATH}" +python3 -u code/infer_r2.py --manifest rich_synthetic --model groundedsam --shard "$SLURM_ARRAY_TASK_ID" --shards 12 + diff --git a/source/slurm/rich_synthetic_rela.sbatch b/source/slurm/rich_synthetic_rela.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..b46f5deb0d306875701e8d8c34b59e4cffdfe865 --- /dev/null +++ b/source/slurm/rich_synthetic_rela.sbatch @@ -0,0 +1,17 @@ +#!/bin/bash +#SBATCH --job-name=r2-rich_synthetic-rela +#SBATCH --partition=debug +#SBATCH --array=0-15%16 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=8 +#SBATCH --mem=24G +#SBATCH --time=03:30:00 +#SBATCH --dependency=afterok:6332619 +#SBATCH --output=logs/rich_synthetic-rela-%A_%a.out +#SBATCH --error=logs/rich_synthetic-rela-%A_%a.err +set -euo pipefail +export OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=4 TOKENIZERS_PARALLELISM=false +export PYTHONPATH="$PWD/vendor:/arf/scratch/egitimg16u1/mcp-workspace/refseg_scale_20260906/vendor${PYTHONPATH:+:$PYTHONPATH}" +python3 -u code/infer_r2.py --manifest rich_synthetic --model rela --frozen-only --device cpu --shard "$SLURM_ARRAY_TASK_ID" --shards 16 +