niftynet.contrib.csv_reader.classification_application module¶
This module defines an image-level classification application that maps from images to scalar, multi-class labels.
This class is instantiated and initalized by the application_driver.
-
class
ClassificationApplication
(net_param, action_param, action)[source]¶ Bases:
niftynet.application.base_application.BaseApplication
This class defines an application for image-level classification problems mapping from images to scalar labels.
This is the application class to be instantiated by the driver and referred to in configuration files.
Although structurally similar to segmentation, this application supports different samplers/aggregators (because patch-based processing is not appropriate), and monitoring metrics.
-
REQUIRED_CONFIG_SECTION
= 'CLASSIFICATION'¶
-
initialise_dataset_loader
(data_param=None, task_param=None, data_partitioner=None)[source]¶ this function initialise self.readers
Parameters: - data_param – input modality specifications
- task_param – contains task keywords for grouping data_param
- data_partitioner – specifies train/valid/infer splitting if needed
Returns:
-
initialise_sampler
()[source]¶ Samplers take
self.reader
as input and generates sequences of ImageWindow that will be fed to the networksThis function sets
self.sampler
.
-
initialise_network
()[source]¶ This function create an instance of network and sets
self.net
Returns: None
-
add_confusion_matrix_summaries_
(outputs_collector, net_out, data_dict)[source]¶ This method defines several monitoring metrics that are derived from the confusion matrix
-
connect_data_and_network
(outputs_collector=None, gradients_collector=None)[source]¶ Adding sampler output tensor and network tensors to the graph.
Parameters: - outputs_collector –
- gradients_collector –
Returns:
-