Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrei-Claudiu Roibu
BrainMapper
Commits
987c425f
Commit
987c425f
authored
Apr 03, 2020
by
Andrei-Claudiu Roibu
🖥
Browse files
function params calls cleanup
parent
018997a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
BrainMapperUNet.py
View file @
987c425f
...
...
@@ -146,6 +146,7 @@ class BrainMapperUNet(nn.Module):
Args:
X (torch.tensor): input dMRI volume
device (int/str): Device type used for training (int - GPU id, str- CPU)
Returns:
prediction (ndarray): predicted output after training
...
...
utils/data_evaluation_utils.py
View file @
987c425f
...
...
@@ -191,14 +191,12 @@ def evaluate_dice_score(trained_model_path,
return
average_dice_score
def
evaluate_single_path
(
trained_model_path
,
number_of_classes
,
data_directory
,
data_list
,
orientation
,
prediction_output_path
,
batch_size
,
device
=
0
,
LogWriter
=
None
,
mode
=
'evaluate'
,
exit_on_error
=
False
):
"""Single Path Evaluator
...
...
@@ -207,14 +205,12 @@ def evaluate_single_path(trained_model_path,
Args:
trained_model_path (str): Path to the location of the trained model
number_of_classes (int): Number of classes
data_directory (str): Path to input data directory
data_list (str): Path to a .txt file containing the input files for consideration
orientation (str): String detailing the current view (COR, SAG, AXL)
prediction_output_path (str): Output prediction path
batch_size (int): Size of batch to be evaluated
device (str/int): Device type used for training (int - GPU id, str- CPU)
LogWriter (class): Log Writer class for the BrainMapper U-net
mode (str): Current run mode or phase
exit_on_error (bool): Flag that triggers the raising of an exception
...
...
@@ -296,7 +292,6 @@ def evaluate_single_path(trained_model_path,
def
evaluate_two_paths
(
trained_model1_path
,
trained_model2_path
,
number_of_classes
,
data_directory
,
data_list
,
orientation1
,
...
...
@@ -304,7 +299,6 @@ def evaluate_two_paths(trained_model1_path,
prediction_output_path
,
batch_size
,
device
=
0
,
LogWriter
=
None
,
mode
=
'evaluate'
,
exit_on_error
=
False
):
"""Two Path Evaluator
...
...
@@ -314,7 +308,6 @@ def evaluate_two_paths(trained_model1_path,
Args:
trained_model1_path (str): Path to the location of the trained model1
trained_model2_path (str): Path to the location of the trained model2
number_of_classes (int): Number of classes
data_directory (str): Path to input data directory
data_list (str): Path to a .txt file containing the input files for consideration
orientation1 (str): String detailing the current view 1 (COR, SAG, AXL)
...
...
@@ -322,7 +315,6 @@ def evaluate_two_paths(trained_model1_path,
prediction_output_path (str): Output prediction path
batch_size (int): Size of batch to be evaluated
device (str/int): Device type used for training (int - GPU id, str- CPU)
LogWriter (class): Log Writer class for the BrainMapper U-net
mode (str): Current run mode or phase
exit_on_error (bool): Flag that triggers the raising of an exception
...
...
@@ -419,7 +411,6 @@ def evaluate_two_paths(trained_model1_path,
def
evaluate_all_paths
(
trained_model1_path
,
trained_model2_path
,
trained_model3_path
,
number_of_classes
,
data_directory
,
data_list
,
orientation1
,
...
...
@@ -428,7 +419,6 @@ def evaluate_all_paths(trained_model1_path,
prediction_output_path
,
batch_size
,
device
=
0
,
LogWriter
=
None
,
mode
=
'evaluate'
,
exit_on_error
=
False
):
"""Two Path Evaluator
...
...
@@ -439,7 +429,6 @@ def evaluate_all_paths(trained_model1_path,
trained_model1_path (str): Path to the location of the trained model1
trained_model2_path (str): Path to the location of the trained model2
trained_model3_path (str): Path to the location of the trained model3
number_of_classes (int): Number of classes
data_directory (str): Path to input data directory
data_list (str): Path to a .txt file containing the input files for consideration
orientation1 (str): String detailing the current view 1 (COR, SAG, AXL)
...
...
@@ -448,7 +437,6 @@ def evaluate_all_paths(trained_model1_path,
prediction_output_path (str): Output prediction path
batch_size (int): Size of batch to be evaluated
device (str/int): Device type used for training (int - GPU id, str- CPU)
LogWriter (class): Log Writer class for the BrainMapper U-net
mode (str): Current run mode or phase
exit_on_error (bool): Flag that triggers the raising of an exception
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment