Skip to content

Commit

Permalink
style: standardize import order using isort
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrahimebrahim committed May 29, 2024
1 parent d71686a commit 4a44bcf
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
6 changes: 4 additions & 2 deletions HD_BET/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from abc import abstractmethod

import numpy as np
import torch
from HD_BET.utils import SetNetworkToVal, softmax_helper
from abc import abstractmethod

from HD_BET.network_architecture import Network
from HD_BET.utils import SetNetworkToVal, softmax_helper


class BaseConfig(object):
Expand Down
2 changes: 1 addition & 1 deletion HD_BET/data_loading.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SimpleITK as sitk
import numpy as np
import SimpleITK as sitk
from skimage.transform import resize


Expand Down
3 changes: 2 additions & 1 deletion HD_BET/hd_bet_cli.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env python

import os

import HD_BET
from HD_BET.run import run_hd_bet
from HD_BET.utils import maybe_mkdir_p, subfiles
import HD_BET


def main():
Expand Down
1 change: 1 addition & 0 deletions HD_BET/network_architecture.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import torch
import torch.nn as nn
import torch.nn.functional as F

from HD_BET.utils import softmax_helper


Expand Down
2 changes: 1 addition & 1 deletion HD_BET/predict_case.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import torch
import numpy as np
import torch


def pad_patient_3D(patient, shape_must_be_divisible_by=16, min_size=None):
Expand Down
13 changes: 8 additions & 5 deletions HD_BET/run.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import torch
import imp
import os

import numpy as np
import SimpleITK as sitk
import torch

import HD_BET
from HD_BET.data_loading import load_and_preprocess, save_segmentation_nifti
from HD_BET.predict_case import predict_case_3D_net
import imp
from HD_BET.utils import postprocess_prediction, SetNetworkToVal, get_params_fname, maybe_download_parameters
import os
import HD_BET
from HD_BET.utils import (SetNetworkToVal, get_params_fname,
maybe_download_parameters, postprocess_prediction)


def apply_bet(img, bet, out_fname):
Expand Down
8 changes: 5 additions & 3 deletions HD_BET/utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import os
from urllib.request import urlopen
import torch
from torch import nn

import numpy as np
import torch
from skimage.morphology import label
import os
from torch import nn

from HD_BET.paths import folder_with_parameter_files


Expand Down

0 comments on commit 4a44bcf

Please sign in to comment.