-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# @Author: SWHL | ||
# @Contact: [email protected] | ||
import copy | ||
import logging | ||
from pathlib import Path | ||
from typing import List, Optional, Tuple, Union | ||
|
||
|
@@ -154,6 +155,9 @@ def auto_text_det( | |
use_limit_ratio = w / h > self.width_height_ratio | ||
|
||
if h <= self.min_height or use_limit_ratio: | ||
logging.warning( | ||
f"Because the aspect ratio of the current image exceeds the limit (min_height or width_height_ratio), the program will skip the detection step." | ||
) | ||
dt_boxes, img_crop_list = self.get_boxes_img_without_det(img, h, w) | ||
return dt_boxes, 0.0, img_crop_list | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# @Author: SWHL | ||
# @Contact: [email protected] | ||
import copy | ||
import logging | ||
from pathlib import Path | ||
from typing import List, Optional, Tuple, Union | ||
|
||
|
@@ -154,6 +155,9 @@ def auto_text_det( | |
use_limit_ratio = w / h > self.width_height_ratio | ||
|
||
if h <= self.min_height or use_limit_ratio: | ||
logging.warning( | ||
f"Because the aspect ratio of the current image exceeds the limit (min_height or width_height_ratio), the program will skip the detection step." | ||
) | ||
dt_boxes, img_crop_list = self.get_boxes_img_without_det(img, h, w) | ||
return dt_boxes, 0.0, img_crop_list | ||
|
||
|