Example #1
0
def test_dvf_network():
    # the model outputs dvf
    train_and_predict_with_config(
        test_name="unpaired_labeled_nifti_dvf",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/dvf.yaml",
            "deepreg/config/test/unpaired_nifti.yaml",
            "deepreg/config/test/labeled.yaml",
        ],
    )
Example #2
0
def test_conditional_network():
    # the model outputs predicted label
    train_and_predict_with_config(
        test_name="unpaired_labeled_nifti_conditional",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/conditional.yaml",
            "deepreg/config/test/unpaired_nifti.yaml",
            "deepreg/config/test/labeled.yaml",
        ],
    )
Example #3
0
def test_unpaired_labeled():
    # the nifti case is included in test_train.py:test_train

    # h5 case
    train_and_predict_with_config(
        test_name="unpaired_labeled_h5",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/unpaired_h5.yaml",
            "deepreg/config/test/labeled.yaml",
        ],
    )
Example #4
0
def test_unpaired_unlabeled():
    train_and_predict_with_config(
        test_name="unpaired_unlabeled_nifti",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/unpaired_nifti.yaml",
            "deepreg/config/test/unlabeled.yaml",
        ],
    )

    train_and_predict_with_config(
        test_name="unpaired_unlabeled_h5",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/unpaired_h5.yaml",
            "deepreg/config/test/unlabeled.yaml",
        ],
    )
Example #5
0
def test_grouped_labeled():
    train_and_predict_with_config(
        test_name="grouped_labeled_ddf",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/grouped_nifti.yaml",
            "deepreg/config/test/labeled.yaml",
        ],
    )

    train_and_predict_with_config(
        test_name="grouped_labeled_h5",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/grouped_h5.yaml",
            "deepreg/config/test/labeled.yaml",
        ],
    )
Example #6
0
def test_unpaired_unlabeled():
    # the training set has multiple folders
    train_and_predict_with_config(
        test_name="unpaired_unlabeled_nifti_multi_dirs",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/unpaired_nifti_multi_dirs.yaml",
            "deepreg/config/test/unlabeled.yaml",
        ],
    )

    # data dir path for validation set is not provided
    train_and_predict_with_config(
        test_name="unpaired_unlabeled_nifti_no_valid",
        config_path=[
            "deepreg/config/test/ddf.yaml",
            "deepreg/config/test/unpaired_nifti_no_valid.yaml",
            "deepreg/config/test/unlabeled.yaml",
        ],
    )