Delete detect.py
Browse files
detect.py
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 1 |
-
import easyocr
|
| 2 |
-
import os
|
| 3 |
-
|
| 4 |
-
current_directory = os.getcwd()
|
| 5 |
-
def detect_OCR(image, is_paragraph=False, x_thresh=1.2, y_thresh=0.5):
|
| 6 |
-
reader = easyocr.Reader(['tr'], gpu=True, model_storage_directory=f"{current_directory}/model", user_network_directory=f"{current_directory}/user_network", download_enabled=False)
|
| 7 |
-
result = reader.readtext(image, min_size=50, detail=0, paragraph=is_paragraph, width_ths=x_thresh, height_ths=y_thresh, blocklist="|[]{}")
|
| 8 |
-
return result
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|