Skip to content

Commit

Permalink
fixed imports in models again
Browse files Browse the repository at this point in the history
  • Loading branch information
hvgazula committed Jun 14, 2024
1 parent c77d621 commit 3d4e352
Show file tree
Hide file tree
Showing 20 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion nobrainer/ext/SynthSeg/estimate_priors.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


# third-party imports
from ext.lab2im import edit_volumes, utils
from nobrainer.ext.lab2im import edit_volumes, utils


def sample_intensity_stats_from_image(
Expand Down
2 changes: 1 addition & 1 deletion nobrainer/ext/SynthSeg/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os

# third-party imports
from ext.lab2im import edit_volumes, utils
from nobrainer.ext.lab2im import edit_volumes, utils
import numpy as np
from scipy.ndimage.morphology import distance_transform_edt
from scipy.stats import wilcoxon
Expand Down
2 changes: 1 addition & 1 deletion nobrainer/ext/SynthSeg/metrics_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""

# third-party imports
from ext.lab2im import layers
from nobrainer.ext.lab2im import layers
import keras.layers as KL
from keras.models import Model

Expand Down
6 changes: 3 additions & 3 deletions nobrainer/ext/SynthSeg/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import os

# project imports
from SynthSeg import evaluate
from nobrainer.ext.SynthSeg import evaluate

# third-party imports
from ext.lab2im import edit_volumes, layers, utils
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import edit_volumes, layers, utils
from nobrainer.ext.neuron import models as nrn_models
import keras.backend as K
import keras.layers as KL
from keras.models import Model
Expand Down
8 changes: 4 additions & 4 deletions nobrainer/ext/SynthSeg/predict_denoiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
import os

# project imports
from SynthSeg import evaluate
from SynthSeg.predict import postprocess, write_csv
from nobrainer.ext.SynthSeg import evaluate
from nobrainer.ext.SynthSeg.predict import postprocess, write_csv

# third-party imports
from ext.lab2im import edit_volumes, layers, utils
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import edit_volumes, layers, utils
from nobrainer.ext.neuron import models as nrn_models
import keras.layers as KL
from keras.models import Model
import numpy as np
Expand Down
8 changes: 4 additions & 4 deletions nobrainer/ext/SynthSeg/predict_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
import os

# project imports
from SynthSeg import evaluate
from SynthSeg.predict import write_csv
from nobrainer.ext.SynthSeg import evaluate
from nobrainer.ext.SynthSeg.predict import write_csv

# third-party imports
from ext.lab2im import edit_volumes, layers, utils
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import edit_volumes, layers, utils
from nobrainer.ext.neuron import models as nrn_models
import keras.layers as KL
from keras.models import Model
import numpy as np
Expand Down
6 changes: 3 additions & 3 deletions nobrainer/ext/SynthSeg/predict_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
import os

# project imports
from SynthSeg import evaluate
from nobrainer.ext.SynthSeg import evaluate

# third-party imports
from ext.lab2im import edit_volumes, utils
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import edit_volumes, utils
from nobrainer.ext.neuron import models as nrn_models
import keras.layers as KL
from keras.models import Model
import numpy as np
Expand Down
8 changes: 4 additions & 4 deletions nobrainer/ext/SynthSeg/predict_synthseg.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
import traceback

# project imports
from SynthSeg import evaluate
from SynthSeg.predict import get_flip_indices, write_csv
from nobrainer.ext.SynthSeg import evaluate
from nobrainer.ext.SynthSeg.predict import get_flip_indices, write_csv

# third-party imports
from ext.lab2im import edit_volumes, layers, utils
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import edit_volumes, layers, utils
from nobrainer.ext.neuron import models as nrn_models
import keras.backend as K
import keras.layers as KL
from keras.models import Model
Expand Down
10 changes: 5 additions & 5 deletions nobrainer/ext/SynthSeg/sample_segmentation_pairs_d.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import os

# third-party imports
from ext.lab2im import edit_tensors as l2i_et
from ext.lab2im import edit_volumes
from ext.lab2im import layers as layers
from ext.lab2im import utils
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import edit_tensors as l2i_et
from nobrainer.ext.lab2im import edit_volumes
from nobrainer.ext.lab2im import layers as layers
from nobrainer.ext.lab2im import utils
from nobrainer.ext.neuron import models as nrn_models
from keras import models
import keras.layers as KL
import numpy as np
Expand Down
10 changes: 5 additions & 5 deletions nobrainer/ext/SynthSeg/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
import os

# project imports
from SynthSeg import metrics_model as metrics
from SynthSeg.brain_generator import BrainGenerator
from nobrainer.ext.SynthSeg import metrics_model as metrics
from nobrainer.processing.brain_generator import BrainGenerator

# third-party imports
from ext.lab2im import layers, utils
from ext.neuron import layers as nrn_layers
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import layers, utils
from nobrainer.ext.neuron import layers as nrn_layers
from nobrainer.ext.neuron import models as nrn_models
import keras
from keras import models
import keras.callbacks as KC
Expand Down
12 changes: 6 additions & 6 deletions nobrainer/ext/SynthSeg/training_denoiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import os

# project imports
from SynthSeg import metrics_model as metrics
from SynthSeg.labels_to_image_model import get_shapes
from SynthSeg.training import train_model
from SynthSeg.training_supervised import build_model_inputs
from nobrainer.ext.SynthSeg import metrics_model as metrics
from nobrainer.models.labels_to_image_model import get_shapes
from nobrainer.ext.SynthSeg.training import train_model
from nobrainer.ext.SynthSeg.training_supervised import build_model_inputs

# third-party imports
from ext.lab2im import layers, utils
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import layers, utils
from nobrainer.ext.neuron import models as nrn_models
from keras import layers as KL
from keras import models
import numpy as np
Expand Down
16 changes: 8 additions & 8 deletions nobrainer/ext/SynthSeg/training_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
import os

# project imports
from SynthSeg import metrics_model as metrics
from SynthSeg.brain_generator import BrainGenerator
from SynthSeg.labels_to_image_model import get_shapes
from SynthSeg.training import train_model
from nobrainer.ext.SynthSeg import metrics_model as metrics
from nobrainer.processing.brain_generator import BrainGenerator
from nobrainer.models.labels_to_image_model import get_shapes
from nobrainer.ext.SynthSeg.training import train_model

# third-party imports
from ext.lab2im import edit_tensors as l2i_et
from ext.lab2im import layers, utils
from ext.lab2im.edit_volumes import get_ras_axes
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import edit_tensors as l2i_et
from nobrainer.ext.lab2im import layers, utils
from nobrainer.ext.lab2im.edit_volumes import get_ras_axes
from nobrainer.ext.neuron import models as nrn_models
from keras import models
import keras.layers as KL
import numpy as np
Expand Down
12 changes: 6 additions & 6 deletions nobrainer/ext/SynthSeg/training_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
import os

# project imports
from SynthSeg import metrics_model as metrics
from nobrainer.ext.SynthSeg import metrics_model as metrics

# third-party imports
from ext.lab2im import layers as l2i_layers
from ext.lab2im import utils
from ext.neuron import layers as nrn_layers
from ext.neuron import models as nrn_models
from ext.neuron import utils as nrn_utils
from nobrainer.ext.lab2im import layers as l2i_layers
from nobrainer.ext.lab2im import utils
from nobrainer.ext.neuron import layers as nrn_layers
from nobrainer.ext.neuron import models as nrn_models
from nobrainer.ext.neuron import utils as nrn_utils
import keras
from keras import models
import keras.backend as K
Expand Down
14 changes: 7 additions & 7 deletions nobrainer/ext/SynthSeg/training_supervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
import os

# project imports
from SynthSeg import metrics_model as metrics
from SynthSeg.labels_to_image_model import get_shapes
from SynthSeg.training import train_model
from nobrainer.ext.SynthSeg import metrics_model as metrics
from nobrainer.models.labels_to_image_model import get_shapes
from nobrainer.ext.SynthSeg.training import train_model

# third-party imports
from ext.lab2im import edit_tensors as l2i_et
from ext.lab2im import layers, utils
from ext.lab2im.edit_volumes import get_ras_axes
from ext.neuron import models as nrn_models
from nobrainer.ext.lab2im import edit_tensors as l2i_et
from nobrainer.ext.lab2im import layers, utils
from nobrainer.ext.lab2im.edit_volumes import get_ras_axes
from nobrainer.ext.neuron import models as nrn_models
from keras import models
import keras.layers as KL
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions nobrainer/ext/SynthSeg/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import re

# project imports
from SynthSeg.predict import predict
from nobrainer.ext.SynthSeg.predict import predict

# third-party imports
from ext.lab2im import utils
from nobrainer.ext.lab2im import utils
import matplotlib.pyplot as plt
import numpy as np
from tensorflow.python.summary.summary_iterator import summary_iterator
Expand Down
4 changes: 2 additions & 2 deletions nobrainer/ext/SynthSeg/validate_denoiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import os

# project imports
from SynthSeg.predict_denoiser import predict
from nobrainer.ext.SynthSeg.predict_denoiser import predict

# third-party imports
from ext.lab2im import utils
from nobrainer.ext.lab2im import utils


def validate_training(
Expand Down
4 changes: 2 additions & 2 deletions nobrainer/ext/SynthSeg/validate_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import os

# project imports
from SynthSeg.predict_group import predict
from nobrainer.ext.SynthSeg.predict_group import predict

# third-party imports
from ext.lab2im import utils
from nobrainer.ext.lab2im import utils


def validate_training(
Expand Down
4 changes: 2 additions & 2 deletions nobrainer/ext/SynthSeg/validate_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import re

# project imports
from SynthSeg.predict_qc import predict
from nobrainer.ext.SynthSeg.predict_qc import predict

# third-party imports
from ext.lab2im import utils
from nobrainer.ext.lab2im import utils
import matplotlib.pyplot as plt
import numpy as np
from tensorflow.python.summary.summary_iterator import summary_iterator
Expand Down
6 changes: 3 additions & 3 deletions nobrainer/models/labels_to_image_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import tensorflow as tf

# third-party imports
from nobrainer.SynthSeg.ext.lab2im import edit_tensors as l2i_et
from nobrainer.SynthSeg.ext.lab2im import layers, utils
from nobrainer.SynthSeg.ext.lab2im.edit_volumes import get_ras_axes
from nobrainer.ext.lab2im import edit_tensors as l2i_et
from nobrainer.ext.lab2im import layers, utils
from nobrainer.ext.lab2im.edit_volumes import get_ras_axes


def labels_to_image_model(
Expand Down
2 changes: 1 addition & 1 deletion nobrainer/processing/brain_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# python imports
import numpy as np

from nobrainer.ext.SynthSeg.labels_to_image_model import labels_to_image_model
from nobrainer.models.labels_to_image_model import labels_to_image_model

# project imports
from nobrainer.ext.SynthSeg.model_inputs import build_model_inputs
Expand Down

0 comments on commit 3d4e352

Please sign in to comment.