You've already forked MineEVECraft
mirror of
https://github.com/Llloooggg/MineEVECraft.git
synced 2026-03-06 03:36:24 +03:00
Сортировка мусорных боксов
This commit is contained in:
8
main.py
8
main.py
@@ -22,6 +22,8 @@ logging.basicConfig(
|
|||||||
|
|
||||||
save_result = True
|
save_result = True
|
||||||
|
|
||||||
|
pd.options.mode.use_inf_as_na = True
|
||||||
|
|
||||||
|
|
||||||
def save_highlighted_screenshot(screenshot, boxes, filename):
|
def save_highlighted_screenshot(screenshot, boxes, filename):
|
||||||
new_image = screenshot.copy()
|
new_image = screenshot.copy()
|
||||||
@@ -103,7 +105,11 @@ def get_boxes(screenshot):
|
|||||||
if save_result:
|
if save_result:
|
||||||
raw_boxes.to_excel("xlsx/0_raw_boxes.xlsx", index=False)
|
raw_boxes.to_excel("xlsx/0_raw_boxes.xlsx", index=False)
|
||||||
|
|
||||||
base_boxes = raw_boxes.loc[raw_boxes["text"].str.len() > 3]
|
base_boxes = raw_boxes.loc[
|
||||||
|
(raw_boxes["conf"] > 30)
|
||||||
|
& (raw_boxes["text"].notnull())
|
||||||
|
& (raw_boxes["text"].str.isalnum())
|
||||||
|
]
|
||||||
|
|
||||||
if save_result:
|
if save_result:
|
||||||
save_highlighted_screenshot(
|
save_highlighted_screenshot(
|
||||||
|
|||||||
Reference in New Issue
Block a user