{"id":27086983,"url":"https://github.com/icon-lab/transms","last_synced_at":"2025-04-06T05:49:06.154Z","repository":{"id":54001602,"uuid":"511500115","full_name":"icon-lab/TranSMS","owner":"icon-lab","description":"Official Implementation of Transformers for System Matrix Super-resolution (TranSMS)","archived":false,"fork":false,"pushed_at":"2023-04-11T21:08:39.000Z","size":105,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-13T22:11:12.693Z","etag":null,"topics":["deep-learning","image-processing","medical-imaging","super-resolution","transformers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icon-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-07T11:27:50.000Z","updated_at":"2023-12-13T22:11:12.694Z","dependencies_parsed_at":"2022-08-13T05:51:08.180Z","dependency_job_id":null,"html_url":"https://github.com/icon-lab/TranSMS","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-lab%2FTranSMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-lab%2FTranSMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-lab%2FTranSMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icon-lab%2FTranSMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icon-lab","download_url":"https://codeload.github.com/icon-lab/TranSMS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441007,"owners_count":20939236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","image-processing","medical-imaging","super-resolution","transformers"],"created_at":"2025-04-06T05:49:05.656Z","updated_at":"2025-04-06T05:49:06.144Z","avatar_url":"https://github.com/icon-lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TranSMS\r\nOfficial Implementation of Transformers for System Matrix Super-resolution (TranSMS)\r\n\r\nA. Güngör, B. Askin, D. A. Soydan, E. U. Saritas, C. B. Top and T. Çukur, \"TranSMS: Transformers for Super-Resolution Calibration in Magnetic Particle Imaging,\" in IEEE Transactions on Medical Imaging, 2022, doi: 10.1109/TMI.2022.3189693.\r\n\r\n# Demo\r\nYou can use the following links to download training, validation, test datasets. \r\n\r\n# Dataset\r\nhttps://drive.google.com/drive/folders/1MvLouN4Jl1gg-Uj3PMYrq2sIw-bw_HeF?usp=sharing\r\n\r\n# Pretrained Networks:\r\nhttps://drive.google.com/drive/folders/1LkElq3pQS_G_mu56lCwFgvwFysknrNXU?usp=share_link\r\n\r\n# Training\r\n\r\nGeneric training code code:\r\n\r\n```python checkTranSMSAselFFLTrain.py --useGPUno 0 --wd 0 --lr 1e-4 --scale_factor 2 --snrThreshold 5 --useNoisyProjection 1 --bs 64 --resultFolder . --n1 32 --n2 32 --trainFolder ./train --testFolder ./val```\r\n\r\n```useGPUno: Selected GPU\r\nwd: weight decay, default is 0\r\nlr: learning rate\r\nscale_factor: 2, 4, 8, etc.\r\nsnrThreshold: SNR threshold for SM training, i.e. values below threshold are not used for training\r\nuseNoisyProjection: 0 ablates the data consistency block from TranSMS, 1 is regular TranSMS with data consistency\r\nbs: batch size\r\nresultFolder: path for saving model outputs\r\nn1: SM dimension x\r\nn2: SM dimension y\r\ntrainFolder: folder containing training SMs\r\ntestFolder: folder containing validation SMs\r\n```\r\n\r\n# Code for Open MPI dataset\r\n\r\nCode for 2x, 4x and 8x training using Open MPI dataset:\r\n\r\n```python checkTranSMSAselFFLTrain.py --useGPUno 0 --lr 5e-4 --scale_factor 2 --resultFolder . --trainFolder ./train --testFolder ./val```\r\n\r\n```python checkTranSMSAselFFLTrain.py --useGPUno 0 --lr 1e-4 --scale_factor 4 --resultFolder . --trainFolder ./train --testFolder ./val```\r\n\r\n```python checkTranSMSAselFFLTrain.py --useGPUno 0 --lr 5e-5 --scale_factor 8 --resultFolder . --trainFolder ./train --testFolder ./val```\r\n\r\n# Inference\r\n\r\nCode for inference using all trained networks:\r\n\r\n```python inferenceOnOpenMPI.py --useGPUno 0 --bs 256 --n1 32 --n2 32 --modelFolder ./outs/ --saveOutFolder ./results/ --testFolder ./test --interpolationMatrixPath interpolaters.mat```\r\n\r\n```useGPUno: Selected GPU\r\nbs: batch size during inference\r\nn1: SM dimension x\r\nn2: SM dimension y\r\nmodelFolder: folder containing trained networks\r\nsaveOutFolder: path for saving \"mat\" file outputs\r\ntestFolder: folder containing test SMs\r\ninterpolationMatrixPath: path containing the interpolation matrix from 4x4, 8x8, 16x16 to 32x32, for fast interpolation purposes\r\n```\r\n\r\n**************************************************************************************************************************************\r\n# Citation\r\nYou are encouraged to modify/distribute this code. However, please acknowledge this code and cite the paper appropriately.\r\n```\r\n@article{transms,\r\n  author={Gungor, Alper and Askin, Baris and Soydan, Damla Alptekin and Saritas, Emine Ulku and Top, Can Baris; and Cukur, Tolga},\r\n  journal={IEEE Transactions on Medical Imaging}, \r\n  title={TranSMS: Transformers for Super-Resolution Calibration in Magnetic Particle Imaging}, \r\n  year={2022},\r\n  volume={},\r\n  number={},\r\n  pages={1-1},\r\n  doi={10.1109/TMI.2022.3189693}}\r\n```\r\n(c) ICON Lab 2022\r\n\r\n# Prerequisites\r\n\r\n- Python 3.6\r\n- CuDNN 8.2.1\r\n- PyTorch 1.10.0\r\n\r\n# Acknowledgements\r\n\r\nThis code uses libraries from CvT, SRCNN and VDSR repositories.\r\n\r\nFor questions/comments please send an email to: alperg@ee.bilkent.edu.tr\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficon-lab%2Ftransms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficon-lab%2Ftransms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficon-lab%2Ftransms/lists"}