File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,22 @@ def remove_overlaps_min_blocks(res_list):
249249
250250
251251def remove_overlaps_low_confidence_blocks (combined_res_list , overlap_threshold = 0.8 ):
252+ """
253+ Remove low-confidence blocks that overlap with other blocks.
254+
255+ This function identifies and removes blocks with low confidence scores that overlap
256+ with other blocks. It calculates the coordinates and area of each block, and checks
257+ for overlaps based on a specified threshold. Blocks that meet the criteria for removal
258+ are returned in a list.
259+
260+ Parameters:
261+ combined_res_list (list): A list of blocks, where each block is a dictionary containing
262+ keys like 'poly' (polygon coordinates) and optionally 'score' (confidence score).
263+ overlap_threshold (float): The threshold for determining overlap between blocks. Default is 0.8.
264+
265+ Returns:
266+ list: A list of blocks to be removed, based on the overlap and confidence criteria.
267+ """
252268 # 计算每个block的坐标和面积
253269 block_info = []
254270 for block in combined_res_list :
You can’t perform that action at this time.
0 commit comments