Skip to content

Commit

Permalink
sorting imports
Browse files Browse the repository at this point in the history
Signed-off-by: neuronflow <[email protected]>
  • Loading branch information
neuronflow committed Feb 1, 2024
1 parent e1f7ba8 commit 5b2caf1
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion panoptica/_functionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from panoptica.metrics import _compute_instance_iou, Metric
from panoptica.metrics import Metric, _compute_instance_iou
from panoptica.utils.constants import CCABackend
from panoptica.utils.numpy_utils import _get_bbox_nd

Expand Down
14 changes: 8 additions & 6 deletions panoptica/instance_approximator.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
from abc import abstractmethod, ABC
from abc import ABC, abstractmethod

import numpy as np

from panoptica._functionals import CCABackend, _connected_components
from panoptica.timing import measure_time
from panoptica.utils.numpy_utils import _get_smallest_fitting_uint
from panoptica.utils.processing_pair import (
MatchedInstancePair,
SemanticPair,
UnmatchedInstancePair,
MatchedInstancePair,
)
from panoptica._functionals import _connected_components, CCABackend
from panoptica.utils.numpy_utils import _get_smallest_fitting_uint
from panoptica.timing import measure_time
import numpy as np


class InstanceApproximator(ABC):
Expand Down
3 changes: 2 additions & 1 deletion panoptica/instance_evaluator.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from multiprocessing import Pool

import numpy as np

from panoptica.metrics import Metric
from panoptica.panoptic_result import PanopticaResult
from panoptica.utils import EdgeCaseHandler
from panoptica.utils.processing_pair import MatchedInstancePair
from panoptica.metrics import Metric


def evaluate_matched_instance(
Expand Down
2 changes: 1 addition & 1 deletion panoptica/metrics/cldice.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from skimage.morphology import skeletonize, skeletonize_3d
import numpy as np
from skimage.morphology import skeletonize, skeletonize_3d


def cl_score(volume: np.ndarray, skeleton: np.ndarray):
Expand Down
4 changes: 2 additions & 2 deletions panoptica/panoptic_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
from panoptica.instance_approximator import InstanceApproximator
from panoptica.instance_evaluator import evaluate_matched_instance
from panoptica.instance_matcher import InstanceMatchingAlgorithm
from panoptica.metrics import Metric, _Metric, Metric
from panoptica.metrics import Metric, _Metric
from panoptica.panoptic_result import PanopticaResult
from panoptica.timing import measure_time
from panoptica.utils import EdgeCaseHandler
from panoptica.utils.citation_reminder import citation_reminder
from panoptica.utils.processing_pair import (
MatchedInstancePair,
SemanticPair,
UnmatchedInstancePair,
_ProcessingPair,
)
from panoptica.utils.citation_reminder import citation_reminder


class Panoptic_Evaluator:
Expand Down
14 changes: 7 additions & 7 deletions panoptica/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from panoptica.utils.edge_case_handling import (
EdgeCaseHandler,
EdgeCaseResult,
EdgeCaseZeroTP,
)
from panoptica.utils.numpy_utils import (
_count_unique_without_zeros,
_unique_without_zeros,
)
from panoptica.utils.processing_pair import (
InstanceLabelMap,
MatchedInstancePair,
SemanticPair,
UnmatchedInstancePair,
MatchedInstancePair,
InstanceLabelMap,
)
from panoptica.utils.edge_case_handling import (
EdgeCaseHandler,
EdgeCaseResult,
EdgeCaseZeroTP,
)

# from utils.constants import
2 changes: 1 addition & 1 deletion panoptica/utils/edge_case_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from panoptica.metrics import Metric, Metric
from panoptica.metrics import Metric
from panoptica.utils.constants import _Enum_Compare, auto


Expand Down
2 changes: 1 addition & 1 deletion panoptica/utils/processing_pair.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import numpy as np
from numpy import dtype

from panoptica.utils import _count_unique_without_zeros, _unique_without_zeros
from panoptica._functionals import _get_paired_crop
from panoptica.utils import _count_unique_without_zeros, _unique_without_zeros

uint_type: type = np.unsignedinteger
int_type: type = np.integer
Expand Down

0 comments on commit 5b2caf1

Please sign in to comment.