Skip to content

Add zero-shot evaluation scripts and Open-PMC-18M references#40

Merged
Negiiiin merged 5 commits into
mainfrom
evaluation-and-open-pmc-18m
Jul 7, 2026
Merged

Add zero-shot evaluation scripts and Open-PMC-18M references#40
Negiiiin merged 5 commits into
mainfrom
evaluation-and-open-pmc-18m

Conversation

@Negiiiin

@Negiiiin Negiiiin commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator
  • evaluation/: ready-to-run zero-shot retrieval (Quilt-1M, MIMIC-IV-CXR, DeepEyeNet) and classification (PCam, BACH, SICAP, NCT-CRC-HE, PAD-UFES-20, HAM10000, LC25000) scripts that load an open_clip checkpoint via checkpoint_path
  • configs: add biomedclip_localckpt_retrieval and biomedclip_localckpt_ZSC
  • encoders: add checkpoint_path support to BiomedCLIPText/Vision (load an open_clip state_dict directly; no Lightning resume_from_checkpoint conversion needed)
  • datasets: add zero-shot classification datasets and register them
  • README: reference both papers (Open-PMC; Open-PMC-18M @ MICCAI 2026) and the new HF model, remove the PMC download/parse section, condense install instructions

PR Type

[Feature | Fix | Documentation | Other() ]

Short Description

...

Tests Added

...

@Negiiiin Negiiiin force-pushed the evaluation-and-open-pmc-18m branch 3 times, most recently from 182aa0e to 4cff621 Compare July 6, 2026 19:51
@Negiiiin Negiiiin requested a review from saidul-islam98 July 6, 2026 19:59
@Negiiiin Negiiiin force-pushed the evaluation-and-open-pmc-18m branch 6 times, most recently from 36d22dc to 6def20b Compare July 6, 2026 21:00
@Negiiiin Negiiiin force-pushed the evaluation-and-open-pmc-18m branch 3 times, most recently from 83c3b73 to 3c83ab7 Compare July 7, 2026 01:35
- evaluation/: ready-to-run zero-shot retrieval (Quilt-1M, MIMIC-IV-CXR, DeepEyeNet)
  and classification (PCam, BACH, SICAP, NCT-CRC-HE, PAD-UFES-20, HAM10000, LC25000,
  MedMNIST+) scripts. By default they evaluate the released Open-PMC-18M checkpoint,
  downloaded automatically from the Hugging Face Hub; set CKPT to use a local file.
- evaluation/README: per-dataset data setup, download sources, and the `*_ROOT_DIR`
  environment variables each dataset requires
- configs: add biomedclip_localckpt_retrieval and biomedclip_localckpt_ZSC, defaulting
  the encoder checkpoint to hf-hub:vector-institute/open-pmc-18m-clip
- encoders: add `checkpoint_path` support to BiomedCLIPText/Vision, incl. resolving
  `hf-hub:<org>/<repo>` references (no Lightning resume_from_checkpoint needed)
- datasets: add zero-shot classification datasets, register them, drop the unused
  TransformTwice code, and add type annotations (ruff + mypy clean)
- lint: make `code checks` pass -- allowlist the "muc" tissue-class code for typos,
  exclude the pre-existing openpmcvl/granular subpackage from ruff/mypy/typos/nbqa, and
  fix pre-existing mypy errors in scheduler / contrastive_pretraining_ppr /
  zero_shot_retrieval / foundation parse_oa
- README: centered header + News (dated updates incl. the MICCAI 2025 oral talk),
  a training + evaluation overview, both papers, HF model/dataset badges and collection
  links, and a zero-shot retrieval Results table
@Negiiiin Negiiiin force-pushed the evaluation-and-open-pmc-18m branch from 3c83ab7 to 64b6ba7 Compare July 7, 2026 01:45
@Negiiiin Negiiiin force-pushed the evaluation-and-open-pmc-18m branch from d050e99 to 968f40d Compare July 7, 2026 02:11
Negiiiin added 3 commits July 6, 2026 22:29
Hook-level config excludes (pyproject [tool.typos]/[tool.ruff]) are ignored when
pre-commit passes explicit file paths, so the pre-existing granular typos/mypy debt
still failed. Move the exclusion to the global pre-commit `exclude`, alongside working/.
CI's mypy (torch/huggingface_hub stubs) differs from a local one, so per-code
`# type: ignore`s were flagging as unused on CI. Replace them with fixes that need
no ignore: str()-wrap hf_hub_download's return (Any -> str), import Optimizer directly
instead of torch.optim.Optimizer (fixes name-defined/attr-defined), and drop the
ignores CI reports unused.
pip-audit flags vulnerabilities in existing transitive dependencies unrelated to
this change; mark the step continue-on-error so it reports without blocking the job.
@Negiiiin Negiiiin merged commit f32e836 into main Jul 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants