'loss': ['compound_mssim'],
    'multicoil': [True],
    'refine_smaps': [True],
}

params = [
    dict(dcomp=[True], normalize_image=[False], **base_params),
    # dict(dcomp=[False], normalize_image=[True], **base_params),
]

run_ids = [
    'ncpdnet_sense___rfs_radial_compound_mssim_dcomp_1611913984',
    'ncpdnet_sense___rfs_spiral_compound_mssim_dcomp_1611913984',
]

eval_results = eval_grid(
    'nc_pdnet_mc',
    # train_fun,
    eval_fun,
    params,
    run_ids=run_ids,
    # n_gpus_train=1,
    # timeout_train=25,
    # n_gpus_eval=1,
    # n_samples_eval=100,
    # checkpoints_train=3,
    n_samples=100,
    n_gpus=3,
)
print(eval_results)
Ejemplo n.º 2
0
    dict(use_mixed_precision=[False], model=['unet'], **base_params),
]

run_ids = [
    'ncpdnet_3d___i6_radial_stacks_mse_dcomp_1612291359',
    'ncpdnet_3d___i6_spiral_stacks_mse_dcomp_1612291359',
    'vnet_3d___radial_stacks_mse_dcomp_1612291357',
    'vnet_3d___spiral_stacks_mse_dcomp_1612291357',
]

# eval_results = train_eval_grid(
eval_results = eval_grid(
    '3d_nc_eval',
    # train_ncnet_multinet,
    evaluate_nc_multinet,
    params,
    run_ids=run_ids,
    # n_gpus_train=1,
    # timeout_train=40,
    # n_gpus_eval=1,
    # n_samples_eval=100,
    timeout=20,
    n_gpus=1,
    params_to_ignore=['use_mixed_precision', 'scale_factor'],
    # checkpoints_train=7,
    # resume_checkpoint=4,
    # resume_run_run_ids=run_ids,
    project='fastmri4',
)
print(eval_results)
from grappa.deep.model import DeepKSpaceFiller
from grappa.evaluate.deep_evaluation import test_model

from jean_zay.submitit.general_submissions import train_eval_grid, eval_grid

job_name = 'd_grappa_eval'
metrics = dict()
param_grid = {
    'model_fun': [DeepKSpaceFiller],
    'model_kwargs': [{
        'n_dense': 2
    }, {
        'n_dense': 3
    }],
    'distance_from_center_feat': [True, False],
    'n_epochs': [1000],
    'lr': [1e-3],
    'instance_normalisation': [True, False],
    'kernel_learning': [True, False],
}

eval_grid(
    job_name,
    test_model,
    param_grid,
    n_samples=2,
    timeout=2,
    n_gpus=1,
)
base_params = {
    'n_epochs': [100],
    'af': [4],
    'acq_type': ['radial', 'spiral'],
    'loss': ['compound_mssim'],
    'multicoil': [True],
    'refine_smaps': [True],
    'brain': [True],
}

params = [
    dict(dcomp=[True], normalize_image=[False], **base_params),
]

run_ids = [
    'ncpdnet_sense___rfs_radial_compound_mssim_dcomp_1611913984',
    'ncpdnet_sense___rfs_spiral_compound_mssim_dcomp_1611913984',
]

eval_results = eval_grid(
    'nc_pdnet_mc_brain',
    eval_fun,
    params,
    run_ids=run_ids,
    n_samples=250,
    n_gpus=3,
    timeout=20,
    project='fastmri4',
)
print(eval_results)
Ejemplo n.º 5
0
from jean_zay.submitit.general_submissions import train_eval_grid, eval_grid

base_params = {
    'n_epochs': [100],
    'af': [4],
    'acq_type': ['radial', 'spiral'],
    'loss': ['compound_mssim'],
    'multicoil': [True],
    'refine_smaps': [True],
}

params = [
  dict(dcomp=[True], normalize_image=[False], **base_params),
]

run_ids = [
    'ncpdnet_sense___rfs_spiral_compound_mssim_dcomp_1611913984',
    'ncpdnet_sense___rfs_radial_compound_mssim_dcomp_1611913984',
]

eval_results = eval_grid(
    'nc_pdnet_mc_rev',
    eval_fun,
    params,
    run_ids=run_ids,
    n_samples=100,
    n_gpus=3,
    project='fastmri4',
)
print(eval_results)
job_name = 'shine_classifier_cifar_large_contract'
n_gpus = 1
base_params = dict(
    model_size='LARGE',
    dataset='cifar',
    n_gpus=n_gpus,
    check_contract=True,
    n_iter=500,
    seed=0,
)
parameters = []
parameters += [
    base_params,
    dict(shine=True, **base_params),
    dict(fpn=True, **base_params),
]

res_all = eval_grid(
    job_name,
    evaluate_classifier,
    parameters,
    to_grid=False,
    timeout=20,
    n_gpus=n_gpus,
    project='shine',
    params_to_ignore=['n_epochs'],
    torch=True,
    no_force_32=True,
)
    'n_epochs': [100],
    'af': [4],
    'acq_type': ['radial', 'spiral'],
    'loss': ['compound_mssim'],
}

params = [
  dict(dcomp=[True], normalize_image=[False], **base_params),
  # dict(dcomp=[False], normalize_image=[True], **base_params),
]

run_ids = [
    'ncpdnet_singlecoil___radial_compound_mssim_dcomp_1610872636',
    'ncpdnet_singlecoil___spiral_compound_mssim_dcomp_1610911070',
]

eval_results = eval_grid(
    'nc_pdnet',
    # train_fun,
    eval_fun,
    params,
    run_ids=run_ids,
    # n_gpus_train=1,
    # timeout_train=100,
    # n_gpus_eval=1,
    # n_samples_eval=100,
    n_samples=100,
    n_gpus=1,
)
print(eval_results)
Ejemplo n.º 8
0
from fastmri_recon.evaluate.scripts.nc_dip_eval import evaluate_dip_nc as eval_fun

from jean_zay.submitit.general_submissions import eval_grid

base_params = {
    'af': [4],
    'acq_type': ['radial', 'spiral'],
    'model_kwargs': [{}],
}

eval_results = eval_grid(
    'nc_pdnet',
    eval_fun,
    base_params,
    run_ids=None,
    n_samples=100,
    n_gpus=1,
)
print(eval_results)
Ejemplo n.º 9
0
    'MWCNN_medium_1603197894',
    'MWCNN_small_1603197894',
    'U-net_big_1603197894',
    'U-net_medium_1603197894',
    'U-net_medium-ca_1603197894',
    'U-net_small_1603197894',
]
eval_results = eval_grid(
    run_ids,
    'denoise',
    # train_denoiser,
    evaluate_xpdnet_denoising,
    parameter_grid,
    # n_samples_eval=500,
    # timeout_train=20,
    # n_gpus_train=1,
    # timeout_eval=4,
    # n_gpus_eval=1,
    n_samples=200,
    timeout=10,
    n_gpus=1,
    to_grid=False,
    noise_std=1,  # just for eval
)

df_results = pd.DataFrame(columns='model_name model_size psnr ssim'.split())

for (name, model_size, _, _, _, _, _), eval_res in zip(model_specs,
                                                       eval_results):
    df_results = df_results.append(dict(
        model_name=name,
Ejemplo n.º 10
0
    noise_config_eval = dict(
        noise_input=True,
        fixed_noise=True,
        noise_power_spec=noise_level / 255,
    )
    eval_results = eval_grid(
        job_name,
        # train,
        evaluate,
        parameter_grid,
        run_ids=run_ids,
        # n_samples_eval=20,
        # timeout_train=20,
        # n_gpus_train=1,
        # timeout_eval=4,
        # n_gpus_eval=1,
        n_samples=n_samples_eval,
        timeout=4,
        n_gpus=1,
        to_grid=False,
        patch_size=patch_size_eval,  # just for eval
        batch_size=batch_size_eval,  # just for eval
        noise_config=noise_config_eval,  # just for eval
        mode='bsd68',  # just for eval
        project='soft_thresholding',
    )
    eval_res.append(eval_results)

eval_res.append(eval_results_50)
data_for_df = []
for eval_results, noise_level in zip(eval_res, noise_levels):