diff --git a/vidocp/utils/post_processing.py b/vidocp/utils/post_processing.py index 88f0545..86bd37f 100644 --- a/vidocp/utils/post_processing.py +++ b/vidocp/utils/post_processing.py @@ -26,8 +26,7 @@ def remove_included(rectangles): def is_not_included(rect, rectangles): return not any(included(r2, rect) for r2 in rectangles if not rect == r2) - return not any(includes(r2, rect) for r2 in rectangles if not rect == r2) - + rectangles = list(map(xywh_to_vec_rect, rectangles)) rectangles = filter(partial(is_not_included, rectangles=rectangles), rectangles) rectangles = map(vec_rect_to_xywh, rectangles) @@ -132,7 +131,6 @@ def xywh_to_vecs(rect): x2 = x1 + w y2 = y1 + h return Rectangle(x1, y1, x2, y2) - return (x1, y1), (x2, y2) def vec_rect_to_xywh(rect):