Revert "much stricter ruff linting"

This reverts commit 310dbf1574.
This commit is contained in:
Vladimir Mandic
2026-05-11 08:13:57 +02:00
parent 8296d07ff8
commit c8d6fd5cf8
132 changed files with 363 additions and 292 deletions
+4 -3
View File
@@ -9,6 +9,7 @@ Copyright 2021-present NAVER Corp.
Apache License v2.0
'''
import os
import numpy as np
import cv2
import torch
@@ -21,7 +22,7 @@ def deccode_output_score_and_ptss(tpMap, topk_n = 200, ksize = 5):
center: tpMap[1, 0, :, :]
displacement: tpMap[1, 1:5, :, :]
'''
b, _c, _h, w = tpMap.shape
b, c, h, w = tpMap.shape
assert b==1, 'only support bsize==1'
displacement = tpMap[:, 1:5, :, :][0]
center = tpMap[:, 0, :, :]
@@ -470,9 +471,9 @@ def pred_squares(image,
square[end_idx]
# check whether outside or inside
_start_position, start_min, start_cover_param, start_peri_param = check_outside_inside(start_segments,
start_position, start_min, start_cover_param, start_peri_param = check_outside_inside(start_segments,
connect_idx)
_end_position, end_min, end_cover_param, end_peri_param = check_outside_inside(end_segments, connect_idx)
end_position, end_min, end_cover_param, end_peri_param = check_outside_inside(end_segments, connect_idx)
cover += dist_segments[connect_idx] + start_cover_param * start_min + end_cover_param * end_min
perimeter += dist_segments[connect_idx] + start_peri_param * start_min + end_peri_param * end_min