Classifier type that operates on images. More...
Inherits SampleImageList.
Public Member Functions | |
cvb.sample_database.ImageClassificationLabelInfo | get_class_from_sample (self, int sample_index) |
Retrieve the label information that goes with a given sample. More... | |
Tuple[int, int] | get_indices_for_sample_index (self, int sample_index) |
For a given sample index (running from 0 to num_samples-1). More... | |
cvb.sample_database.SampleClassificationImageList | import_manto_sil (str file_name) |
Load a Manto2 sample list from disc. More... | |
cvb.sample_database.SampleClassificationImageList | transform_images (self, Callable[[cvb.Image], cvb.Image] transform_callback) |
Transform this sample image list into a new sample image list by transforming each sample inside it. More... | |
cvb.sample_database.SampleClassificationImageList | transform_labels (self, Callable[[str], str] transform_callback) |
Transform this sample image list into a new sample image list by transforming each label inside it. More... | |
cvb.sample_database.SampleRegressionImageList | transform_to_regression_list (self, Callable[[str], List[float]] transform_callback) |
Transform this sample image list into a new sample image list by transforming each label inside it. More... | |
![]() | |
cvb.Image | get_sample_image (self, int sample_index) |
Retrieve an image by its overall sample index (ranging from 0 to num_samples-1). More... | |
bool | is_compatible (self, cvb.Image img) |
Check whether a CVB image is compatible with this image list, i.e. More... | |
None | set_feature_window (self, cvb.Point2D location, cvb.Size2D size, cvb.Point2D origin) |
Redefine the feature window of the sample image list. More... | |
![]() | |
None | save (self, str file_name) |
Save the sample list to a file. More... | |
Properties | |
classes = property | |
cvb.sample_database.ImageClassificationInfoCollection: Get the class collection. | |
![]() | |
feature_window_location = property | |
cvb.Point2D: Location of the feature window (position of left top corner inside the image). | |
feature_window_origin = property | |
cvb.Point2D: Location of the feature window origin in pixel coordinates measured from the left top corner of the feature window. | |
feature_window_size = property | |
cvb.Size2D: Size of the feature window. | |
fringes = property | |
cvb.sample_database.Fringes: Get fringes (= size difference between the images and the feature window) of the sample images. | |
image_data_type = property | |
cvb.DataType: Data type of the images that can be added to the image list (all planes must have same data type). | |
image_dimension = property | |
int: Dimension (# of planes) of the images that can be added to the image list. | |
image_size = property | |
cvb.Size2D: Size of the images (in pixels) that can be added to the image list. | |
![]() | |
average_sample_count = property | |
float: Average number samples in per class of the sample list. | |
comment = property | |
str: The comment text. | |
file_name = property | |
str: Name of the file from which this image list was loaded (empty string if this image list was neither loaded nor saved since its construction). | |
max_sample_count = property | |
int: Number samples in the largest class of the sample list. | |
min_sample_count = property | |
int: Number samples in the smallest class of the sample list. | |
num_classes = property | |
int: Number of distinguishable classes in the sample list. | |
num_samples = property | |
int: Total number of samples in the sample list. | |
Classifier type that operates on images.
Instantiates a SampleClassificationImageList object taking an image data type.
image_data_type : cvb.sample_database.SampleListImageDataType Data type of the images to be added to the sample image list.
Instantiates a SampleClassificationImageList object taking a file name.
file_name : str Name of the file to be loaded.
cvb.sample_database.ImageClassificationLabelInfo get_class_from_sample | ( | self, | |
int | sample_index | ||
) |
Retrieve the label information that goes with a given sample.
sample_index : int Index of the sample for which to retrieve the class information.
cvb.sample_database.ImageClassificationLabelInfo The indexed class.
Tuple[int, int] get_indices_for_sample_index | ( | self, | |
int | sample_index | ||
) |
For a given sample index (running from 0 to num_samples-1).
This method determines the indices of the class and the sample inside the class.
sample_index : int Sample index to get the indices for.
Tuple[int, int] Tuple of two integer values containing class index and sample index inside the class's sample collection.
cvb.sample_database.SampleClassificationImageList import_manto_sil | ( | str | file_name | ) |
Load a Manto2 sample list from disc.
file_name : str Name of the file to be loaded.
cvb.sample_database.SampleClassificationImageList The imported Manto image list.
cvb.sample_database.SampleClassificationImageList transform_images | ( | self, | |
Callable[[cvb.Image], cvb.Image] | transform_callback | ||
) |
Transform this sample image list into a new sample image list by transforming each sample inside it.
transform_callback : Callable[[cvb.Image], cvb.Image] Sample transformation callback.
cvb.sample_database.SampleClassificationImageList New sample list.
cvb.sample_database.SampleClassificationImageList transform_labels | ( | self, | |
Callable[[str], str] | transform_callback | ||
) |
Transform this sample image list into a new sample image list by transforming each label inside it.
transform_callback : Callable[[str], str] Label transformation callback.
cvb.sample_database.SampleClassificationImageList New sample list.
cvb.sample_database.SampleRegressionImageList transform_to_regression_list | ( | self, | |
Callable[[str], List[float]] | transform_callback | ||
) |
Transform this sample image list into a new sample image list by transforming each label inside it.
transform_callback : Callable[[str], List[float]] Label transformation callback.
cvb.sample_database.SampleRegressionImageList New sample list.