https://github.com/arturia-pendragon-iris/frepa

https://github.com/arturia-pendragon-iris/frepa

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: sciencedirect.com, nature.com, ieee.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: Arturia-Pendragon-Iris
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 6.02 MB
Statistics
  • Stars: 9
  • Watchers: 1
  • Forks: 3
  • Open Issues: 1
  • Releases: 0
Created about 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

Frepa

This is the official repository for the paper "Improving Representation of High-frequency Components for Medical Foundation Models" by Yuetan Chu, Yilan Zhang, Zhongyi Han, Changchun Yang, Longxi Zhou, Gongning Luo, Chao Huang, Xin Gao. You can access the whole paper through the link.

Introduction

Frepa is proposed to address the limitations of previous medical foundation models in representing fine-grained information and high-frequency components. Frepa demonstrates that even when using a vanilla Vision Transformer (ViT), foundation models can learn more fine-grained representations through a frequency dual-component masking strategy. Additionally, the equal-histogram image-domain masking extends the Masked Autoencoder (MAE) beyond ViT to other architectures, such as scale-feature networks (e.g., Swin Transformer) and convolutional networks, without requiring modifications to the pretraining pipeline.

Frepa achieves substantial success in various tasks, including vessel segmentation, small lung nodule detection, and image restoration, which were previously considered highly challenging or even inapplicable for foundation models.

  • We introduce Frepa, a novel approach that significantly enhances the high-frequency capturing capability of foundation models without compromising their low-frequency representation.

  • We extend the MAE beyond vanilla ViT to improve its generalizability, as well as enable pretrained 2D encoders directly deployed on volume data.

  • We develop Frepa on 17 million images and validated it on 32 downstream tasks for both 2D and 3D data, without requiring fine-tuning.

  • Extensive experiments demonstrate that Frepa outperforms SOTA methods on most downstream tasks, particularly those involving fine-grained information. Frepa also exhibits exceptional performance on previously unseen modalities.

image

Pretrained models

| Model | Pretrained checkpoints | Parameters| | -----------| -----------------------|-----------| | ViT-B | download |86.9M | | Swin Transformer-B |download |86.9M | | ConvNeXt |download |87.5M |

Extra experiments on image restoration

Besides all the experiments presented in the paper, we also implement experiments about the pretrained model for image restoration. The results are as follows.

| | | MAE | MFM | CLIP | SAM | Frepa+ViT | Frepa+SwinT | |----------------|---------|------------------|------------------|------------------|------------------|------------------|------------------| | CT denoise | PSNR | 30.412±2.501 | 28.152±2.752 | 14.102±1.478 | 21.230±3.093 | 31.625±2.539 | 32.700±1.722 | | | SSIM | 0.801±0.153 | 0.907±0.024 | 0.370±0.158 | 0.787±0.154 | 0.936±0.032 | 0.954±0.015 | | | RMSE | 0.077±0.071 | 0.109±0.126 | 0.485±0.144 | 0.207±0.169 | 0.058±0.064 | 0.055±0.039 | | CT SR*2 | PSNR | 30.232±2.704 | 28.065±2.265 | 13.073±2.013 | 21.723±2.469 | 32.800±2.674 | 32.720±2.646 | | | SSIM | 0.877±0.0454 | 0.867±0.047 | 0.488±0.157 | 0.807±0.077 | 0.908±0.092 | 0.915±0.031 | | | RMSE | 0.073±0.036 | 0.091±0.041 | 0.558±0.146 | 0.192±0.062 | 0.062±0.034 | 0.061±0.032 |

Datasets

This is the summary of the datasets we employed for model pretraining, and their distribution of involved modalities. Public datasets involved in the pretraining are listed as follows:

| Modality | Datasets | | ----------- | ----------| | CT | DeepLesion; Colorectal-Liver-Metastases; RSNA Intracranial Hemorrhage; CQ500; TCIA HCC-TACE | | MRI | UCSF-PDGM; BraTS2021; Duke-Breast-Cancer-MRI; ACRIN; Colorectal-Liver-Metastases | |X-ray |CheXpert; MIMIC-CXR; NIH Chest; CRASS12; COVID-19 Radiography Database; COVIDGR| |Ultrasound|BrEaST; FETAL PLANES; Ultrasound Nerve Segmentation; TN3K; EBUS; Micro-Ultrasound Prostate| |OCT |OCT2017; OCT classification; OCTDL; CVI-OCT; IVOCT| |Retina |ODIR-5K; AREDS; Diabetic Retinopathy Detection | |Dermoscopy|ISIC|

Visualization

Example results of reconstructed images on external datasets. The images are corrupted by random masking and low-frequency filtering, respectively. Notably, such low-frequency filtered images are not seen during the training phases of Frepa. We visualize both the images and their frequency spectrum. RMAE is shown in the upper left corner of each image. Zoom in to an appropriate size for better viewing of the images.

Acknowledge

We acknowledge the released code of MedSAM and MAE for code references. If you have any problem, please get in touch with Yuetan Chu (yuetan.chu@kaust.edu.sa) or Yilan Zhang(yilan.zhang@kaust.edu.sa) for more information.

Cite

If you find our paper or code helpful, we would like you to cite our paper as follows. @ARTICLE{10960415, author={Chu, Yuetan and Zhang, Yilan and Han, Zhongyi and Yang, Changchun and Zhou, Longxi and Luo, Gongning and Huang, Chao and Gao, Xin}, journal={IEEE Transactions on Medical Imaging}, title={Improving Representation of High-frequency Components for Medical Visual Foundation Models}, year={2025}, volume={}, number={}, pages={1-1}, keywords={Foundation models;Computational modeling;Image segmentation;Autoencoders;Image reconstruction;Training;Accuracy;Three-dimensional displays;Artificial intelligence;Diseases;Artificial intelligence;foundation model;autoencoder;segmentation;classification;detection}, doi={10.1109/TMI.2025.3559402}}

Owner

  • Name: Yuetan Chu
  • Login: Arturia-Pendragon-Iris
  • Kind: user
  • Location: Thwual; Jeddah; Saudi Arabria
  • Company: King Abdullah University of Science and Technology

GitHub Events

Total
  • Issues event: 2
  • Watch event: 5
  • Issue comment event: 1
  • Push event: 9
  • Fork event: 1
Last Year
  • Issues event: 2
  • Watch event: 5
  • Issue comment event: 1
  • Push event: 9
  • Fork event: 1

Dependencies

environment.yml conda
  • _libgcc_mutex 0.1
  • _openmp_mutex 5.1
  • anyio 4.2.0
  • argon2-cffi 21.3.0
  • argon2-cffi-bindings 21.2.0
  • asttokens 2.0.5
  • async-lru 2.0.4
  • attrs 23.1.0
  • babel 2.11.0
  • backcall 0.2.0
  • beautifulsoup4 4.12.2
  • blas 1.0
  • bleach 4.1.0
  • bottleneck 1.3.7
  • brotli 1.0.9
  • brotli-bin 1.0.9
  • brotli-python 1.0.9
  • bzip2 1.0.8
  • ca-certificates 2024.3.11
  • certifi 2024.6.2
  • cffi 1.16.0
  • charset-normalizer 2.0.4
  • comm 0.2.1
  • contourpy 1.0.5
  • cuda-cudart 12.1.105
  • cuda-cupti 12.1.105
  • cuda-libraries 12.1.0
  • cuda-nvrtc 12.1.105
  • cuda-nvtx 12.1.105
  • cuda-opencl 12.5.39
  • cuda-runtime 12.1.0
  • cuda-version 12.5
  • cycler 0.11.0
  • cyrus-sasl 2.1.28
  • dbus 1.13.18
  • debugpy 1.6.7
  • decorator 5.1.1
  • defusedxml 0.7.1
  • exceptiongroup 1.2.0
  • executing 0.8.3
  • expat 2.6.2
  • ffmpeg 4.3
  • filelock 3.13.1
  • fontconfig 2.14.1
  • fonttools 4.51.0
  • freetype 2.12.1
  • glib 2.78.4
  • glib-tools 2.78.4
  • gmp 6.2.1
  • gmpy2 2.1.2
  • gnutls 3.6.15
  • gst-plugins-base 1.14.1
  • gstreamer 1.14.1
  • icu 73.1
  • importlib-metadata 7.0.1
  • importlib_metadata 7.0.1
  • importlib_resources 6.1.1
  • intel-openmp 2023.1.0
  • ipykernel 6.28.0
  • ipython 8.12.2
  • ipywidgets 8.1.2
  • jedi 0.18.1
  • jinja2 3.1.4
  • jpeg 9e
  • json5 0.9.6
  • jsonschema 4.19.2
  • jsonschema-specifications 2023.7.1
  • jupyter 1.0.0
  • jupyter-lsp 2.2.0
  • jupyter_client 8.6.0
  • jupyter_console 6.6.3
  • jupyter_core 5.5.0
  • jupyter_events 0.8.0
  • jupyter_server 2.10.0
  • jupyter_server_terminals 0.4.4
  • jupyterlab 4.0.11
  • jupyterlab_pygments 0.1.2
  • jupyterlab_server 2.25.1
  • jupyterlab_widgets 3.0.10
  • kiwisolver 1.4.4
  • krb5 1.20.1
  • lame 3.100
  • lcms2 2.12
  • ld_impl_linux-64 2.38
  • lerc 3.0
  • libbrotlicommon 1.0.9
  • libbrotlidec 1.0.9
  • libbrotlienc 1.0.9
  • libclang 14.0.6
  • libclang13 14.0.6
  • libcublas 12.1.0.26
  • libcufft 11.0.2.4
  • libcufile 1.10.0.4
  • libcups 2.4.2
  • libcurand 10.3.6.39
  • libcusolver 11.4.4.55
  • libcusparse 12.0.2.55
  • libdeflate 1.17
  • libedit 3.1.20230828
  • libffi 3.4.4
  • libgcc-ng 11.2.0
  • libglib 2.78.4
  • libgomp 11.2.0
  • libiconv 1.16
  • libidn2 2.3.4
  • libjpeg-turbo 2.0.0
  • libllvm14 14.0.6
  • libnpp 12.0.2.50
  • libnvjitlink 12.1.105
  • libnvjpeg 12.1.1.14
  • libpng 1.6.39
  • libpq 12.17
  • libsodium 1.0.18
  • libstdcxx-ng 11.2.0
  • libtasn1 4.19.0
  • libtiff 4.5.1
  • libunistring 0.9.10
  • libuuid 1.41.5
  • libwebp-base 1.3.2
  • libxcb 1.15
  • libxkbcommon 1.0.1
  • libxml2 2.10.4
  • llvm-openmp 14.0.6
  • lz4-c 1.9.4
  • markupsafe 2.1.3
  • matplotlib 3.7.2
  • matplotlib-base 3.7.2
  • matplotlib-inline 0.1.6
  • mistune 2.0.4
  • mkl 2023.1.0
  • mkl-service 2.4.0
  • mkl_fft 1.3.8
  • mkl_random 1.2.4
  • mpc 1.1.0
  • mpfr 4.0.2
  • mpmath 1.3.0
  • mysql 5.7.24
  • nbclient 0.8.0
  • nbconvert 7.10.0
  • nbformat 5.9.2
  • ncurses 6.4
  • nest-asyncio 1.6.0
  • nettle 3.7.3
  • networkx 3.1
  • notebook 7.0.8
  • notebook-shim 0.2.3
  • numexpr 2.8.4
  • numpy 1.24.3
  • numpy-base 1.24.3
  • openh264 2.1.1
  • openjpeg 2.4.0
  • openssl 3.0.13
  • overrides 7.4.0
  • packaging 23.2
  • pandas 2.0.3
  • pandocfilters 1.5.0
  • parso 0.8.3
  • pcre2 10.42
  • pexpect 4.8.0
  • pickleshare 0.7.5
  • pillow 10.3.0
  • pip 24.0
  • pkgutil-resolve-name 1.3.10
  • platformdirs 3.10.0
  • ply 3.11
  • prometheus_client 0.14.1
  • prompt-toolkit 3.0.43
  • prompt_toolkit 3.0.43
  • psutil 5.9.0
  • ptyprocess 0.7.0
  • pure_eval 0.2.2
  • pycparser 2.21
  • pygments 2.15.1
  • pyparsing 3.0.9
  • pyqt 5.15.10
  • pyqt5-sip 12.13.0
  • pysocks 1.7.1
  • python 3.8.19
  • python-dateutil 2.9.0post0
  • python-fastjsonschema 2.16.2
  • python-json-logger 2.0.7
  • python-tzdata 2023.3
  • pytorch 2.3.1
  • pytorch-cuda 12.1
  • pytorch-mutex 1.0
  • pytz 2024.1
  • pyyaml 6.0.1
  • pyzmq 25.1.2
  • qt-main 5.15.2
  • qtconsole 5.5.1
  • qtpy 2.4.1
  • readline 8.2
  • referencing 0.30.2
  • requests 2.32.2
  • rfc3339-validator 0.1.4
  • rfc3986-validator 0.1.1
  • rpds-py 0.10.6
  • send2trash 1.8.2
  • setuptools 69.5.1
  • sip 6.7.12
  • six 1.16.0
  • soupsieve 2.5
  • sqlite 3.45.3
  • stack_data 0.2.0
  • sympy 1.12
  • tbb 2021.8.0
  • terminado 0.17.1
  • tinycss2 1.2.1
  • tk 8.6.14
  • tomli 2.0.1
  • torchaudio 2.3.1
  • torchtriton 2.3.1
  • torchvision 0.18.1
  • tornado 6.3.3
  • traitlets 5.7.1
  • typing-extensions 4.11.0
  • typing_extensions 4.11.0
  • unicodedata2 15.1.0
  • urllib3 2.2.1
  • wcwidth 0.2.5
  • webencodings 0.5.1
  • websocket-client 1.8.0
  • wheel 0.43.0
  • widgetsnbextension 4.0.10
  • xz 5.4.6
  • yaml 0.2.5
  • zeromq 4.3.5
  • zipp 3.17.0
  • zlib 1.2.13
  • zstd 1.5.5