Link Search Menu Expand Document

[Notebook example]

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)

Dataset

Co-occurrence matrix

my_dataset.show_co_occurrence_matrix()

co_occurrence

Categories distribution

my_dataset.show_distribution_of_categories()

categories_distribution

Properties distribution

my_dataset.show_distribution_of_properties()

properties_distribution_a properties_distribution_e properties_distribution_i

properties_distribution_b properties_distribution_c properties_distribution_d properties_distribution_f properties_distribution_g properties_distribution_h properties_distribution_l properties_distribution_m properties_distribution_n

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()

analyze_properties_a analyze_properties_b analyze_properties_c

Sensitivity and impact analysis

my_analyzer.analyze_sensitivity_impact_of_properties()

sensitivity_impact

False Positive categorization and impact

my_analyzer.analyze_false_positive_errors()

fp_analysis_a fp_analysis_b

fp_analysis_c fp_analysis_d

fp_analysis_e fp_analysis_f

False Negative categorization

my_analyzer.analyze_false_negative_errors()

fn_analysis_a fn_analysis_b fn_analysis_c

Precision-Recall Curve - Overall

my_analyzer.analyze_curve(average="micro")

pr_curve

Precision-Recall Curve - Per-category

my_analyzer.analyze_curve_for_categories()

pr_curve_categories

IoU analysis

my_analyzer.analyze_intersection_over_union()

iou

Reliability analysis

my_analyzer.analyze_reliability()

reliability

True Positive distribution

my_analyzer.show_true_positive_distribution()

tp_distribution

False Negative distribution

my_analyzer.show_false_negative_distribution()

fn_distribution

False Positive distribution

my_analyzer.show_false_positive_distribution()

fp_distribution

Performance summary

my_analyzer.base_report()

report