diff --git a/utils/debug_ocr_preprocessed/optimized_image_129042.png b/utils/debug_ocr_preprocessed/optimized_image_129042.png new file mode 100644 index 0000000..f3a4db1 Binary files /dev/null and b/utils/debug_ocr_preprocessed/optimized_image_129042.png differ diff --git a/utils/debug_ocr_preprocessed/optimized_image_129044.png b/utils/debug_ocr_preprocessed/optimized_image_129044.png new file mode 100644 index 0000000..2f124bb Binary files /dev/null and b/utils/debug_ocr_preprocessed/optimized_image_129044.png differ diff --git a/utils/debug_ocr_preprocessed/optimized_image_129046.png b/utils/debug_ocr_preprocessed/optimized_image_129046.png new file mode 100644 index 0000000..3e44e1d Binary files /dev/null and b/utils/debug_ocr_preprocessed/optimized_image_129046.png differ diff --git a/utils/debug_ocr_preprocessed/optimized_image_145435.png b/utils/debug_ocr_preprocessed/optimized_image_145435.png new file mode 100644 index 0000000..6715c1f Binary files /dev/null and b/utils/debug_ocr_preprocessed/optimized_image_145435.png differ diff --git a/utils/debug_ocr_preprocessed/optimized_image_145453.png b/utils/debug_ocr_preprocessed/optimized_image_145453.png new file mode 100644 index 0000000..7153435 Binary files /dev/null and b/utils/debug_ocr_preprocessed/optimized_image_145453.png differ diff --git a/utils/image_preparer.py b/utils/image_preparer.py new file mode 100644 index 0000000..b0b1d25 --- /dev/null +++ b/utils/image_preparer.py @@ -0,0 +1,23 @@ +from PIL import Image, ImageOps +from pathlib import Path + +BICUBIC = Image.Resampling.BICUBIC # Nouvelle façon d'accéder à BICUBIC + +def prepare_image_for_llama_vision(input_path: str, output_path: str, size=(672, 672)) -> str: + from PIL import ImageOps, Image + + img = Image.open(input_path) + if img.mode != "RGB": + img = img.convert("RGB") + + # Redimensionne en conservant le ratio + img.thumbnail(size, Image.Resampling.BICUBIC) + + # Ajoute du padding pour obtenir exactement 672x672 + padded_img = Image.new("RGB", size, (255, 255, 255)) # fond blanc + offset = ((size[0] - img.width) // 2, (size[1] - img.height) // 2) + padded_img.paste(img, offset) + + padded_img.save(output_path, format="PNG", optimize=True) + return output_path + diff --git a/utils/images_test/image_129042.png b/utils/images_test/image_129042.png new file mode 100644 index 0000000..4dcf658 Binary files /dev/null and b/utils/images_test/image_129042.png differ diff --git a/utils/images_test/image_129044.png b/utils/images_test/image_129044.png new file mode 100644 index 0000000..39a8cd5 Binary files /dev/null and b/utils/images_test/image_129044.png differ diff --git a/utils/images_test/image_129046.png b/utils/images_test/image_129046.png new file mode 100644 index 0000000..5d1c3fa Binary files /dev/null and b/utils/images_test/image_129046.png differ diff --git a/utils/images_test/image_145435.png b/utils/images_test/image_145435.png new file mode 100644 index 0000000..0c52bb7 Binary files /dev/null and b/utils/images_test/image_145435.png differ diff --git a/utils/images_test/image_145453.png b/utils/images_test/image_145453.png new file mode 100644 index 0000000..a1f39a5 Binary files /dev/null and b/utils/images_test/image_145453.png differ diff --git a/utils/ocr_cleaner.py b/utils/ocr_cleaner.py index 969ad77..a2925f8 100644 --- a/utils/ocr_cleaner.py +++ b/utils/ocr_cleaner.py @@ -1,30 +1,58 @@ import json from pathlib import Path -# Emplacement du dictionnaire JSON -DICT_PATH = Path(__file__).parent / "ocr_clean_dict.json" +# 🧩 Dictionnaires disponibles (clés = profils activables) +CLEAN_DICT_FILES = { + "ocr": "ocr_clean_dict.json", + "translation": "translation_clean_dict.json", + "hallucination": "hallucination_filter.json" +} -def load_cleaning_dict(path=DICT_PATH): - """Charge le dictionnaire de nettoyage depuis un fichier JSON.""" +# 📁 Chemin racine de tous les dictionnaires +BASE_PATH = Path(__file__).parent + +def load_cleaning_dict(path): + """Charge un dictionnaire de nettoyage JSON.""" if not path.exists(): return {} with open(path, "r", encoding="utf-8") as f: return json.load(f) +def load_multiple_dicts(active_keys): + """Charge et fusionne plusieurs dictionnaires selon les profils sélectionnés.""" + merged_dict = {} + for key in active_keys: + filename = CLEAN_DICT_FILES.get(key) + if filename: + path = BASE_PATH / filename + data = load_cleaning_dict(path) + merged_dict.update(data) + return merged_dict + def clean_ocr_text(text, cleaning_dict=None): - """ - Applique les corrections du dictionnaire à un texte OCR ou traduit. - """ + """Applique les corrections d’un dictionnaire sur un texte.""" if cleaning_dict is None: - cleaning_dict = load_cleaning_dict() + return text for wrong, correct in cleaning_dict.items(): text = text.replace(wrong, correct) return text -def add_to_cleaning_dict(wrong, correct, path=DICT_PATH): +def clean_text_with_profiles(text, active_profiles=("ocr",)): """ - Ajoute une nouvelle paire d'erreur/correction au dictionnaire. + Nettoie un texte avec un ou plusieurs profils activés. + Profils possibles : "ocr", "translation", "hallucination" """ + cleaning_dict = load_multiple_dicts(active_profiles) + return clean_ocr_text(text, cleaning_dict) + +def add_to_cleaning_dict(wrong, correct, profile="ocr"): + """ + Ajoute une paire (erreur, correction) à un dictionnaire spécifique. + """ + filename = CLEAN_DICT_FILES.get(profile) + if not filename: + raise ValueError(f"Profil inconnu : {profile}") + path = BASE_PATH / filename data = load_cleaning_dict(path) data[wrong] = correct with open(path, "w", encoding="utf-8") as f: diff --git a/utils/ocr_preprocessor.py b/utils/ocr_preprocessor.py new file mode 100644 index 0000000..5440d8c --- /dev/null +++ b/utils/ocr_preprocessor.py @@ -0,0 +1,125 @@ +# ocr_preprocessor.py + +import os +from PIL import Image, ImageEnhance +import cv2 +import numpy as np +import time + +# === 🎛️ PROFILS DE TRAITEMENT D'IMAGE OCR === +PREPROCESSING_PROFILES = { + "default": { + "resize_min_dim": 1000, # 📏 Si largeur/hauteur < 1000px, image agrandie proportionnellement + "enhance_contrast": True, # 🔆 Active l'amélioration du contraste + "contrast_factor": 1.2, # >1 = plus contrasté, typique : 1.2 à 1.8 + "enhance_sharpness": False, # 💥 Active la netteté + "sharpness_factor": 1.0, # >1 = plus net, typique : 1.2 à 2.0 + "apply_denoising": False, # 🚿 Réduction de bruit + "denoise_strength": { + "h": 0, # 0 à 15 : intensité du lissage luminance + "hColor": 0, # 0 à 15 : lissage chroma + "templateWindowSize": 7, # Taille du patch à comparer (typiquement 7) + "searchWindowSize": 21 # Zone autour du patch pour recherche (typiquement 21) + }, + "invert_colors": False, # ↕️ Inversion si texte clair sur fond sombre + "apply_clahe": False, # 📈 Égalisation du contraste local (utile en cas de zones très sombres/claires) + "save_debug_output": True, + "debug_output_dir": "debug_ocr_preprocessed" + }, + "aggressive": { + "resize_min_dim": 1400, + "enhance_contrast": True, + "contrast_factor": 1.8, + "enhance_sharpness": True, + "sharpness_factor": 1.5, + "apply_denoising": True, + "denoise_strength": { + "h": 10, + "hColor": 10, + "templateWindowSize": 7, + "searchWindowSize": 21 + }, + "invert_colors": False, + "apply_clahe": False, + "save_debug_output": True, + "debug_output_dir": "debug_ocr_preprocessed" + }, + "document": { + "resize_min_dim": 1100, + "enhance_contrast": True, + "contrast_factor": 1.2, + "enhance_sharpness": False, + "sharpness_factor": 1.0, + "apply_denoising": False, + "denoise_strength": {"h": 0, "hColor": 0, "templateWindowSize": 7, "searchWindowSize": 21}, + "invert_colors": False, + "apply_clahe": False, + "save_debug_output": True, + "debug_output_dir": "debug_ocr_preprocessed" + } + +} + +def preprocess_image(image_path: str, **settings) -> Image.Image: + img = Image.open(image_path).convert("RGB") + base_name = os.path.basename(image_path) + debug_dir = settings.get("debug_output_dir", "debug_ocr_preprocessed") + os.makedirs(debug_dir, exist_ok=True) + + # Redimensionnement + if settings.get("resize_min_dim", 0) > 0: + width, height = img.size + min_dim = min(width, height) + if min_dim < settings["resize_min_dim"]: + scale = settings["resize_min_dim"] / min_dim + new_size = (int(width * scale), int(height * scale)) + img = img.resize(new_size, Image.Resampling.BICUBIC) + + # Contraste + if settings.get("enhance_contrast", False): + enhancer = ImageEnhance.Contrast(img) + img = enhancer.enhance(settings.get("contrast_factor", 1.5)) + + # Netteté + if settings.get("enhance_sharpness", False): + enhancer = ImageEnhance.Sharpness(img) + img = enhancer.enhance(settings.get("sharpness_factor", 1.5)) + + # Convert to OpenCV image + img_cv = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR) + + # Débruitage + if settings.get("apply_denoising", False): + strength = settings.get("denoise_strength", {}) + img_cv = cv2.fastNlMeansDenoisingColored( + img_cv, + None, + h=strength.get("h", 10), + hColor=strength.get("hColor", 10), + templateWindowSize=strength.get("templateWindowSize", 7), + searchWindowSize=strength.get("searchWindowSize", 21) + ) + + # CLAHE + if settings.get("apply_clahe", False): + lab = cv2.cvtColor(img_cv, cv2.COLOR_BGR2LAB) + l, a, b = cv2.split(lab) + clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8, 8)) + cl = clahe.apply(l) + img_cv = cv2.merge((cl, a, b)) + img_cv = cv2.cvtColor(img_cv, cv2.COLOR_LAB2BGR) + + # Inversion + if settings.get("invert_colors", False): + img_cv = cv2.bitwise_not(img_cv) + + # Sauvegarde image prétraitée (debug) + if settings.get("save_debug_output", False): + debug_path = os.path.join(debug_dir, f"optimized_{base_name}") + cv2.imwrite(debug_path, img_cv) + + return Image.fromarray(cv2.cvtColor(img_cv, cv2.COLOR_BGR2RGB)) + +def preprocess_image_with_profile(image_path: str, profile_name="default") -> Image.Image: + settings = PREPROCESSING_PROFILES[profile_name] + return preprocess_image(image_path, **settings) diff --git a/utils/ocr_test_results/image_129042/aggressive/image.png b/utils/ocr_test_results/image_129042/aggressive/image.png new file mode 100644 index 0000000..4dcf658 Binary files /dev/null and b/utils/ocr_test_results/image_129042/aggressive/image.png differ diff --git a/utils/ocr_test_results/image_129042/aggressive/optimized.png b/utils/ocr_test_results/image_129042/aggressive/optimized.png new file mode 100644 index 0000000..7dd5bae Binary files /dev/null and b/utils/ocr_test_results/image_129042/aggressive/optimized.png differ diff --git a/utils/ocr_test_results/image_129042/aggressive/psm11.txt b/utils/ocr_test_results/image_129042/aggressive/psm11.txt new file mode 100644 index 0000000..b86b500 --- /dev/null +++ b/utils/ocr_test_results/image_129042/aggressive/psm11.txt @@ -0,0 +1,33 @@ +Mes paramètres - Gestion des utilisateurs + +Affiche les laboratoires secondaires + +Affiche les utilisateurs non valides + +Laboratoire + +CHAUSSON MATERIAUX : CAMBOUNET + +russoloa + +RUSSOLO Arnaud + +"Formulation de béton, Ingénieur, | + +SUR LE SOR * + +Responsable national, Opérateur + +Formulation de béton, Ingénieur, | + +CHAUSSON MATERIAUX : CAVAILLON * + +sabatiep + +SABATIE Peter + +CUALICCON AAATERIAIITY - CAZVEREC CIIR + +Responsable national, Operateur + +Adminictratoaiir Earmitlatinn doh; \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/aggressive/psm12.txt b/utils/ocr_test_results/image_129042/aggressive/psm12.txt new file mode 100644 index 0000000..dee6544 --- /dev/null +++ b/utils/ocr_test_results/image_129042/aggressive/psm12.txt @@ -0,0 +1,47 @@ +Mes paramètres - Gestion des utilisateurs + +Affiche les laboratoires secondaires + +Affiche les utilisateurs non valides + +v + +Laboratoire + +v + +Ÿ + +Nom + +Ÿ + +von >; + +Y + +CHAUSSON MATERIAUX : CAMBOUNET + +russoloa + +RUSSOLO Arnaud + +Formulation de béton, Ingénieur, | + +SUR LE SOR * + +Responsable national, Opérateur + +Formulation de béton, Ingénieur, | + +CHAUSSON MATÉRIAUX : CAVAILLON * + +sabatiep + +SABATIE Peter + +CLIALTICCON AAATÉRIAIIY - CAZEREC clip + +Responsable national, Operateur + +Adminictratoaiir Earmitlatinn doh; \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/aggressive/psm3.txt b/utils/ocr_test_results/image_129042/aggressive/psm3.txt new file mode 100644 index 0000000..ad03b03 --- /dev/null +++ b/utils/ocr_test_results/image_129042/aggressive/psm3.txt @@ -0,0 +1,46 @@ +Mes paramètres - Gestion des utilisateurs + +NOUVEAU MODIFIER + +Vv + +Laboratoire + +CHAUSSON MATERIAUX : CAMBOUNET +SUR LE SOR * + +CHAUSSON MATERIAUX : CAVAILLON * +CLIALTICCON AAATÉRIAIIY - CAZEREC QIIR + +SUPPRIMER + +von >; + +russoloa + +sabatiep + +Affiche les laboratoires secondaires + +“a +v + +RUSSOLO Arnaud + +SABATIE Peter + +Nom + +Affiche les utilisateurs non valides + +Y + +“a +v + +Formulation de béton, Ingénieur, | +Responsable national, Opérateur +Formulation de béton, Ingénieur, | + +Responsable national, Opérateur +Anminietrateur Enrmuilatinn doh; \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/aggressive/psm4.txt b/utils/ocr_test_results/image_129042/aggressive/psm4.txt new file mode 100644 index 0000000..02fe169 --- /dev/null +++ b/utils/ocr_test_results/image_129042/aggressive/psm4.txt @@ -0,0 +1,11 @@ +Mes paramètres - Gestion des utilisateurs + +CHAUSSON MATÉRIAUX : CAMBOUNET russoloa RUSSOLO Arnaud wee ormulation de beton, Ingenieur, | +SUR LE SOR * Responsable national, Operateur + +| Formulation de béton, Ingénieur, | +CHAUSSON MATERIAUX : CAVAILLON sabatiep SABATIE Peter Responsable national, Opérateur + +CLIALTICCON AAATÉRIAIIY - CAZEREC clip Adminictratoaiir Earmitlatinn doh; + +Affiche les laboratoires secondaires Affiche les utilisateurs non valides \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/aggressive/psm6.txt b/utils/ocr_test_results/image_129042/aggressive/psm6.txt new file mode 100644 index 0000000..1453f6e --- /dev/null +++ b/utils/ocr_test_results/image_129042/aggressive/psm6.txt @@ -0,0 +1,7 @@ +Mes paramètres - Gestion des utilisateurs +NOUVEAU MODIFIER SUPPRIMER Affiche les laboratoires secondaires Affiche les utilisateurs non valides +CHAUSSON MATÉRIAUX : CAMBOUNET Formulation de béton, Ingénieur, | +SUR LE SOR * russoloa RUSSOLO Arnaud Responsable national, Operateur + | , Formulation de béton, Ingénieur, | +CHAUSSON MATERIAUX : CAVAILLON sabatiep SABATIE Peter Responsable national, Opérateur +CLIALTICCON AAATÉRIAIIY - CAZEREC clip Adminictratoaiir Earmitlatinn doh; \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/default/image.png b/utils/ocr_test_results/image_129042/default/image.png new file mode 100644 index 0000000..4dcf658 Binary files /dev/null and b/utils/ocr_test_results/image_129042/default/image.png differ diff --git a/utils/ocr_test_results/image_129042/default/optimized.png b/utils/ocr_test_results/image_129042/default/optimized.png new file mode 100644 index 0000000..94406ff Binary files /dev/null and b/utils/ocr_test_results/image_129042/default/optimized.png differ diff --git a/utils/ocr_test_results/image_129042/default/psm11.txt b/utils/ocr_test_results/image_129042/default/psm11.txt new file mode 100644 index 0000000..d213a60 --- /dev/null +++ b/utils/ocr_test_results/image_129042/default/psm11.txt @@ -0,0 +1,33 @@ +Mes paramètres - Gestion des utilisateurs + +Affiche les laboratoires secondaires + +Affiche les utilisateurs non valides + +Laboratoire + +CHAUSSON MATÉRIAUX : CAMBOUNET + +russoloa + +RUSSOLO Arnaud + +DETTES de béton, Ingénieur, | + +SUR LE SOR * + +Responsable national, Opérateur + +Formulation de béton, Ingénieur, | + +CHAUSSON MATERIAUX : CAVAILLON * + +sabatiep + +SABATIE Peter + +CWUALICCOAN! AAATERIAITY - CAVEREC QI + +Responsable national, Operateur + +Adminictrataitr FCarmitlatinn do h, \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/default/psm12.txt b/utils/ocr_test_results/image_129042/default/psm12.txt new file mode 100644 index 0000000..f04ddf1 --- /dev/null +++ b/utils/ocr_test_results/image_129042/default/psm12.txt @@ -0,0 +1,49 @@ +Mes paramètres - Gestion des utilisateurs + +Affiche les laboratoires secondaires + +Affiche les utilisateurs non valides + +“a + +LA + +Laboratoire + +v + +Ÿ + +Nom + +LA + +D um + +Lé + +CHAUSSON MATÉRIAUX : CAMBOUNET + +russoloa + +RUSSOLO Arnaud + +Formulation de béton, Ingénieur, | + +SUR LE SOR * + +Responsable national, Opérateur + +Formulation de béton, Ingénieur, | + +CHAUSSON MATÉRIAUX : CAVAILLON * + +sabatiep + +SABATIE Peter + +CLIATICCON AAATÉRIALIY - CAZVEREC QI IR + +Responsable national, Opérateur + +Adminictrataitr Enrmuilatinn do h, \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/default/psm3.txt b/utils/ocr_test_results/image_129042/default/psm3.txt new file mode 100644 index 0000000..15dbafa --- /dev/null +++ b/utils/ocr_test_results/image_129042/default/psm3.txt @@ -0,0 +1,41 @@ +Mes paramètres - Gestion des utilisateurs + +NOUVEAU MODIFIER SUPPRIMER + +~ Laboratoire + +CHAUSSON MATERIAUX : CAMBOUNET +SUR LE SOR * + +CHAUSSON MATÉRIAUX : CAVAILLON * +CWUALICCOAN AAATÉRIAI IY -CAVEREC QI IR + +D um ; + +russoloa + +sabatiep + +Affiche les laboratoires secondaires + +“a +v + +RUSSOLO Arnaud + +SABATIE Peter + +Nom + +Affiche les utilisateurs non valides + +Y + +“a +LA + +Formulation de béton, Ingénieur, | +Responsable national, Opérateur +Formulation de béton, Ingénieur, | +Responsable national, Opérateur +Adminictrataitr Enrmuilatinn do h, \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/default/psm4.txt b/utils/ocr_test_results/image_129042/default/psm4.txt new file mode 100644 index 0000000..c366d4a --- /dev/null +++ b/utils/ocr_test_results/image_129042/default/psm4.txt @@ -0,0 +1,9 @@ +Mes paramètres - Gestion des utilisateurs + Affiche les laboratoires secondaires Affiche les utilisateurs non valides + +CHAUSSON MATÉRIAUX : CAMBOUNET Te RUSSOLO Arnaud DETTES de béton, Ingénieur, | +SUR LE SOR * Responsable national, Opérateur + +: | , | Formulation de béton, Ingénieur, | +CHAUSSON MATERIAUX : CAVAILLON sabatiep SABATIE Peter Responsable national, Opérateur +CLIATICCON AAATÉRIALIY - CAZVEREC QI IR Adminictrataitr Enrmuilatinn do h, \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/default/psm6.txt b/utils/ocr_test_results/image_129042/default/psm6.txt new file mode 100644 index 0000000..afe071d --- /dev/null +++ b/utils/ocr_test_results/image_129042/default/psm6.txt @@ -0,0 +1,7 @@ +Mes paramètres - Gestion des utilisateurs +NOUVEAU MODIFIER SUPPRIMER Affiche les laboratoires secondaires Affiche les utilisateurs non valides +CHAUSSON MATÉRIAUX : CAMBOUNET Formulation de béton, Ingénieur, | +SUR LE SOR * russoloa RUSSOLO Amaud Responsable national, Operateur +: | , | Formulation de béton, Ingénieur, | +CHAUSSON MATERIAUX : CAVAILLON sabatiep SABATIE Peter Responsable national, Opérateur +CLIATICCON AAATÉRIALIY - CAZVEREC QI IR Adminictrataitr Enrmuilatinn do h, \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/document/image.png b/utils/ocr_test_results/image_129042/document/image.png new file mode 100644 index 0000000..4dcf658 Binary files /dev/null and b/utils/ocr_test_results/image_129042/document/image.png differ diff --git a/utils/ocr_test_results/image_129042/document/optimized.png b/utils/ocr_test_results/image_129042/document/optimized.png new file mode 100644 index 0000000..4df656a Binary files /dev/null and b/utils/ocr_test_results/image_129042/document/optimized.png differ diff --git a/utils/ocr_test_results/image_129042/document/psm11.txt b/utils/ocr_test_results/image_129042/document/psm11.txt new file mode 100644 index 0000000..e957687 --- /dev/null +++ b/utils/ocr_test_results/image_129042/document/psm11.txt @@ -0,0 +1,35 @@ +Mes paramètres - Gestion des utilisateurs + +Affiche les laboratoires secondaires + +Affiche les utilisateurs non valides + ++ + +Laboratoire + +CHAUSSON MATERIAUX : CAMBOUNET + +russoloa + +RUSSOLO Arnaud + +Sas de béton, Ingénieur, | + +SUR LE SOR * + +Responsable national, Operateur + +Formulation de béton, Ingénieur, | + +CHAUSSON MATERIAUX : CAVAILLON * + +sabatiep + +SABATIE Peter + +CUALICCON AAATERIAIIY - CAVEREC CIIPR + +Responsable national, Opérateur + +nAminietratour Enrmulatinn doa h;, \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/document/psm12.txt b/utils/ocr_test_results/image_129042/document/psm12.txt new file mode 100644 index 0000000..88eb39f --- /dev/null +++ b/utils/ocr_test_results/image_129042/document/psm12.txt @@ -0,0 +1,47 @@ +Mes paramètres - Gestion des utilisateurs + +Affiche les laboratoires secondaires + +Affiche les utilisateurs non valides + +v + +Laboratoire + +v + +Ÿ + +Nom + +Ÿ + +a + +Y + +CHAUSSON MATERIAUX : CAMBOUNET + +russoloa + +RUSSOLO Arnaud + +Formulation de béton, Ingénieur, | + +SUR LE SOR * + +Responsable national, Operateur + +Formulation de béton, Ingénieur, | + +CHAUSSON MATERIAUX : CAVAILLON * + +sabatiep + +SABATIE Peter + +CLIATICCON AAATÉRIAIIY -CAZVEREC CIP + +Responsable national, Opérateur + +Adminictratoiir FEarmitlatinn do h, \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/document/psm3.txt b/utils/ocr_test_results/image_129042/document/psm3.txt new file mode 100644 index 0000000..3c72c8f --- /dev/null +++ b/utils/ocr_test_results/image_129042/document/psm3.txt @@ -0,0 +1,11 @@ +Mes paramètres - Gestion des utilisateurs + +CHAUSSON MATÉRIAUX : CAMBOUNET solos RUSSOLO Arnaud Formulation de béton, Ingénieur, | +SUR LE SOR * Responsable national, Opérateur + + | , ; Formulation de béton, Ingénieur, | +CHAUSSON MATERIAUX : CAVAILLON sabatiep SABATIE Peter Responsable national, Opérateur + +CLIATICCON AAATÉRIAIIY -CAZVEREC CIP Adminictratoiir FEarmitlatinn do h; + +Affiche les laboratoires secondaires Affiche les utilisateurs non valides \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/document/psm4.txt b/utils/ocr_test_results/image_129042/document/psm4.txt new file mode 100644 index 0000000..cf3f8b3 --- /dev/null +++ b/utils/ocr_test_results/image_129042/document/psm4.txt @@ -0,0 +1,11 @@ +Mes paramètres - Gestion des utilisateurs + +CHAUSSON MATÉRIAUX : CAMBOUNET solos RUSSOLO Arnaud Sas de béton, Ingénieur, | +SUR LE SOR * Responsable national, Opérateur + + | , ; Formulation de béton, Ingénieur, | +CHAUSSON MATERIAUX : CAVAILLON sabatiep SABATIE Peter Responsable national, Opérateur + +CLIATICCON AAATÉRIAIIY -CAZVEREC CIP Adminictratoiir FEarmitlatinn do h; + +Affiche les laboratoires secondaires Affiche les utilisateurs non valides \ No newline at end of file diff --git a/utils/ocr_test_results/image_129042/document/psm6.txt b/utils/ocr_test_results/image_129042/document/psm6.txt new file mode 100644 index 0000000..d6f64c7 --- /dev/null +++ b/utils/ocr_test_results/image_129042/document/psm6.txt @@ -0,0 +1,7 @@ +Mes paramètres - Gestion des utilisateurs +NOUVEAU MODIFIER SUPPRIMER Affiche les laboratoires secondaires Affiche les utilisateurs non valides +CHAUSSON MATÉRIAUX : CAMBOUNET Formulation de béton, Ingénieur, | +SUR LE SOR * russoloa RUSSOLO Amaud Responsable national, Opérateur + | ; , Formulation de béton, Ingénieur, | +CHAUSSON MATERIAUX : CAVAILLON sabatiep SABATIE Peter Responsable national, Opérateur +CLIATICCON AAATÉRIAIIY -CAZVEREC CIP Adminictratoiir FEarmitlatinn do h; \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/aggressive/image.png b/utils/ocr_test_results/image_129044/aggressive/image.png new file mode 100644 index 0000000..39a8cd5 Binary files /dev/null and b/utils/ocr_test_results/image_129044/aggressive/image.png differ diff --git a/utils/ocr_test_results/image_129044/aggressive/optimized.png b/utils/ocr_test_results/image_129044/aggressive/optimized.png new file mode 100644 index 0000000..d4d31d7 Binary files /dev/null and b/utils/ocr_test_results/image_129044/aggressive/optimized.png differ diff --git a/utils/ocr_test_results/image_129044/aggressive/psm11.txt b/utils/ocr_test_results/image_129044/aggressive/psm11.txt new file mode 100644 index 0000000..19f194b --- /dev/null +++ b/utils/ocr_test_results/image_129044/aggressive/psm11.txt @@ -0,0 +1,15 @@ +mn D mm mt + +Affectation de l'utilisateur + +Laboratoire principal + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +© MH CHAUSSON MATERIAUX + += CAMBOUNET SUR LE SOR + +Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/aggressive/psm12.txt b/utils/ocr_test_results/image_129044/aggressive/psm12.txt new file mode 100644 index 0000000..19f194b --- /dev/null +++ b/utils/ocr_test_results/image_129044/aggressive/psm12.txt @@ -0,0 +1,15 @@ +mn D mm mt + +Affectation de l'utilisateur + +Laboratoire principal + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +© MH CHAUSSON MATERIAUX + += CAMBOUNET SUR LE SOR + +Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/aggressive/psm3.txt b/utils/ocr_test_results/image_129044/aggressive/psm3.txt new file mode 100644 index 0000000..689a08f --- /dev/null +++ b/utils/ocr_test_results/image_129044/aggressive/psm3.txt @@ -0,0 +1,14 @@ +mn D mm mt + +Affectation de l'utilisateur + +Laboratoire principal + +CHAUSSON MATÉRIAUX - CAMBOUNET SUR LE SOR < + +Laboratoires de l'utilisateur < + +Laboratoire(s) affilie(s) + +© MH CHAUSSON MATERIAUX +=) CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/aggressive/psm4.txt b/utils/ocr_test_results/image_129044/aggressive/psm4.txt new file mode 100644 index 0000000..689a08f --- /dev/null +++ b/utils/ocr_test_results/image_129044/aggressive/psm4.txt @@ -0,0 +1,14 @@ +mn D mm mt + +Affectation de l'utilisateur + +Laboratoire principal + +CHAUSSON MATÉRIAUX - CAMBOUNET SUR LE SOR < + +Laboratoires de l'utilisateur < + +Laboratoire(s) affilie(s) + +© MH CHAUSSON MATERIAUX +=) CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/aggressive/psm6.txt b/utils/ocr_test_results/image_129044/aggressive/psm6.txt new file mode 100644 index 0000000..f0ca5ed --- /dev/null +++ b/utils/ocr_test_results/image_129044/aggressive/psm6.txt @@ -0,0 +1,7 @@ +colle im es Sf ht el +. I . . +Affectation de l'utilisateur +Laboratoire principal CHAUSSON MATÉRIAUX - CAMBOUNET SUR LE SOR < +Laboratoire(s) affilié(s) Laboratoires de l'utilisateur < +© MH CHAUSSON MATERIAUX +=) CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/default/image.png b/utils/ocr_test_results/image_129044/default/image.png new file mode 100644 index 0000000..39a8cd5 Binary files /dev/null and b/utils/ocr_test_results/image_129044/default/image.png differ diff --git a/utils/ocr_test_results/image_129044/default/optimized.png b/utils/ocr_test_results/image_129044/default/optimized.png new file mode 100644 index 0000000..7d2d14d Binary files /dev/null and b/utils/ocr_test_results/image_129044/default/optimized.png differ diff --git a/utils/ocr_test_results/image_129044/default/psm11.txt b/utils/ocr_test_results/image_129044/default/psm11.txt new file mode 100644 index 0000000..0ade7f7 --- /dev/null +++ b/utils/ocr_test_results/image_129044/default/psm11.txt @@ -0,0 +1,27 @@ +me Ce + +Affectation de l'utilisateur + +— + +Laboratoire principal + +— + +N MATERIAUX + +_— + +E + +UNET SUR LE SC + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +=) ik} CHAUSSON MATERIAUX + +a CAMBOUNET SUR LE SOR + +supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/default/psm12.txt b/utils/ocr_test_results/image_129044/default/psm12.txt new file mode 100644 index 0000000..926082f --- /dev/null +++ b/utils/ocr_test_results/image_129044/default/psm12.txt @@ -0,0 +1,19 @@ +me Ce + +Affectation de l'utilisateur + +Laboratoire principal + +ATERIAI + +RLE + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +=) ik} CHAUSSON MATERIAUX + +a CAMBOUNET SUR LE SOR + +supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/default/psm3.txt b/utils/ocr_test_results/image_129044/default/psm3.txt new file mode 100644 index 0000000..da6f62d --- /dev/null +++ b/utils/ocr_test_results/image_129044/default/psm3.txt @@ -0,0 +1,12 @@ +me Ce + +Affectation de l'utilisateur + +Laboratoire principal + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +=) ik} CHAUSSON MATERIAUX +a CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/default/psm4.txt b/utils/ocr_test_results/image_129044/default/psm4.txt new file mode 100644 index 0000000..da6f62d --- /dev/null +++ b/utils/ocr_test_results/image_129044/default/psm4.txt @@ -0,0 +1,12 @@ +me Ce + +Affectation de l'utilisateur + +Laboratoire principal + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +=) ik} CHAUSSON MATERIAUX +a CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/default/psm6.txt b/utils/ocr_test_results/image_129044/default/psm6.txt new file mode 100644 index 0000000..494bc6e --- /dev/null +++ b/utils/ocr_test_results/image_129044/default/psm6.txt @@ -0,0 +1,6 @@ +. I . . +Affectation de l'utilisateur +Laboratoire principal CHAUSSON MATERIAUX - CAMBOUNET SUR LE SOR < +Laboratoire(s) affilié(s) Laboratoires de l'utilisateur < += Hi CHAUSSON MATÉRIAUX +«À CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/document/image.png b/utils/ocr_test_results/image_129044/document/image.png new file mode 100644 index 0000000..39a8cd5 Binary files /dev/null and b/utils/ocr_test_results/image_129044/document/image.png differ diff --git a/utils/ocr_test_results/image_129044/document/optimized.png b/utils/ocr_test_results/image_129044/document/optimized.png new file mode 100644 index 0000000..8b69599 Binary files /dev/null and b/utils/ocr_test_results/image_129044/document/optimized.png differ diff --git a/utils/ocr_test_results/image_129044/document/psm11.txt b/utils/ocr_test_results/image_129044/document/psm11.txt new file mode 100644 index 0000000..24720dd --- /dev/null +++ b/utils/ocr_test_results/image_129044/document/psm11.txt @@ -0,0 +1,23 @@ +me ee ee + +Affectation de l'utilisateur + +Laboratoire principal + +MATERIAUX + +_ + +E + +UNET SUR LE + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +© MH CHAUSSON MATÉRIAUX + +«À CAMBOUNET SUR LE SOR + +Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/document/psm12.txt b/utils/ocr_test_results/image_129044/document/psm12.txt new file mode 100644 index 0000000..269c2dc --- /dev/null +++ b/utils/ocr_test_results/image_129044/document/psm12.txt @@ -0,0 +1,19 @@ +me ee ee + +Affectation de l'utilisateur + +Laboratoire principal + +N MATERIAUX + +R LE + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +© MH CHAUSSON MATÉRIAUX + +«À CAMBOUNET SUR LE SOR + +Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/document/psm3.txt b/utils/ocr_test_results/image_129044/document/psm3.txt new file mode 100644 index 0000000..495d5cc --- /dev/null +++ b/utils/ocr_test_results/image_129044/document/psm3.txt @@ -0,0 +1,10 @@ +Affectation de l'utilisateur + +Laboratoire principal + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +© MH CHAUSSON MATERIAUX +«À CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/document/psm4.txt b/utils/ocr_test_results/image_129044/document/psm4.txt new file mode 100644 index 0000000..81eae84 --- /dev/null +++ b/utils/ocr_test_results/image_129044/document/psm4.txt @@ -0,0 +1,9 @@ +Affectation de l'utilisateur +Laboratoire principal CHAUSSON MATERIAUX - CAMBOUNET SUR LE SOR + +Laboratoire(s) affilie(s) + +Laboratoires de l'utilisateur + +© MH CHAUSSON MATERIAUX +«À CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129044/document/psm6.txt b/utils/ocr_test_results/image_129044/document/psm6.txt new file mode 100644 index 0000000..b425811 --- /dev/null +++ b/utils/ocr_test_results/image_129044/document/psm6.txt @@ -0,0 +1,6 @@ +nt péri iii mt Lot mt SY Lt el mn +. I . . +Affectation de l'utilisateur +Laboratoire(s) affilie(s) Laboratoires de l'utilisateur < +© MH CHAUSSON MATERIAUX +«À CAMBOUNET SUR LE SOR Supprimer \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/aggressive/image.png b/utils/ocr_test_results/image_129046/aggressive/image.png new file mode 100644 index 0000000..5d1c3fa Binary files /dev/null and b/utils/ocr_test_results/image_129046/aggressive/image.png differ diff --git a/utils/ocr_test_results/image_129046/aggressive/optimized.png b/utils/ocr_test_results/image_129046/aggressive/optimized.png new file mode 100644 index 0000000..8a2728c Binary files /dev/null and b/utils/ocr_test_results/image_129046/aggressive/optimized.png differ diff --git a/utils/ocr_test_results/image_129046/aggressive/psm11.txt b/utils/ocr_test_results/image_129046/aggressive/psm11.txt new file mode 100644 index 0000000..0817f80 --- /dev/null +++ b/utils/ocr_test_results/image_129046/aggressive/psm11.txt @@ -0,0 +1,23 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion + +Déposez votre photo + +ici + +Login: + +Motdepasse: ***** + +Mot de passe à saisir à la prochaine connexion + +Modifier la photo + +Langue + +Français + +SUPPRIMER PHOTO + +Infarmatinne eur litiliaataiir \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/aggressive/psm12.txt b/utils/ocr_test_results/image_129046/aggressive/psm12.txt new file mode 100644 index 0000000..0817f80 --- /dev/null +++ b/utils/ocr_test_results/image_129046/aggressive/psm12.txt @@ -0,0 +1,23 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion + +Déposez votre photo + +ici + +Login: + +Motdepasse: ***** + +Mot de passe à saisir à la prochaine connexion + +Modifier la photo + +Langue + +Français + +SUPPRIMER PHOTO + +Infarmatinne eur litiliaataiir \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/aggressive/psm3.txt b/utils/ocr_test_results/image_129046/aggressive/psm3.txt new file mode 100644 index 0000000..34451da --- /dev/null +++ b/utils/ocr_test_results/image_129046/aggressive/psm3.txt @@ -0,0 +1,11 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion +Déposez votre oe Login: Utilisateur valide +Motdepasse: ***** Mot de passe à saisir à la prochaine connexion +Langue Français v + +SUPPRIMER PHOTO +OBTENIR LAPPLICATION BRG-LAB MOBILE + +Infarmatinne eur litiliaataiir \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/aggressive/psm4.txt b/utils/ocr_test_results/image_129046/aggressive/psm4.txt new file mode 100644 index 0000000..ca55b83 --- /dev/null +++ b/utils/ocr_test_results/image_129046/aggressive/psm4.txt @@ -0,0 +1,12 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion +Déposez votre oe Login: Utilisateur valide +Motdepasse: ***** Mot de passe à saisir à la prochaine connexion +Langue Français v + +SUPPRIMER PHOTO + +OBTENIR LAPPLICATION BRG-LAB MOBILE + +Infarmatinne eur litiliaataiir \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/aggressive/psm6.txt b/utils/ocr_test_results/image_129046/aggressive/psm6.txt new file mode 100644 index 0000000..307e401 --- /dev/null +++ b/utils/ocr_test_results/image_129046/aggressive/psm6.txt @@ -0,0 +1,13 @@ +x e LE + +Mes paramètres - Gestion des utilisateurs +Connexion + +Déposez votre photo Login : + +Mot de passe: ***** Mot de passe à saisir à la prochaine connexion +Modifier la photo Langue Français v + +SUPPRIMER PHOTO + +Infarmatinne eur litiliaataiir \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/default/image.png b/utils/ocr_test_results/image_129046/default/image.png new file mode 100644 index 0000000..5d1c3fa Binary files /dev/null and b/utils/ocr_test_results/image_129046/default/image.png differ diff --git a/utils/ocr_test_results/image_129046/default/optimized.png b/utils/ocr_test_results/image_129046/default/optimized.png new file mode 100644 index 0000000..5e6c5a9 Binary files /dev/null and b/utils/ocr_test_results/image_129046/default/optimized.png differ diff --git a/utils/ocr_test_results/image_129046/default/psm11.txt b/utils/ocr_test_results/image_129046/default/psm11.txt new file mode 100644 index 0000000..9332a2f --- /dev/null +++ b/utils/ocr_test_results/image_129046/default/psm11.txt @@ -0,0 +1,23 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion + +Déposez votre photo + +ici + +Login : + +Mot de passe: ***** + +Mot de passe à saisir à la prochaine connexion + +Modifier la photo + +Langue + +Français + +SUPPRIMER PHOTO + +Imfnrmatinne eur l'iitilliaatoair \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/default/psm12.txt b/utils/ocr_test_results/image_129046/default/psm12.txt new file mode 100644 index 0000000..9332a2f --- /dev/null +++ b/utils/ocr_test_results/image_129046/default/psm12.txt @@ -0,0 +1,23 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion + +Déposez votre photo + +ici + +Login : + +Mot de passe: ***** + +Mot de passe à saisir à la prochaine connexion + +Modifier la photo + +Langue + +Français + +SUPPRIMER PHOTO + +Imfnrmatinne eur l'iitilliaatoair \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/default/psm3.txt b/utils/ocr_test_results/image_129046/default/psm3.txt new file mode 100644 index 0000000..7955456 --- /dev/null +++ b/utils/ocr_test_results/image_129046/default/psm3.txt @@ -0,0 +1,11 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion +Déposez Joue photo Login : Utilisateur valide +Mot de passe: ***** Mot de passe à saisir à la prochaine connexion +Langue Français v + +SUPPRIMER PHOTO +OBTENIR LAPPLICATION BRG-LAB MOBILE + +Infarmatinne eur l'iitilliaatoair \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/default/psm4.txt b/utils/ocr_test_results/image_129046/default/psm4.txt new file mode 100644 index 0000000..8dc2956 --- /dev/null +++ b/utils/ocr_test_results/image_129046/default/psm4.txt @@ -0,0 +1,12 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion +Déposez Joue photo Login : Utilisateur valide +Mot de passe: ***** Mot de passe à saisir à la prochaine connexion +Langue Français v + +SUPPRIMER PHOTO + +OBTENIR LAPPLICATION BRG-LAB MOBILE + +Infarmatinne eur l'iitilliaatoair \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/default/psm6.txt b/utils/ocr_test_results/image_129046/default/psm6.txt new file mode 100644 index 0000000..b22926f --- /dev/null +++ b/utils/ocr_test_results/image_129046/default/psm6.txt @@ -0,0 +1,13 @@ +D] Li LE + +Mes paramètres - Gestion des utilisateurs +Connexion + +Déposez votre photo Login : + +Mot de passe: ***** Mot de passe à saisir à la prochaine connexion +Modifier la photo Langue Français v + +SUPPRIMER PHOTO + +Infarmatinne eur l'iitilliaatoair \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/document/image.png b/utils/ocr_test_results/image_129046/document/image.png new file mode 100644 index 0000000..5d1c3fa Binary files /dev/null and b/utils/ocr_test_results/image_129046/document/image.png differ diff --git a/utils/ocr_test_results/image_129046/document/optimized.png b/utils/ocr_test_results/image_129046/document/optimized.png new file mode 100644 index 0000000..d834e85 Binary files /dev/null and b/utils/ocr_test_results/image_129046/document/optimized.png differ diff --git a/utils/ocr_test_results/image_129046/document/psm11.txt b/utils/ocr_test_results/image_129046/document/psm11.txt new file mode 100644 index 0000000..f071939 --- /dev/null +++ b/utils/ocr_test_results/image_129046/document/psm11.txt @@ -0,0 +1,23 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion + +Déposez votre photo + +ici + +Login : + +Mot de passe: ***** + +Mot de passe à saisir à la prochaine connexion + +Modifier la photo + +Langue + +Français + +SUPPRIMER PHOTO + +Infnrmatinne ctr luiitiliontaoinr \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/document/psm12.txt b/utils/ocr_test_results/image_129046/document/psm12.txt new file mode 100644 index 0000000..f071939 --- /dev/null +++ b/utils/ocr_test_results/image_129046/document/psm12.txt @@ -0,0 +1,23 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion + +Déposez votre photo + +ici + +Login : + +Mot de passe: ***** + +Mot de passe à saisir à la prochaine connexion + +Modifier la photo + +Langue + +Français + +SUPPRIMER PHOTO + +Infnrmatinne ctr luiitiliontaoinr \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/document/psm3.txt b/utils/ocr_test_results/image_129046/document/psm3.txt new file mode 100644 index 0000000..17adc88 --- /dev/null +++ b/utils/ocr_test_results/image_129046/document/psm3.txt @@ -0,0 +1,14 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion + +Déposez vous photo Login : Utilisateur valide + +Mot de passe: ***** Mot de passe à saisir à la prochaine connexion + +Langue Français v + +SUPPRIMER PHOTO +OBTENIR LAPPLICATION BRG-LAB MOBILE + +Infnrmatinne ctr ['iitiliaatoair \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/document/psm4.txt b/utils/ocr_test_results/image_129046/document/psm4.txt new file mode 100644 index 0000000..146a8cf --- /dev/null +++ b/utils/ocr_test_results/image_129046/document/psm4.txt @@ -0,0 +1,12 @@ +Mes paramètres - Gestion des utilisateurs + +Connexion +Déposez vous photo Login : Utilisateur valide +Mot de passe: ***** Mot de passe à saisir à la prochaine connexion +Langue Français v + +SUPPRIMER PHOTO + +OBTENIR LAPPLICATION BRG-LAB MOBILE + +Infnrmatinne ctr ['iitiliaatoair \ No newline at end of file diff --git a/utils/ocr_test_results/image_129046/document/psm6.txt b/utils/ocr_test_results/image_129046/document/psm6.txt new file mode 100644 index 0000000..a5fcb8b --- /dev/null +++ b/utils/ocr_test_results/image_129046/document/psm6.txt @@ -0,0 +1,8 @@ +* . LE +Mes paramètres - Gestion des utilisateurs +Connexion +Déposez votre photo Login : +Mot de passe: ***** Mot de passe à saisir à la prochaine connexion +Modifier la photo Langue Français v +SUPPRIMER PHOTO +Infnrmatinne ctr ['iitiliaatoair \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/aggressive/image.png b/utils/ocr_test_results/image_145435/aggressive/image.png new file mode 100644 index 0000000..0c52bb7 Binary files /dev/null and b/utils/ocr_test_results/image_145435/aggressive/image.png differ diff --git a/utils/ocr_test_results/image_145435/aggressive/optimized.png b/utils/ocr_test_results/image_145435/aggressive/optimized.png new file mode 100644 index 0000000..7e8378f Binary files /dev/null and b/utils/ocr_test_results/image_145435/aggressive/optimized.png differ diff --git a/utils/ocr_test_results/image_145435/aggressive/psm11.txt b/utils/ocr_test_results/image_145435/aggressive/psm11.txt new file mode 100644 index 0000000..777366e --- /dev/null +++ b/utils/ocr_test_results/image_145435/aggressive/psm11.txt @@ -0,0 +1,31 @@ +Cc + +~~ + +Qiraud.brg-lab.com/BRG-LAB/PAGE_programmeEssai/zE4 AAHDVNGQAA + +| BAGLAB CD Béton C2 Foumates Labo © Masse + +V1 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + +EE + +Victor + +Echantilion n° 25-00075 récephonné le 02/04/7025 par BOLLEE Victor - prélevé le 02/04/2025 par BOLLEE Victor, n° prélèvement 25-00075 + +Matériau Sable 0/2 C - CARRIERE ADCEG + +NREGISTRER + +WPROMER + +2025 + +IRE GIRAUD + +xr les statistiques + +A + +impossible de trouver l'adresse (P du serveur de zk1.brg-lab.com \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/aggressive/psm12.txt b/utils/ocr_test_results/image_145435/aggressive/psm12.txt new file mode 100644 index 0000000..51edb36 --- /dev/null +++ b/utils/ocr_test_results/image_145435/aggressive/psm12.txt @@ -0,0 +1,25 @@ +| BAGLAB CD Béton C2 Foumates Labo © Masse + +V1 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + +EE + +toe + +Echantilion n° 25-00075 récephonné le 02/04/7025 par BOLLEE Victor - prélevé le 02/04/2025 par BOLLEE Victor, n° prélèvement 25-00075 + +Matériau Sable 0/2 C - CARRIERE ADCEG + +NREGISTRER + +WPROMER + +2025 + +IRE GIRAUD + +ur les statistiques + +A + +impossible de trouver l'adresse (P du serveur de zk1.brg-lab.com \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/aggressive/psm3.txt b/utils/ocr_test_results/image_145435/aggressive/psm3.txt new file mode 100644 index 0000000..48b7dab --- /dev/null +++ b/utils/ocr_test_results/image_145435/aggressive/psm3.txt @@ -0,0 +1,8 @@ +Echantillon n° 25-00075 réceptonné le 02/04/7025 par BOLLEE Victor - prélevt le 02/04/2025 par BOLLEE Victor, n° prélèvement : 25-00075 +Motériou Sable 0/2 C - CARRIERE ADCEG + + © PORTFOUO || ~ OBSERVATIONS + +A + +impossible de trouver l'adresse (P du serveur de zk1.brg-lab.com \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/aggressive/psm4.txt b/utils/ocr_test_results/image_145435/aggressive/psm4.txt new file mode 100644 index 0000000..e8aecb5 --- /dev/null +++ b/utils/ocr_test_results/image_145435/aggressive/psm4.txt @@ -0,0 +1,14 @@ +C +5 girsud.brg-lab.com/BRG-LAB/PAGE_programmeEssai/zE4 AAHDVNGQAA + +| BAGLAB CD Béton C2 Foumates Labo © Masse + +V1 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + +Echantillon n° 25-00075 réceptonné le 02/04/7025 par BOLLEE Victor - prélevt le 02/04/2025 par BOLLEE Victor, n° prélèvement : 25-00075 +Motériou Sable 0/2 C - CARRIERE ADCEG + + © PORTFOUO || ~ OBSERVATIONS + +A + +impossible de trouver l'adresse (P du serveur de zk1.brg-lab.com \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/aggressive/psm6.txt b/utils/ocr_test_results/image_145435/aggressive/psm6.txt new file mode 100644 index 0000000..801bb28 --- /dev/null +++ b/utils/ocr_test_results/image_145435/aggressive/psm6.txt @@ -0,0 +1,13 @@ +C ‘3 girsud.brg-lab.com/BRG-LAB/PAGE_programmeEssai/zE4 AAHBVNGOAA +| BAGLAB CD Béton C2 Foumates Labo © Masse +“Te :1 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) +pe ME Echantilion n° 25-00075 réceptionné le 02/04/7025 par BOLLEE Victor - prélevé le 02/04/2025 par BOLLEE Victor, n° prélèvement : 25-0007 +dé Matériau Sable 0/2 C - CARRIERE ADCEG +NREGISTRER +WAPROMER += +IRE GIRAUD +xr les statistiques +se [essa +CRE +impossible de trouver Fadresse (P du serveur de zk1.brg-lab.com \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/default/image.png b/utils/ocr_test_results/image_145435/default/image.png new file mode 100644 index 0000000..0c52bb7 Binary files /dev/null and b/utils/ocr_test_results/image_145435/default/image.png differ diff --git a/utils/ocr_test_results/image_145435/default/optimized.png b/utils/ocr_test_results/image_145435/default/optimized.png new file mode 100644 index 0000000..1aa1ced Binary files /dev/null and b/utils/ocr_test_results/image_145435/default/optimized.png differ diff --git a/utils/ocr_test_results/image_145435/default/psm11.txt b/utils/ocr_test_results/image_145435/default/psm11.txt new file mode 100644 index 0000000..419cead --- /dev/null +++ b/utils/ocr_test_results/image_145435/default/psm11.txt @@ -0,0 +1,41 @@ +c + + + +J + +BAGLAB CD Béton C2 Foumsseurlado © Masse + +FAT :1 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + +Echantilion n°25-00075 réceptionné le 02/04/7025 par BOLLÉE Victor - prélevé le 02/04/2025 por BOLLEE Victor, n° prélèvement : 25-0075 + +£E Victor + +Motériou Sable 0/2 C - CARRIERE ADCEG + +[v ESSAI + +[w MATERIEL IE PORTFOUO IE OBSERVATIONS + +| [y smo | [¥ ristomoue + +12 + +NREGISTRER + +MAPRIMIER + +de l'essai + +2025 + +(RE GIRAUD + +pur les statistiques + +lessai + +A + +Impossible de trouver l'adeesse (P du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/default/psm12.txt b/utils/ocr_test_results/image_145435/default/psm12.txt new file mode 100644 index 0000000..0cd95b5 --- /dev/null +++ b/utils/ocr_test_results/image_145435/default/psm12.txt @@ -0,0 +1,35 @@ +BAGLAS CD Béton C2 Foumsseurlado © Masse + +FAT :1 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + +Echantilion n°25-00075 réceptionné le 02/04/7025 par BOLLÉE Victor - prélevé le 02/04/2025 por BOLLEE Victor, n° prélèvement : 25-0075 + +£E Victor + +Motériou Sable 0/2 C - CARRIERE ADCEG + +[v ESSAI + +[w MATERIEL IE PORTFOUO IE OBSERVATIONS + +| [y smo | [¥ ristomoue + +12 + +NREGISTRER + +MAPRIMIER + +de l'essai + +2025 + +(RE GIRAUD + +pur les statistiques + +lessai + +A + +Impossible de trouver l'adeesse (P du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/default/psm3.txt b/utils/ocr_test_results/image_145435/default/psm3.txt new file mode 100644 index 0000000..84ac451 --- /dev/null +++ b/utils/ocr_test_results/image_145435/default/psm3.txt @@ -0,0 +1,8 @@ +Echantilion n°25-00075 réceptionné le 02/04/7025 par BOLLÉE Victor - prélevé le 02/04/2025 por BOLLEE Victor, n° prélèvement : 25-0075 +Motériou Sable 0/2 C - CARRIERE ADCEG + +[M Essai [vate |[rortrouo |[vosservanoxs |[vswo|[vristomaur | + +A + +Impossible de trouver l'adresse (P du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/default/psm4.txt b/utils/ocr_test_results/image_145435/default/psm4.txt new file mode 100644 index 0000000..b06b7c2 --- /dev/null +++ b/utils/ocr_test_results/image_145435/default/psm4.txt @@ -0,0 +1,12 @@ +C ‘+5 girsud.brg-tab.com/BRG-LAB/PAGE_programmetssai/zE4 AAHDVNGQ)AA + +BAGLAB CD Béton C2 Foumsseurlado © Masse + +Echantilion n°25-00075 réceptionné le 02/04/7025 par BOLLÉE Victor - prélevé le 02/04/2025 por BOLLEE Victor, n° prélèvement : 25-0075 +Motériou Sable 0/2 C - CARRIERE ADCEG + +[M Essai [vate |[rortrouo |[vosservanoxs |[vswo|[vristomaur | + +A + +Impossible de trouver l'adresse (P du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/default/psm6.txt b/utils/ocr_test_results/image_145435/default/psm6.txt new file mode 100644 index 0000000..6c4cec6 --- /dev/null +++ b/utils/ocr_test_results/image_145435/default/psm6.txt @@ -0,0 +1,15 @@ +C +5 giraud.brg-tab.com/BRG-LAB/PAGE_programmetssai/zE4 AAHBVNGOAA +BAGLAB CD Béton C2 Foumsseurlado © Masse +“Tey WY: Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + AMM Echantition n7 25-00075 réceptionn le 02/04/2028 par BOLLEE Victor - prifevd le 02/04/2025 por BOLLE Victor n° pedlbvement : 2500078 +Es Matériau Sable 0/20 CARFIERE ADCEG +[MV essai [mama ][ rorrrouo |[vosservanons —_|[vswo |[v misromoue +NREGISTRER +WP REIMER +de l'essai += +(RE GIRAUD +our les statistiques +Le l'essai +fons +Impossible de trouver l'adresse (P du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/document/image.png b/utils/ocr_test_results/image_145435/document/image.png new file mode 100644 index 0000000..0c52bb7 Binary files /dev/null and b/utils/ocr_test_results/image_145435/document/image.png differ diff --git a/utils/ocr_test_results/image_145435/document/optimized.png b/utils/ocr_test_results/image_145435/document/optimized.png new file mode 100644 index 0000000..748bf9f Binary files /dev/null and b/utils/ocr_test_results/image_145435/document/optimized.png differ diff --git a/utils/ocr_test_results/image_145435/document/psm11.txt b/utils/ocr_test_results/image_145435/document/psm11.txt new file mode 100644 index 0000000..f840091 --- /dev/null +++ b/utils/ocr_test_results/image_145435/document/psm11.txt @@ -0,0 +1,45 @@ += + +c + +“ + +Qiraud.brg-lab.com/BRG-LAB/PAGE_programmeEssai/zE4 AAHDVNGOAA + +) BAGLAB C9 Béton C9 Fouméseu labo © Massa + +a ¥-4 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + +£E Victor + +Echantilion n” 25-00075 réceptionné le 02/04/2028 par BOLLÉE Victor - prélevé le 02/04/2025 por BOLLEE Victor, n° prélbvement : 2500078 + +Matériau Sable 0/2 C - CARRIERE ADCEG + +V HISTORIQUE + +12 + +[wv Essai [v marée | [¥ Por Uo |[~ oBseRvanions + +[ez + +] + +NREGISTRER + +MPRMER + +ie l'essai + +2025 + +(RE GIRAUD + +les statistiques + +lessai + +A + +impossible de trouver adresse IP du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/document/psm12.txt b/utils/ocr_test_results/image_145435/document/psm12.txt new file mode 100644 index 0000000..b2db5fd --- /dev/null +++ b/utils/ocr_test_results/image_145435/document/psm12.txt @@ -0,0 +1,37 @@ +BAGLAB C9 Béton C9 Fouméseu labo © Masse + +a ¥-4 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + +£E Victor + +Echantilion n” 25-00075 réceptionné le 02/04/2028 par BOLLÉE Victor - prélevé le 02/04/2025 por BOLLEE Victor, n° prélbvement : 2500078 + +Matériau Sable 0/2 C - CARRIERE ADCEG + +V HISTORIQUE + +12 + +[wv Essai [v marée | [¥ Por Uo |[~ oBseRvanions + +[ez + +] + +NREGISTRER + +MPRMER + +ie l'essai + +2025 + +(RE GIRAUD + +les statistiques + +lessai + +A + +impossible de trouver adresse IP du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/document/psm3.txt b/utils/ocr_test_results/image_145435/document/psm3.txt new file mode 100644 index 0000000..0775d3c --- /dev/null +++ b/utils/ocr_test_results/image_145435/document/psm3.txt @@ -0,0 +1,10 @@ +Echantilion n° 25-00075 réceptionné le 02/04/2025 par BOLLEE Victor - prélevé le 02/04/2025 por BOLLEE Victor, n° prélèvement : 25-0007 +Matériau Sable 0/2 C - CARRIERE ADCEG + +[v Essai [vmateme |[vrortrouo |[wosservanons |[wsmo|[vristomout | + +£E Victor + +A + +impossible de trouver adresse IP du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/document/psm4.txt b/utils/ocr_test_results/image_145435/document/psm4.txt new file mode 100644 index 0000000..b51bc5f --- /dev/null +++ b/utils/ocr_test_results/image_145435/document/psm4.txt @@ -0,0 +1,19 @@ +C 5 girsud.brg-lab.com/BRG-LAB/PAGE_progtammetssai/zE4 AAHDVNGOAA + BAGLAS CD Béton CD Fouméstew labo SS Massa + +a ¥-4 Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) + +Echantilion n° 25-00075 réceptionné le 02/04/2025 par BOLLEE Victor - prélevé le 02/04/2025 por BOLLEE Victor, n° prélèvement : 25-0007 +Matériau Sable 0/2 C - CARRIERE ADCEG + +[v Essai [vmateme |[vrortrouo |[wosservanons |[wsmo|[vristomout | + +£E Victor + +les statistiques + +Se l'essai + +A + +impossible de trouver adresse IP du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145435/document/psm6.txt b/utils/ocr_test_results/image_145435/document/psm6.txt new file mode 100644 index 0000000..f3f3c89 --- /dev/null +++ b/utils/ocr_test_results/image_145435/document/psm6.txt @@ -0,0 +1,15 @@ +C +5 giraud.brg-lab.com/BRG-LAB/PAGE_programmetssai/zE4 AAHDVNGOAA + BAGLAS CD Béton CD Fouméstew labo SS Massa +“1c WV: Essai au bleu de méthylène (MB) - NF EN 933-9 (02-2022) +; ~ Echantilion "25-0075 niceptionné te 02/04/7025 par BOLLEE Victor - prélevé Le 02/04/2025 por BOLLEE Victor, n° prélèvement : 25-00075 +Even Motédiou Sable 0/2C- CARRIERE ADCEG +[MEssai [marine ] [M Porrrouo [M OBSERVATIONS [sw] [M HistomauE +NREGISTRER +WAP ROMER +de fessai += +IRE GIRAUD +les statistiques +Se l'essai +pints +impossible de trouver adresse IP du serveur de zk1.brg-lab.com. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/aggressive/image.png b/utils/ocr_test_results/image_145453/aggressive/image.png new file mode 100644 index 0000000..a1f39a5 Binary files /dev/null and b/utils/ocr_test_results/image_145453/aggressive/image.png differ diff --git a/utils/ocr_test_results/image_145453/aggressive/optimized.png b/utils/ocr_test_results/image_145453/aggressive/optimized.png new file mode 100644 index 0000000..988b2db Binary files /dev/null and b/utils/ocr_test_results/image_145453/aggressive/optimized.png differ diff --git a/utils/ocr_test_results/image_145453/aggressive/psm11.txt b/utils/ocr_test_results/image_145453/aggressive/psm11.txt new file mode 100644 index 0000000..d105696 --- /dev/null +++ b/utils/ocr_test_results/image_145453/aggressive/psm11.txt @@ -0,0 +1,49 @@ +v + +Apache Tomcat + +x + ++ + +< + +Cc A + +o— + +—-o + +zk1.brg-lab.com + +oo + +Demo + +Devmat + +oo + +@ Andre + +@ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA HOME in /usr/share/tomcat7 and CATALINA BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. + +You might consider installing the following packages, 1f you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the + +and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users. xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/aggressive/psm12.txt b/utils/ocr_test_results/image_145453/aggressive/psm12.txt new file mode 100644 index 0000000..d48311f --- /dev/null +++ b/utils/ocr_test_results/image_145453/aggressive/psm12.txt @@ -0,0 +1,45 @@ +v + +Apache Tomcat + ++ + +CRE + +o— + +—-o + +zk1.brg-lab.com + +oo + +Demo + +Devmat + +oo + +@ Andre + +@ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA HOME in /usr/share/tomcat7 and CATALINA BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. + +You might consider installing the following packages, 1f you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the + +and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users. xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/aggressive/psm3.txt b/utils/ocr_test_results/image_145453/aggressive/psm3.txt new file mode 100644 index 0000000..804c372 --- /dev/null +++ b/utils/ocr_test_results/image_145453/aggressive/psm3.txt @@ -0,0 +1,22 @@ +Apache Tomcat + + +C A 23 zk1.brg-lab.com + +@ Andre Demo Devmat @ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index. html + +Tomcat7 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA HOME in /usr/share/tomcat7 and CATALINA BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. +You might consider installing the following packages, 1f you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users. xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/aggressive/psm4.txt b/utils/ocr_test_results/image_145453/aggressive/psm4.txt new file mode 100644 index 0000000..804c372 --- /dev/null +++ b/utils/ocr_test_results/image_145453/aggressive/psm4.txt @@ -0,0 +1,22 @@ +Apache Tomcat + + +C A 23 zk1.brg-lab.com + +@ Andre Demo Devmat @ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index. html + +Tomcat7 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA HOME in /usr/share/tomcat7 and CATALINA BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. +You might consider installing the following packages, 1f you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users. xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/aggressive/psm6.txt b/utils/ocr_test_results/image_145453/aggressive/psm6.txt new file mode 100644 index 0000000..ed21344 --- /dev/null +++ b/utils/ocr_test_results/image_145453/aggressive/psm6.txt @@ -0,0 +1,12 @@ +v Apache Tomcat x + ++ C A 23 zk1.brg-lab.com +ag @ Andre Demo Devmat @ Base modèle +It works ! +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index. html +Tomcat7 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA HOME in /usr/share/tomcat7 and CATALINA BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. +You might consider installing the following packages, 1f you haven't already done so: +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking ; +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking | +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the | +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users. xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/default/image.png b/utils/ocr_test_results/image_145453/default/image.png new file mode 100644 index 0000000..a1f39a5 Binary files /dev/null and b/utils/ocr_test_results/image_145453/default/image.png differ diff --git a/utils/ocr_test_results/image_145453/default/optimized.png b/utils/ocr_test_results/image_145453/default/optimized.png new file mode 100644 index 0000000..24489c0 Binary files /dev/null and b/utils/ocr_test_results/image_145453/default/optimized.png differ diff --git a/utils/ocr_test_results/image_145453/default/psm11.txt b/utils/ocr_test_results/image_145453/default/psm11.txt new file mode 100644 index 0000000..7ccb4c9 --- /dev/null +++ b/utils/ocr_test_results/image_145453/default/psm11.txt @@ -0,0 +1,47 @@ +Apache Tomcat + +x + ++ + +°. + ++ + +Cc A + +Er + +zk1.brg-lab.com + +oo + +oo + +@ Andre + +Demo + +Devmat + +@ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. + +You might consider installing the following packages, if you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the + +and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/default/psm12.txt b/utils/ocr_test_results/image_145453/default/psm12.txt new file mode 100644 index 0000000..2ea7a58 --- /dev/null +++ b/utils/ocr_test_results/image_145453/default/psm12.txt @@ -0,0 +1,45 @@ +Apache Tomcat + +x + ++ + +°. + +Cc A + +=o + +zk1.brg-lab.com + +oo + +oo + +@ Andre + +Demo + +Devmat + +@ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. + +You might consider installing the following packages, if you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the + +and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/default/psm3.txt b/utils/ocr_test_results/image_145453/default/psm3.txt new file mode 100644 index 0000000..7b1725b --- /dev/null +++ b/utils/ocr_test_results/image_145453/default/psm3.txt @@ -0,0 +1,22 @@ +Apache Tomcat x + + +Cc À £3 zk1.brg-lab.com + +@ Andre Demo Devmat @ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/1lib/tomcat7/webapps/ROOT/ index.html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. +You might consider installing the following packages, if you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/default/psm4.txt b/utils/ocr_test_results/image_145453/default/psm4.txt new file mode 100644 index 0000000..7b1725b --- /dev/null +++ b/utils/ocr_test_results/image_145453/default/psm4.txt @@ -0,0 +1,22 @@ +Apache Tomcat x + + +Cc À £3 zk1.brg-lab.com + +@ Andre Demo Devmat @ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/1lib/tomcat7/webapps/ROOT/ index.html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. +You might consider installing the following packages, if you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/default/psm6.txt b/utils/ocr_test_results/image_145453/default/psm6.txt new file mode 100644 index 0000000..ea3cd0d --- /dev/null +++ b/utils/ocr_test_results/image_145453/default/psm6.txt @@ -0,0 +1,12 @@ +v Apache Tomcat x + +< Cc A £3 zk1.brg-lab.com +EH @ Andre Demo Devmat @ Base modèle +It works ! +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! +This is the default Tomcat home page. It can be found on the local filesystem at: /var/1lib/tomcat7/webapps/ROOT/ index.html +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING. txt. gz. +You might consider installing the following packages, if you haven't already done so: +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking . +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking . +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the . +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/document/image.png b/utils/ocr_test_results/image_145453/document/image.png new file mode 100644 index 0000000..a1f39a5 Binary files /dev/null and b/utils/ocr_test_results/image_145453/document/image.png differ diff --git a/utils/ocr_test_results/image_145453/document/optimized.png b/utils/ocr_test_results/image_145453/document/optimized.png new file mode 100644 index 0000000..e4d248d Binary files /dev/null and b/utils/ocr_test_results/image_145453/document/optimized.png differ diff --git a/utils/ocr_test_results/image_145453/document/psm11.txt b/utils/ocr_test_results/image_145453/document/psm11.txt new file mode 100644 index 0000000..090b57d --- /dev/null +++ b/utils/ocr_test_results/image_145453/document/psm11.txt @@ -0,0 +1,49 @@ +v + +Apache Tomcat + +x + ++ + +o + +C À + +=o + +zk1.brg-lab.com + +oo + +oo + +OA + +re + +Demo + +Devmat + +@ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/ RUNNING. txt.gz. + +You might consider installing the following packages, if you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the + +and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/document/psm12.txt b/utils/ocr_test_results/image_145453/document/psm12.txt new file mode 100644 index 0000000..d120bde --- /dev/null +++ b/utils/ocr_test_results/image_145453/document/psm12.txt @@ -0,0 +1,45 @@ +Apache Tomcat + +x + ++ + +o + +C À + +=o + +zk1.brg-lab.com + +oo + +oo + +OA + +Demo + +Devmat + +@ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/ RUNNING. txt.gz. + +You might consider installing the following packages, if you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the + +and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/document/psm3.txt b/utils/ocr_test_results/image_145453/document/psm3.txt new file mode 100644 index 0000000..a38b792 --- /dev/null +++ b/utils/ocr_test_results/image_145453/document/psm3.txt @@ -0,0 +1,24 @@ +Apache Tomcat x + + +o + += zk1.brg-lab.com + +Demo Devmat @ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index. html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/ RUNNING. txt.gz. +You might consider installing the following packages, if you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/document/psm4.txt b/utils/ocr_test_results/image_145453/document/psm4.txt new file mode 100644 index 0000000..a38b792 --- /dev/null +++ b/utils/ocr_test_results/image_145453/document/psm4.txt @@ -0,0 +1,24 @@ +Apache Tomcat x + + +o + += zk1.brg-lab.com + +Demo Devmat @ Base modèle + +It works ! + +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! + +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index. html + +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/ RUNNING. txt.gz. +You might consider installing the following packages, if you haven't already done so: + +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking + +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking + +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the + +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_test_results/image_145453/document/psm6.txt b/utils/ocr_test_results/image_145453/document/psm6.txt new file mode 100644 index 0000000..f44a459 --- /dev/null +++ b/utils/ocr_test_results/image_145453/document/psm6.txt @@ -0,0 +1,12 @@ +v Apache Tomcat x + ++ Ca 23 zk1.brg-lab.com +DE @ Andre Demo Devmat @ Base modèle +It works ! +If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! +This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html +Tomcat? veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/ RUNNING. txt.gz. +You might consider installing the following packages, if you haven't already done so: +tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking . +tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking . +tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the and the . +NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml. \ No newline at end of file diff --git a/utils/ocr_utils.py b/utils/ocr_utils.py index fd98c60..f02f574 100644 --- a/utils/ocr_utils.py +++ b/utils/ocr_utils.py @@ -1,329 +1,117 @@ -# utils/ocr_utils.py - -from PIL import Image, ImageEnhance, ImageFilter import pytesseract -import logging -import os -import io -import numpy as np import cv2 -from langdetect import detect, LangDetectException +import numpy as np +import os +from pathlib import Path +from PIL import Image +from langdetect import detect +import re +from ocr_preprocessor import preprocess_image -logger = logging.getLogger("OCR") +# ⬇️ PARAMÈTRES CENTRAUX D'ACTIVATION ⬇️ +USE_PREPROCESSING = True # Active le prétraitement de l'image +USE_TEXT_CORRECTION = True # Corrige les mots tronqués après OCR +USE_IMAGE_RESIZE = False # Redimensionne l'image si trop petite +SAVE_DEBUG_OUTPUT = False # Sauvegarde image + texte dans debug_ocr/ +AUTO_DETECT_LANGUAGE = True # Détecte automatiquement la langue -def pretraiter_image(image_path: str, optimize_for_text: bool = True) -> Image.Image: - """ - Prétraite l'image pour améliorer la qualité de l'OCR avec des techniques avancées. - Conserve les couleurs originales pour permettre une meilleure analyse. - - Args: - image_path: Chemin de l'image - optimize_for_text: Si True, applique des optimisations spécifiques pour le texte - - Returns: - Image prétraitée - """ +# Complétion de mots tronqués (rudimentaire mais utile) +def completer_mots_tronques(texte): + lignes = texte.splitlines() + lignes_corrigees = [] + for ligne in lignes: + if ligne.strip().endswith("-"): + ligne = ligne.strip()[:-1] + lignes_corrigees.append(ligne) + return "\n".join(lignes_corrigees) + +# Prétraitement de l'image +def pretraiter_image(image_path, optimize_for_text=True): + image = cv2.imread(image_path) + if image is None: + return None + + gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) + + if optimize_for_text: + gray = cv2.GaussianBlur(gray, (3, 3), 0) + gray = cv2.adaptiveThreshold(gray, 255, + cv2.ADAPTIVE_THRESH_GAUSSIAN_C, + cv2.THRESH_BINARY, 31, 15) + else: + gray = cv2.equalizeHist(gray) + + if USE_IMAGE_RESIZE: + height, width = gray.shape + if width < 1000 or height < 1000: + ratio = max(1000 / width, 1000 / height) + gray = cv2.resize(gray, (0, 0), fx=ratio, fy=ratio) + + return gray + +# Détection de langue automatique (si activée) +def detect_language_tesseract(image_cv): try: - # Ouvrir l'image et la garder en couleur - with Image.open(image_path) as img: - # Conversion en array numpy pour traitement avec OpenCV - img_np = np.array(img) - - if optimize_for_text: - # Appliquer une binarisation adaptative pour améliorer la lisibilité du texte - # seulement si l'image est en niveaux de gris ou monochrome - if len(img_np.shape) == 2 or (len(img_np.shape) == 3 and img_np.shape[2] == 1): - if img_np.dtype != np.uint8: - img_np = img_np.astype(np.uint8) - - # Utiliser OpenCV pour la binarisation adaptative - img_np = cv2.adaptiveThreshold( - img_np, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, - cv2.THRESH_BINARY, 11, 2 - ) - - # Débruitage léger pour éliminer les artefacts tout en préservant les détails - img_np = cv2.fastNlMeansDenoising(img_np, None, 7, 7, 17) - - # Reconvertir en image PIL - img = Image.fromarray(img_np) - elif len(img_np.shape) == 3: - # Pour les images couleur, appliquer un débruitage adapté qui préserve les couleurs - img_np = cv2.fastNlMeansDenoisingColored(img_np, None, 7, 7, 7, 17) - - # Reconvertir en image PIL - img = Image.fromarray(img_np) - - # Améliorer légèrement le contraste (réduit par rapport à la version précédente) - enhancer = ImageEnhance.Contrast(img) - img = enhancer.enhance(1.5) # Réduit de 2.0 à 1.5 - - # Augmenter légèrement la netteté (réduit par rapport à la version précédente) - enhancer = ImageEnhance.Sharpness(img) - img = enhancer.enhance(1.3) # Réduit de 2.0 à 1.3 - - # Agrandir l'image si elle est petite - width, height = img.size - if width < 1000 or height < 1000: - ratio = max(1000 / width, 1000 / height) - new_width = int(width * ratio) - new_height = int(height * ratio) - img = img.resize((new_width, new_height), Image.Resampling.LANCZOS) - - return img - except Exception as e: - logger.error(f"Erreur lors du prétraitement de l'image {image_path}: {e}") - # En cas d'erreur, retourner l'image originale - try: - return Image.open(image_path) - except: - # Si même l'ouverture simple échoue, retourner une image vide - logger.critical(f"Impossible d'ouvrir l'image {image_path}") - return Image.new('RGB', (100, 100), (255, 255, 255)) + text_sample = pytesseract.image_to_string(image_cv, config="--psm 6") + lang = detect(text_sample) + return { + "fr": "fra", + "en": "eng" + }.get(lang, "fra+eng") + except: + return "fra+eng" -def detecter_langue_texte(texte: str) -> str: - """ - Détecte la langue principale d'un texte. - - Args: - texte: Texte à analyser - - Returns: - Code de langue ('fr', 'en', etc.) ou 'unknown' en cas d'échec - """ - if not texte or len(texte.strip()) < 10: - return "unknown" - - try: - return detect(texte) - except LangDetectException: - return "unknown" +# OCR principal +def extraire_texte(image_path, lang="auto"): + image = cv2.imread(image_path) + if image is None: + print(f"[OCR] Image non trouvée: {image_path}") + return "", None -def completer_mots_tronques(texte: str) -> str: - """ - Tente de compléter les mots tronqués ou coupés dans le texte OCR. - Utilise une approche basée sur des expressions régulières et un dictionnaire - de mots fréquents en français pour compléter les mots partiels. - - Args: - texte: Texte OCR à corriger - - Returns: - Texte avec mots potentiellement complétés - """ - import re - from difflib import get_close_matches - - # Si le texte est trop court, pas de traitement - if not texte or len(texte) < 10: - return texte - - # Dictionnaire de mots techniques fréquents pour notre contexte - # À enrichir selon le domaine spécifique - mots_frequents = [ - "configuration", "erreur", "système", "application", "logiciel", - "paramètre", "utilisateur", "document", "fichier", "version", - "interface", "connexion", "serveur", "client", "base de données", - "réseau", "message", "installation", "support", "technique", "enregistrer", - "valider", "imprimer", "copier", "couper", "coller", "supprimer", - "documentation", "administrateur", "module", "rapport", "analyse", - "extraction", "calcul", "traitement", "performance", "maintenance", - "BRG_Lab", "CBAO", "entreprise", "laboratoire", "échantillon" - ] - - # Motif pour détecter les mots potentiellement tronqués - # Un mot est considéré comme potentiellement tronqué s'il: - # - se termine par un caractère non-alphabétique au milieu d'une ligne - # - est coupé à la fin d'une ligne sans trait d'union - # - commence par une minuscule après une fin de ligne sans ponctuation - - # Remplacer les coupures de ligne par des espaces si elles coupent des mots - lignes = texte.split('\n') - texte_corrige = "" - i = 0 - - while i < len(lignes) - 1: - ligne_courante = lignes[i].rstrip() - ligne_suivante = lignes[i+1].lstrip() - - # Vérifier si la ligne actuelle se termine par un mot potentiellement coupé - if ligne_courante and ligne_suivante: - if (ligne_courante[-1].isalpha() and not ligne_courante[-1] in ['.', ',', ';', ':', '!', '?'] and - ligne_suivante and ligne_suivante[0].isalpha()): - # Fusionner avec la ligne suivante sans ajouter de saut de ligne - texte_corrige += ligne_courante + " " - i += 1 - if i < len(lignes) - 1: - continue - else: - texte_corrige += ligne_suivante - break - elif ligne_courante.endswith('-'): - # Mot coupé avec un trait d'union à la fin de la ligne - texte_corrige += ligne_courante[:-1] # Supprimer le trait d'union - i += 1 - if i < len(lignes) - 1: - continue - else: - texte_corrige += ligne_suivante - break - - # Ajouter la ligne avec un saut de ligne - texte_corrige += ligne_courante + "\n" - i += 1 - - # Ajouter la dernière ligne si nécessaire - if i < len(lignes): - texte_corrige += lignes[i] - - # Rechercher et corriger les mots potentiellement tronqués ou mal reconnus - mots = re.findall(r'\b\w+\b', texte_corrige) - - for mot in mots: - # Chercher les mots courts (3-5 lettres) qui pourraient être incomplets - if 3 <= len(mot) <= 5: - # Chercher des correspondances potentielles dans notre dictionnaire - correspondances = get_close_matches(mot, mots_frequents, n=1, cutoff=0.6) - - if correspondances: - mot_complet = correspondances[0] - # Remplacer uniquement si le mot complet commence par le mot partiel - if mot_complet.startswith(mot): - texte_corrige = re.sub(fr'\b{mot}\b', mot_complet, texte_corrige) - - return texte_corrige + img_standard = preprocess_image(image_path) if USE_PREPROCESSING else Image.open(image_path) + img_optimized = img_standard # on utilise le même traitement pour les deux dans ce cas -def extraire_texte(image_path: str, lang: str = "auto") -> tuple: - """ - Effectue un OCR sur une image avec détection automatique de la langue. - - Args: - image_path: Chemin vers l'image - lang: Langue pour l'OCR ('auto', 'fra', 'eng', 'fra+eng') - - Returns: - Tuple (texte extrait, langue détectée) - """ - if not os.path.exists(image_path) or not os.access(image_path, os.R_OK): - logger.warning(f"Image inaccessible ou introuvable: {image_path}") - return "", "unknown" - logger.info(f"Traitement OCR pour {image_path} (langue: {lang})") - - # Prétraiter l'image avec différentes configurations - img_standard = pretraiter_image(image_path, optimize_for_text=False) - img_optimized = pretraiter_image(image_path, optimize_for_text=True) - - # Configurer pytesseract - config = '--psm 3 --oem 3' # Page segmentation mode: 3 (auto), OCR Engine mode: 3 (default) - - # Déterminer la langue pour l'OCR ocr_lang = lang - if lang == "auto": - # Essayer d'extraire du texte avec plusieurs langues - try: - texte_fr = pytesseract.image_to_string(img_optimized, lang="fra", config=config) - texte_en = pytesseract.image_to_string(img_optimized, lang="eng", config=config) - texte_multi = pytesseract.image_to_string(img_optimized, lang="fra+eng", config=config) - - # Choisir le meilleur résultat basé sur la longueur et la qualité - results = [ - (texte_fr, "fra", len(texte_fr.strip())), - (texte_en, "eng", len(texte_en.strip())), - (texte_multi, "fra+eng", len(texte_multi.strip())) - ] - - results.sort(key=lambda x: x[2], reverse=True) - best_text, best_lang, _ = results[0] - - # Détection secondaire basée sur le contenu - detected_lang = detecter_langue_texte(best_text) - if detected_lang in ["fr", "fra"]: - ocr_lang = "fra" - elif detected_lang in ["en", "eng"]: - ocr_lang = "eng" - else: - ocr_lang = best_lang - - logger.info(f"Langue détectée: {ocr_lang}") - except Exception as e: - logger.warning(f"Détection de langue échouée: {e}, utilisation de fra+eng") - ocr_lang = "fra+eng" - - # Réaliser l'OCR avec la langue choisie - try: - # Essayer d'abord avec l'image optimisée pour le texte - texte = pytesseract.image_to_string(img_optimized, lang=ocr_lang, config=config) - - # Si le résultat est trop court, essayer avec l'image standard - if len(texte.strip()) < 10: - texte_standard = pytesseract.image_to_string(img_standard, lang=ocr_lang, config=config) - if len(texte_standard.strip()) > len(texte.strip()): - texte = texte_standard - logger.info("Utilisation du résultat de l'image standard (meilleur résultat)") - except Exception as ocr_err: - logger.warning(f"OCR échoué: {ocr_err}, tentative avec l'image originale") - # En cas d'échec, essayer avec l'image originale - try: - with Image.open(image_path) as original_img: - texte = pytesseract.image_to_string(original_img, lang=ocr_lang, config=config) - except Exception as e: - logger.error(f"OCR échoué complètement: {e}") - return "", "unknown" - - # Nettoyer le texte - texte = texte.strip() - - # Tenter de compléter les mots tronqués ou coupés - try: + if lang == "auto" and AUTO_DETECT_LANGUAGE: + ocr_lang = detect_language_tesseract(img_standard) + if ocr_lang == "auto": + ocr_lang = "fra+eng" + + config = f"--psm 6 -l {ocr_lang}" + texte = pytesseract.image_to_string(img_optimized, config=config) + + if USE_TEXT_CORRECTION: texte_corrige = completer_mots_tronques(texte) - # Si la correction a fait une différence significative, utiliser le texte corrigé - if len(texte_corrige) > len(texte) * 1.05 or (texte != texte_corrige and len(texte_corrige.split()) > len(texte.split())): - logger.info(f"Correction de mots tronqués appliquée, {len(texte)} → {len(texte_corrige)} caractères") + if len(texte_corrige) >= len(texte) * 0.9: texte = texte_corrige - except Exception as e: - logger.warning(f"Échec de la complétion des mots tronqués: {e}") - - # Détecter la langue du texte extrait pour confirmation - detected_lang = detecter_langue_texte(texte) if texte else "unknown" - - # Sauvegarder l'image prétraitée pour debug si OCR réussi - if texte: + + if SAVE_DEBUG_OUTPUT and texte: try: debug_dir = "debug_ocr" os.makedirs(debug_dir, exist_ok=True) - img_name = os.path.basename(image_path) - img_optimized.save(os.path.join(debug_dir, f"optimized_{img_name}"), format="JPEG") - img_standard.save(os.path.join(debug_dir, f"standard_{img_name}"), format="JPEG") - - # Sauvegarder aussi le texte extrait - with open(os.path.join(debug_dir, f"ocr_{img_name}.txt"), "w", encoding="utf-8") as f: - f.write(f"OCR Langue: {ocr_lang}\n") - f.write(f"Langue détectée: {detected_lang}\n") - f.write("-" * 50 + "\n") + image_name = Path(image_path).stem + + # Conversion si image PIL + if isinstance(img_optimized, Image.Image): + img_optimized = np.array(img_optimized) + if img_optimized.ndim == 3 and img_optimized.shape[2] == 3: + img_optimized = cv2.cvtColor(img_optimized, cv2.COLOR_RGB2BGR) + elif img_optimized.ndim == 3 and img_optimized.shape[2] == 4: + img_optimized = cv2.cvtColor(img_optimized, cv2.COLOR_RGBA2BGR) + + if isinstance(img_optimized, np.ndarray): + cv2.imwrite(f"{debug_dir}/optimized_{image_name}.png", img_optimized) + + with open(f"{debug_dir}/ocr_{image_name}.png.txt", "w", encoding="utf-8") as f: f.write(texte) - - logger.info(f"Images prétraitées et résultat OCR sauvegardés dans {debug_dir}") + except Exception as e: - logger.warning(f"Impossible de sauvegarder les fichiers de débogage: {e}") + print(f"[OCR DEBUG] Erreur de sauvegarde debug: {e}") - # Journaliser le résultat - logger.info(f"OCR réussi [{image_path}] — {len(texte)} caractères: {texte[:100]}...") - else: - logger.warning(f"OCR vide (aucun texte détecté) pour {image_path}") + return texte, img_optimized - return texte, detected_lang - -def extraire_texte_fr(image_path: str) -> str: - """ - Effectue un OCR sur une image en langue française (pour compatibilité). - Utilise la nouvelle fonction plus avancée avec détection automatique. - - Args: - image_path: Chemin vers l'image - - Returns: - Texte extrait - """ - texte, _ = extraire_texte(image_path, lang="auto") +# Raccourci rapide pour juste récupérer le texte en français +def extraire_texte_fr(image_path): + texte, _ = extraire_texte(image_path, lang="fra") return texte diff --git a/utils/test_ocr_utils.py b/utils/test_ocr_utils.py new file mode 100644 index 0000000..7949c2f --- /dev/null +++ b/utils/test_ocr_utils.py @@ -0,0 +1,68 @@ +import os +from pathlib import Path +from shutil import copyfile +from PIL import Image +from ocr_utils import pytesseract, AUTO_DETECT_LANGUAGE, completer_mots_tronques +from ocr_preprocessor import preprocess_image, PREPROCESSING_PROFILES + +# === CONFIGURATION === +DOSSIER_IMAGES = "images_test" +DOSSIER_RESULTATS = "ocr_test_results" +EXTENSIONS_AUTORISEES = [".jpg", ".jpeg", ".png", ".tiff", ".bmp"] +PROFILS_A_TESTER = ["default", "document", "aggressive"] +PSM_MODES = [3, 4, 6, 11, 12] +OEM = 3 + +def est_image_valide(fichier): + return any(fichier.lower().endswith(ext) for ext in EXTENSIONS_AUTORISEES) + +def detect_lang(img: Image.Image): + return "fra+eng" if AUTO_DETECT_LANGUAGE else "eng" + +def lancer_tests(dossier_images): + images = [f for f in Path(dossier_images).glob("*") if est_image_valide(str(f))] + + if not images: + print("❌ Aucune image valide trouvée.") + return + + for image_path in images: + base_name = Path(image_path).stem + print(f"\n🖼️ Traitement de l'image : {image_path.name}") + + for profil in PROFILS_A_TESTER: + print(f" 🔧 Profil de prétraitement : {profil}") + settings = PREPROCESSING_PROFILES[profil].copy() + + dossier_profil = Path(DOSSIER_RESULTATS) / base_name / profil + dossier_profil.mkdir(parents=True, exist_ok=True) + + # Copie de l’image originale (1 fois par profil) + copyfile(image_path, dossier_profil / "image.png") + + try: + img_prep = preprocess_image(str(image_path), **settings) + img_prep.save(dossier_profil / "optimized.png") + + ocr_lang = detect_lang(img_prep) + + for psm in PSM_MODES: + print(f" ⚙️ PSM={psm}...", end="") + config = f"--psm {psm} --oem {OEM} -l {ocr_lang} -c preserve_interword_spaces=1" + texte = pytesseract.image_to_string(img_prep, config=config) + + texte_corrige = completer_mots_tronques(texte) + if len(texte_corrige) >= len(texte) * 0.9: + texte = texte_corrige + + # Écriture du fichier texte + with open(dossier_profil / f"psm{psm}.txt", "w", encoding="utf-8") as f: + f.write(texte.strip()) + + print(f" ✅ {len(texte.strip())} caractères.") + except Exception as e: + print(f" ❌ Erreur avec profil {profil}: {e}") + +if __name__ == "__main__": + os.makedirs(DOSSIER_RESULTATS, exist_ok=True) + lancer_tests(DOSSIER_IMAGES)