Sovereign 8s.is mirror of standardgalactic/patch-clip
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
amansoor-healthineers abc0aedacd
Add files via upload
2026-04-17 12:07:43 -04:00
Patch_CLIP Add files via upload 2026-04-17 12:07:43 -04:00
AUTHORS.md Add files via upload 2026-04-17 12:00:30 -04:00
CODE_OF_CONDUCT.md Add files via upload 2026-04-17 12:00:30 -04:00
CONTRIBUTING.md Add files via upload 2026-04-17 12:00:30 -04:00
LICENSE Update LICENSE 2026-04-17 11:59:09 -04:00
MAINTAINERS 2.md Add files via upload 2026-04-17 12:00:30 -04:00
Patch_CLIP.zip Add files via upload 2026-04-17 12:06:21 -04:00
README.md Update README.md 2026-04-17 11:59:40 -04:00
SECURITY 1.md Add files via upload 2026-04-17 12:00:30 -04:00
SETUP.md Add files via upload 2026-04-17 12:00:30 -04:00

Patch-CLIP

🏥 Overview

Patch-CLIP is based on CLIP open source implementation. It introduces additional loss correlating patch token embeddings to text, similar to the global image-text contrastive loss.

To finetune

torchrun --nnodes=1 --nproc_per_node=1 finetune.py
--epochs 10
--batch_size 64
--optimizer "sgd"
--lr 0.00001
--context_length 77
--save_interval 100 --log_interval 10
--train_datapath ""
--train_csvpath ""
--val_datapath ""
--val_csvpath ""
--test_datapath ""
--test_csvpath ""
--checkpoint ""
--arch 'vitl14'
--summary_file ""
--model_name
--concept "Pleural Effusion"

To evaluate

torchrun --nnodes=1 --nproc_per_node=1 finetune.py
--epochs 10
--batch_size 64
--evaluate
--optimizer "sgd"
--lr 0.00001
--context_length 77
--save_interval 100 --log_interval 10
--train_datapath ""
--train_csvpath ""
--val_datapath ""
--val_csvpath ""
--test_datapath ""
--test_csvpath ""
--checkpoint ""
--arch 'vitl14'
--summary_file ""
--model_name
--concept "Pleural Effusion"

Prerequisites

  • Install packages in the requirements.txt

Getting Help

License

This software is licensed under the GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007 license.

Acknowledgments

We thank the authors of CheXZero https://github.com/rajpurkarlab/CheXzero/tree/main Tiu, E., Talius, E., Patel, P. et al. Expert-level detection of pathologies from unannotated chest X-ray images via self-supervised learning. Nat. Biomed. Eng (2022). https://doi.org/10.1038/s41551-022-00936-9

Ready to get started? Run the installation script and visit the setup wizard to configure your installation!