RarePlanes - an instance segmentation task example
Package import and variables definition
from odin.classes import DatasetLocalization, AnalyzerLocalization, Metrics, TaskType, Curves
# define the path of the GT .json file
dataset_gt_param = "../../test-data/localization/gt.json"
# define the path of the folder that contains the predictions .txt files for each model
path_to_detections = "../../test-data/localization/predictions-segmentation/"
# define the problem task
task_type = TaskType.INSTANCE_SEGMENTATION
# define the file_name for the meta-annotations
properties_file = "properties_plane.json"
Dataset
my_dataset = DatasetClassification(dataset_gt_param,
classification_type,
proposals_paths=path_to_detections,
similar_classes=similar_classes,
properties_file=properties_file,
save_graphs_as_png=False)
Co-occurrence matrix
my_dataset.show_co_occurrence_matrix()
Categories distribution
my_dataset.show_distribution_of_categories()
Properties distribution
my_dataset.show_distribution_of_properties()
Analyzer
my_analyzer = AnalyzerLocalization('my_model',
my_dataset,
use_normalization=True,
norm_factor_categories=0.3,
metric=Metrics.AVERAGE_PRECISION_INTERPOLATED,
save_graphs_as_png=False)
my_analyzer.set_normalization(True, with_properties=False)
Properties analysis
my_analyzer.analyze_properties()
Sensitivity and impact analysis
my_analyzer.analyze_sensitivity_impact_of_properties()
False Positive categorization and impact
my_analyzer.analyze_false_positive_errors()
False Negative categorization
my_analyzer.analyze_false_negative_errors()
Precision-Recall Curve - Overall
my_analyzer.analyze_curve(average="micro")
Precision-Recall Curve - Per-category
my_analyzer.analyze_curve_for_categories()
IoU analysis
my_analyzer.analyze_intersection_over_union()
Reliability analysis
my_analyzer.analyze_reliability()
True Positive distribution
my_analyzer.show_true_positive_distribution()
False Negative distribution
my_analyzer.show_false_negative_distribution()
False Positive distribution
my_analyzer.show_false_positive_distribution()
Performance summary
my_analyzer.base_report()