Refactoring
Rename module
This commit is contained in:
parent
9d2f166fbf
commit
eee2f0e256
@ -11,7 +11,7 @@ from cv_analysis.utils.filters import (
|
||||
is_not_too_large,
|
||||
)
|
||||
from cv_analysis.utils.postprocessing import remove_included
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
|
||||
|
||||
def detect_figures(image: np.array):
|
||||
|
||||
@ -8,7 +8,7 @@ import numpy as np
|
||||
|
||||
|
||||
from cv_analysis.utils.connect_rects import connect_related_rects2
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
from cv_analysis.utils.postprocessing import (
|
||||
remove_overlapping,
|
||||
remove_included,
|
||||
|
||||
@ -5,7 +5,7 @@ from funcy import lmap, flatten
|
||||
|
||||
from cv_analysis.figure_detection.figure_detection import detect_figures
|
||||
from cv_analysis.table_parsing import parse_tables
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
from pdf2img.conversion import convert_pages_to_images
|
||||
from pdf2img.default_objects.image import ImagePlus, ImageInfo
|
||||
from pdf2img.default_objects.rectangle import RectanglePlus
|
||||
|
||||
@ -8,7 +8,7 @@ from funcy import lmap, lfilter
|
||||
|
||||
from cv_analysis.layout_parsing import parse_layout
|
||||
from cv_analysis.utils.postprocessing import remove_isolated # xywh_to_vecs, xywh_to_vec_rect, adjacent1d
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
from cv_analysis.utils.visual_logging import vizlogger
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ from functools import partial
|
||||
from itertools import starmap, compress
|
||||
from typing import Iterable, List
|
||||
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
|
||||
|
||||
def remove_overlapping(rectangles: Iterable[Rectangle]) -> List[Rectangle]:
|
||||
|
||||
@ -10,7 +10,7 @@ from funcy import juxt, rpartial, compose, lflatten
|
||||
from cv_analysis.utils import lift
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
|
||||
|
||||
def adjacent(alpha: Rectangle, beta: Rectangle, tolerance=7):
|
||||
|
||||
@ -5,7 +5,7 @@ import numpy as np
|
||||
from funcy import lmap, lpluck
|
||||
|
||||
from cv_analysis.utils import lift
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
|
||||
|
||||
def find_max_overlap(box: Rectangle, box_list: Iterable[Rectangle]):
|
||||
|
||||
2
test/fixtures/server.py
vendored
2
test/fixtures/server.py
vendored
@ -6,7 +6,7 @@ import cv2
|
||||
import pytest
|
||||
from funcy import first
|
||||
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@ -3,7 +3,7 @@ import numpy as np
|
||||
import pytest
|
||||
|
||||
from cv_analysis.server.pipeline import table_parsing_formatter, figure_detection_formatter, make_analysis_pipeline
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
|
||||
|
||||
def analysis_fn_mock(image: np.ndarray):
|
||||
|
||||
@ -6,7 +6,7 @@ from funcy import lmap, compose
|
||||
|
||||
from cv_analysis.table_parsing import parse_tables
|
||||
from cv_analysis.utils import lift
|
||||
from cv_analysis.utils.structures import Rectangle
|
||||
from cv_analysis.utils.rectangle import Rectangle
|
||||
from cv_analysis.utils.test_metrics import compute_document_score
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user