This is SAINT(Spatially Aware Interpolation Network for Medical Slice Synthesis)
-
.nii->.pt
from py_SAINT.STAGE1 import nii2pickle nii2pickle.nii2pt(ori_dir_path,output_file_path)
parameters description ori_dir_path file path containing .nii output_file_path file path of the generated .pt #eg: nii2pickle.nii2pt("/home1/xx/xx_data/273data-yscl/1T2/1/002_OCor_T2_FRFSE/","/home1/xx/SAINT/Data/Stage1_Input/TEST/HR/")
-
Interpolate with sag and cor view respectively
from py_SAINT.STAGE1 import interpolation interpolation.get_Stage1_result (scale ='4',save =/path/ ,dir_data ='/path/',n_colors =3 ,n_GPUs =1,rgb_range =4000, view ='sag',gpu='0') interpolation.get_Stage1_result (scale ='4',save =/path/ ,dir_data ='/path/',n_colors =3 ,n_GPUs =1,rgb_range =4000, view ='cor',gpu='0')
parameters description scale super resolution scale (eg:2,3,4,6) save file path of save dir_data dataset directory (Note that the dir_data path should point to a folder that contains subfolders named 'TEST', each of which needs to have a 'HR' and 'LR' subfolder, 'HR' is high resolution file , 'LR' is low resolution file. Data should go accordingly in this structure. n_colors number of channels to use n_GPUs number of GPUs rgb_range maximum value of RGB view view of interpolation (Note the --view option performs inference on the volume from either the sagittal or coronal axis. Note that the whether it's actually sagittal or coronal depends on the orientation of the data.) #eg: interpolation.get_Stage1_result (scale ='4',save ="/home1/xx/SAINT/Data/Stage1_output_sag_cor/" ,dir_data ='/home1/xx/SAINT/Data/Stage1_Input/',n_colors =3 ,n_GPUs =1,rgb_range =4000, view ='cor',gpu='0') interpolation.get_Stage1_result (scale ='4',save ="/home1/xx/SAINT/Data/Stage1_output_sag_cor/" ,dir_data ='/home1/xx/SAINT/Data/Stage1_Input/',n_colors =3 ,n_GPUs =1,rgb_range =4000, view ='sag',gpu='0')
-
Before going to the RFN stage, sagittal and coronal-wise SR'ed volume needs to be recombine into a single volume for inference. In simple terms just concatenate them in the first dimension, coronal SR goes in channel 0 and sagittal SR goes in channel 1
from py_SAINT.STAGE1.process import cor_sag_comb_test cor_sag_comb_test.comb_cor_sag(files_dir='/path/',input_sag_cor_dir='/path/',out_dir='/path/', scale=4)
parameters description files_dir dataset directory input_sag_cor_dir path to the folder containing sag and cor out_dir generated combine path scale super resolution scale #eg: cor_sag_comb_test.comb_cor_sag(files_dir='/home1/mksun/SAINT/Data/Stage1_Input/TEST/HR/',input_sag_cor_dir='/home1/mksun/SAINT/Data/Stage1_output_sag_cor/results/raw/',out_dir='/home1/mksun/SAINT/Data/combine_cor_sag_out/TEST/', scale=4)
-
Residual-Fusion
from py_SAINT.STAGE2 import fuse fuse.get_Stage2_result(save ='/path/',dir_data ='/path/' ,n_GPUs =1 ,rgb_range =4000,gpu='0')
parameters description save file path of save dir_data step3_out_dir n_GPUs number of GPUs rgb_range maximum value of RGB #eg: fuse.get_Stage2_result(save ='/home1/mksun/SAINT/Data/out_fuse/',dir_data ='/home1/mksun/SAINT/Data/combine_cor_sag_out/' ,n_GPUs =1 ,rgb_range =4000,gpu='0')
-
.pt->.nii(option)
from py_SAINT.STAGE1 import pt2nii pt2nii.pt2nii(ori_nii_dir_path, pt_dir_path,nii_dir_path)
parameters description nii_dir_path nii_output_dir #eg: pt2nii.pt2nii(ori_nii_dir_path='/home1/mksun/xh_data/273data-yscl/1T2/1/002_OCor_T2_FRFSE/',pt_dir_path='/home1/mksun/SAINT/Data/out_fuse/results/raw/',nii_dir_path='/home1/mksun/SAINT/Data/final_nii/')
Metadata
Release files for py-SAINT 1.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| py_SAINT-1.7.0.tar.gz | 13.2 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_SAINT-1.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.6 MB
Release files / py_SAINT-1.7.0.tar.gz
| Download URL | py_SAINT-1.7.0.tar.gz |
|---|---|
| Size | 13.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63537eca490672c4f0fc05814290fcadbce0ca11603c13ef30f304e3416acc74
|
|
BLAKE2b-256 checksum How to use checksums |
797702b2114c4127af6ad211c8358dee4d6160c1cb0be48a4a4635ab93afe6e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
|
Release files / py_SAINT-1.7.0-py3-none-any.whl
| Download URL | py_SAINT-1.7.0-py3-none-any.whl |
|---|---|
| Size | 13.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b8cd133230ef18851db7fb14a66339fcd8ae780680e1b5fdcd376f7dace681c
|
|
BLAKE2b-256 checksum How to use checksums |
0a5a1023c4b090da1c14b072294b899f064204d5e56881951606a2a8c2f16655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
|
Security for py-SAINT 1.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.