Skip to content

Commit

Permalink
deleted cfos example, updated speedtest
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrik-code committed Jan 15, 2024
1 parent 91fc758 commit df6e9b3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 280 deletions.
10 changes: 6 additions & 4 deletions benchmark/modules_speedtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
ConnectedComponentsInstanceApproximator,
NaiveThresholdMatching,
SemanticPair,
UnmatchedInstancePair,
MatchedInstancePair,
)
from panoptica.instance_evaluator import evaluate_matched_instance
from time import perf_counter
Expand Down Expand Up @@ -80,16 +82,16 @@ def test_input(processing_pair: SemanticPair):
processing_pair.crop_data()
#
start1 = perf_counter()
processing_pair = instance_approximator.approximate_instances(processing_pair)
unmatched_instance_pair = instance_approximator.approximate_instances(semantic_pair=processing_pair)
time1 = perf_counter() - start1
#
start2 = perf_counter()
processing_pair = instance_matcher.match_instances(processing_pair)
matched_instance_pair = instance_matcher.match_instances(unmatched_instance_pair=unmatched_instance_pair)
time2 = perf_counter() - start2
#
start3 = perf_counter()
processing_pair = evaluate_matched_instance(
processing_pair, matching_threshold=iou_threshold
result = evaluate_matched_instance(
matched_instance_pair, decision_threshold=iou_threshold,
)
time3 = perf_counter() - start3
return time1, time2, time3
Expand Down
28 changes: 0 additions & 28 deletions examples/example_cfos_3d.py

This file was deleted.

2 changes: 1 addition & 1 deletion panoptica/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
CCABackend,
)
from panoptica.instance_matcher import NaiveThresholdMatching
from panoptica.evaluator import Panoptic_Evaluator
from panoptica.panoptic_evaluator import Panoptic_Evaluator
from panoptica.panoptic_result import PanopticaResult
from panoptica.utils.processing_pair import (
SemanticPair,
Expand Down
244 changes: 0 additions & 244 deletions panoptica/evaluator.py

This file was deleted.

4 changes: 2 additions & 2 deletions panoptica/instance_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

def evaluate_matched_instance(
matched_instance_pair: MatchedInstancePair,
eval_metrics: list[_MatchingMetric],
decision_metric: _MatchingMetric | None = None,
eval_metrics: list[_MatchingMetric] = [Metrics.DSC, Metrics.IOU, Metrics.ASSD],
decision_metric: _MatchingMetric | None = Metrics.IOU,
decision_threshold: float | None = None,
edge_case_handler: EdgeCaseHandler | None = None,
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/test_panoptic_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
import numpy as np

from panoptica.evaluator import Panoptic_Evaluator
from panoptica.panoptic_evaluator import Panoptic_Evaluator
from panoptica.instance_approximator import ConnectedComponentsInstanceApproximator
from panoptica.instance_matcher import NaiveThresholdMatching

Expand Down

0 comments on commit df6e9b3

Please sign in to comment.