How yale-bids-chen-lab/medpmc works
MedPMC’s sampled runtime tree and README describe a five-stage curation workflow: permissively licensed PMC article figure text is screened, figures are downloaded and classified as single- or multi-panel, panels are separated and ordered, captions are aligned to panels, and medical-content classification produces filtered manifests. The graph focuses on this executable curation pipeline; README also describes training, evaluation, and released resources, but those source trees are not present in the supplied file tree. Stage-level wiring follows the README where source excerpts were not sampled.
Main entry points: medpmc_initial_screening/pipeline.py Screen workflow · medpmc_multi_panel_figure_detection/pipeline.py Detection workflow · alignment.py Caption alignment · storage.py Screened records
Components 24
Initial screening
- Screen CLI
data_curation/01_initial_screening/src/medpmc_initial_screening/cli.py - Screen workflow
data_curation/01_initial_screening/src/medpmc_initial_screening/pipeline.py - Article download
data_curation/01_initial_screening/src/medpmc_initial_screening/download.py - Figure-text extraction
data_curation/01_initial_screening/src/medpmc_initial_screening/extract.py - Caption screening
data_curation/01_initial_screening/src/medpmc_initial_screening/screen.py - Screened records
data_curation/01_initial_screening/src/medpmc_initial_screening/storage.py
Figure detection
- Detection CLI
data_curation/02_multi_panel_figure_detection/src/medpmc_multi_panel_figure_detection/cli.py - Detection workflow
data_curation/02_multi_panel_figure_detection/src/medpmc_multi_panel_figure_detection/pipeline.py - Image preparation
data_curation/02_multi_panel_figure_detection/src/medpmc_multi_panel_figure_detection/manifest.py - Panel detector
data_curation/02_multi_panel_figure_detection/src/medpmc_multi_panel_figure_detection/model.py - Detection records
data_curation/02_multi_panel_figure_detection/src/medpmc_multi_panel_figure_detection/storage.py
Panel separation
- Separation CLI
data_curation/03_multi_panel_figure_separation/src/medpmc_multi_panel_figure_separation/cli.py - Panel separation
data_curation/03_multi_panel_figure_separation/src/medpmc_multi_panel_figure_separation/separation.py - Ordered panel records
data_curation/03_multi_panel_figure_separation/src/medpmc_multi_panel_figure_separation/storage.py
Caption alignment
- Alignment CLI
data_curation/04_caption_separation_and_alignment/src/medpmc_caption_separation_and_alignment/cli.py - Caption alignment
data_curation/04_caption_separation_and_alignment/src/medpmc_caption_separation_and_alignment/alignment.py - Vision-language backend
data_curation/04_caption_separation_and_alignment/src/medpmc_caption_separation_and_alignment/backends/lmdeploy_backend.py - Aligned records
data_curation/04_caption_separation_and_alignment/src/medpmc_caption_separation_and_alignment/storage.py
Medical classification
- Classification CLI
data_curation/05_medical_figure_classification/src/medpmc_medical_figure_classification/cli.py - Medical classifier
data_curation/05_medical_figure_classification/src/medpmc_medical_figure_classification/classification.py - Medical manifests
data_curation/05_medical_figure_classification/src/medpmc_medical_figure_classification/storage.py
Other components
- Curator
- PMC articles
- AWS image store
Connections 24
- Curator → Screen CLI: runs
- PMC articles → Article download: supplies articles
- Screen CLI → Screen workflow: invokes
- Screen workflow → Article download: downloads
- Screen workflow → Figure-text extraction: extracts text
- Screen workflow → Caption screening: screens captions
- Figure-text extraction → Screened records: writes records
- Caption screening → Screened records: writes results
- Screened records → Detection CLI: feeds stage one
- Detection CLI → Detection workflow: invokes
- Detection workflow → Image preparation: prepares images
- Image preparation → AWS image store: fetches images
- Detection workflow → Panel detector: classifies figures
- Panel detector → Detection records: writes detections
- Detection records → Separation CLI: feeds stage two
- Separation CLI → Panel separation: runs separation
- Panel separation → Ordered panel records: writes ordered crops
- Ordered panel records → Alignment CLI: feeds stage three
- Alignment CLI → Caption alignment: runs alignment
- Caption alignment → Vision-language backend: requests inference
- Caption alignment → Aligned records: writes aligned captions
- Aligned records → Classification CLI: feeds stage four
- Classification CLI → Medical classifier: runs classification
- Medical classifier → Medical manifests: writes filtered results