| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
| informatique:ai_lm:ai_vision [10/04/2026 09:40] – [GLM-OCR] cyrille | informatique:ai_lm:ai_vision [06/07/2026 14:56] (Version actuelle) – [Détections par départements] cyrille |
|---|
| === Détections par départements === | === Détections par départements === |
| |
| Les rectangles ont 2 propriétés: la "confidence" de la détection et "file" pour le nom de la tuile. | La détection est effectuée sur les BDORTHO 2.0 millésime 2025 ''BDORTHO_2-0_RVB-0M20_JP2-E080_LAMB93_<departement>_2025-01-01''. |
| |
| | Les challenges Maproulette sont créés avec l'import des geojson présents ici. |
| | |
| | Les rectangles dans les geojson ont 2 propriétés: la "confidence" de la détection et "file" pour le nom de la tuile. |
| | |
| | * 01 Ain |
| | * 02 Aisne |
| * 03 Allier {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_03.geojson.zip |}} | * 03 Allier {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_03.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54541|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54541" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54541|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54541" height="25"/></html> |
| | * 04 Alpes-de-Haute-Provence |
| * 05 Hautes-Alpes {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_05.geojson.zip |}} | * 05 Hautes-Alpes {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_05.geojson.zip |}} |
| * le modèle hallucine en haute-montagne, mais pas suffisamment de faux-positifs pour justifier un nouvel entraînement | * le modèle hallucine en haute-montagne, mais pas suffisamment de faux-positifs pour justifier un nouvel entraînement |
| * [[https://maproulette.org/browse/challenges/54542|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54542" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54542|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54542" height="25"/></html> |
| | * 06 Alpes-Maritimes |
| | * 07 Ardèche |
| | * 08 Ardennes {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_08.geojson.zip |}} |
| | * [[https://maproulette.org/browse/challenges/55863|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=55863" height="25"/></html> |
| * 09 Ariège {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_09.geojson.zip |}} | * 09 Ariège {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_09.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54545|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54545" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54545|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54545" height="25"/></html> |
| * 10 Aube {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_10.geojson.zip |}} | * 10 Aube {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_10.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54550|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54550" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54550|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54550" height="25"/></html> |
| | * 11 Aude |
| | * 12 Aveyron |
| | * 13 Bouches-du-Rhône |
| | * 14 Calvados |
| | * 15 Cantal |
| | * 16 Charente |
| | * 17 Charente-Maritime |
| | * 18 Cher |
| | * 19 Corrèze |
| | * 2A Corse-du-Sud |
| | * 2B Haute-Corse |
| | * 21 Côte-d'Or |
| * 22 Côtes-d'Armor {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_22.geojson.zip |}} | * 22 Côtes-d'Armor {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_22.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54551|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54551" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54551|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54551" height="25"/></html> |
| | * 23 Creuse |
| | * 24 Dordogne |
| | * 25 Doubs |
| | * 26 Drôme |
| | * 27 Eure |
| | * 28 Eure-et-Loir |
| | * 29 Finistère |
| | * 30 Gard |
| | * 31 Haute-Garonne |
| * 32 Gers {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_32.geojson.zip |}} | * 32 Gers {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_32.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54538|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54538" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54538|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54538" height="25"/></html> |
| | * 33 Gironde |
| | * 34 Hérault |
| | * 35 Ille-et-Vilaine |
| | * 36 Indre |
| * 37 Indre-et-Loire | * 37 Indre-et-Loire |
| | * 38 Isère |
| | * 39 Jura |
| | * 40 Landes |
| | * 41 Loir-et-Cher |
| * 42 Loire {{ :informatique:ai_lm:ai_vision:yolo:solar-panels_42.geojson.zip |}} | * 42 Loire {{ :informatique:ai_lm:ai_vision:yolo:solar-panels_42.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54565|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54565" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54565|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54565" height="25"/></html> |
| * 44 Loire-Atlantique {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_44.geojson.zip |}} | * 44 Loire-Atlantique {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_44.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54594|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54594" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54594|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54594" height="25"/></html> |
| | * 45 Loiret |
| * 46 Lot {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_46.geojson.zip |}} | * 46 Lot {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_46.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54595|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54595" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54595|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54595" height="25"/></html> |
| | * 47 Lot-et-Garonne |
| * 48 Lozère {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_48.geojson.zip |}} | * 48 Lozère {{ :informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_48.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54596|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54596" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54596|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54596" height="25"/></html> |
| * 50 Manche {{ :informatique:ai_lm:ai_vision:yolo:solar-panels_50.geojson.zip |}} | * 50 Manche {{ :informatique:ai_lm:ai_vision:yolo:solar-panels_50.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54710|Challenge maproulette]]<html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54710" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54710|Challenge maproulette]]<html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54710" height="25"/></html> |
| | * 51 Marne |
| | * 52 Haute-Marne |
| | * 53 Mayenne |
| | * 54 Meurthe-et-Moselle |
| | * 55 Meuse |
| | * 56 Morbihan |
| | * 57 Moselle |
| | * 58 Nièvre |
| * 59 Nord {{:informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_59.geojson.zip|}} | * 59 Nord {{:informatique:ai_lm:ai_vision:yolo:bdortho_tuiles-640_59.geojson.zip|}} |
| * [[https://maproulette.org/browse/challenges/54555|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54555" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54555|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54555" height="25"/></html> |
| | * 60 Oise |
| | * 61 Orne |
| | * 62 Pas-de-Calais |
| * 63 Puy-de-Dôme {{ :informatique:ai_lm:ai_vision:yolo:solar-panels_63.geojson.zip |}} | * 63 Puy-de-Dôme {{ :informatique:ai_lm:ai_vision:yolo:solar-panels_63.geojson.zip |}} |
| * [[https://maproulette.org/browse/challenges/54626|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54626" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54626|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54626" height="25"/></html> |
| * [[https://maproulette.org/browse/challenges/54636|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54636" height="25"/></html> | * [[https://maproulette.org/browse/challenges/54636|Challenge maproulette]] <html><img src="https://tools.comptoir.net/maproulette-completion-badge/badge.php?id=54636" height="25"/></html> |
| |
| ===== GLM-OCR ===== | ===== OCR ===== |
| | |
| | ==== LiteParse ==== |
| | |
| | A fast, local PDF parsing with spatial text parsing, OCR, and bounding boxes. Open-source document parser from [[https://developers.llamaindex.ai/liteparse/|LlamaIndex]] |
| | |
| | https://github.com/run-llama/liteparse |
| | |
| | ==== GLM-OCR ==== |
| |
| Avec llama.cpp et le modèle [[https://huggingface.co/ggml-org/GLM-OCR-GGUF|GLM-OCR-f16.gguf]] avec son fichier mmproj-GLM-OCR-Q8_0.gguf | Avec llama.cpp et le modèle [[https://huggingface.co/ggml-org/GLM-OCR-GGUF|GLM-OCR-f16.gguf]] avec son fichier mmproj-GLM-OCR-Q8_0.gguf |
| |
| <code> | <code> |
| Avec CPU i7 | Avec CPU i7-1360P 13thGen |
| real 0m47,583s, 0m32,031s | real 0m47,583s, 0m32,031s |
| user 0m0,112s, 0m0,110s | user 0m0,112s, 0m0,110s |
| La page 8 est un tableau et les données dans les cellules sont très bien extraites, les phrases sur plusieurs lignes dans une cellule sont bien extraites. | La page 8 est un tableau et les données dans les cellules sont très bien extraites, les phrases sur plusieurs lignes dans une cellule sont bien extraites. |
| |
| Avec le prompt : "Extrais le texte de cette image en préservant la structure (titres, listes, paragraphes). Corrigé les erreurs d'OCR si nécessaire. Réponds avec LE FORMAT MARKDOWN." la page 8 donne du Markdown alors que la page 9 donne du HTML ... | Avec le prompt : "''Extrais le texte de cette image en préservant la structure (titres, listes, paragraphes). Corrigé les erreurs d'OCR si nécessaire. Réponds avec LE FORMAT MARKDOWN.''" la page 8 donne du Markdown alors que la page 9 donne du HTML ... |
| | |
| | Alors qu'avec le prompt : "''Extract the text from this image, preserving the structure (headings, lists, paragraphs). Correct any OCR errors where necessary. Please reply in MARKDOWN FORMAT.''" les pages 8 et 9 sont bien en Markdown. Comme quoi **le modèle comprends mieux l'anglais**. |
| | |
| | Les tables sont bien extraites mais **pas toujours bien rendues** dans la réponse. Après quelques essais le prompt qui fonctionne mieux : "''Extract the text from this image, preserving the structure (headings, lists, paragraphs) and make sure you KEEP THE TABLES in good condition. Correct any OCR errors where necessary. Fine Reply in MARKDOWN FORMAT.''" |
| | |
| | 😩 voilà qu'après plusieurs usages il n'y a plus de Markdown pour les titres ... |
| | |
| | 👌 J'ai changé de stratégie: ne plus extraire la mise en forme, mais seulement le texte page par page, avec extraction de quelques entités comme "auteur", "date", "sujet" et un "résumé". Là le model GLM-OCR-f16 est très efficace. |
| | |
| | ==== Qwen2.5-VL-7B-Instruct ==== |
| | |
| | https://huggingface.co/unsloth/Qwen2.5-VL-7B-Instruct-GGUF |
| | |
| | Bien meilleurs résultats pour la structure en Markdown mais beaucoup plus gourmand en mémoire et donc plus lent à cause de l'usage du CPU, même avec du Q4. 😩 |
| | |
| | <code> |
| | ~/Code/bronx/AI_Coding/llama.cpp-86/build/bin/llama-server --port 8012 \ |
| | -m ~/Data/AI_ModelsOCR/Qwen2.5-VL-7B-Instruct-UD-Q4_K_XL.gguf \ |
| | --mmproj ~/Data/AI_ModelsOCR/mmproj-F16.gguf -ngl 20 |
| | |
| | real 0m39,938s, 0m45,901s |
| | user 0m0,116s, 0m0,105s |
| | sys 0m0,024s, 0m0,027s |
| | </code> |
| | |
| | ==== DeepSeek-OCR-GGUF ==== |
| | |
| | [[https://huggingface.co/ggml-org/DeepSeek-OCR-GGUF|ggml-org/DeepSeek-OCR-GGUF]] |
| |
| Alors qu'avec le prompt : "Extract the text from this image, preserving the structure (headings, lists, paragraphs). Correct any OCR errors where necessary. Please reply in MARKDOWN FORMAT." les pages 8 et 9 sont bien en Markdown. Comme quoi **le modèle comprends mieux l'anglais**. | Tient dans la VRAM de la RTX3060. |
| |
| Les tables sont bien extraites MAIS pas toujours bien rendues dans la réponse. Après quelques essais le prompt qui fonctionne mieux : "Extract the text from this image, preserving the structure (headings, lists, paragraphs) and make sure you KEEP THE TABLES in good condition. Correct any OCR errors where necessary. Fine Reply in MARKDOWN FORMAT." | Gère bien le Markdown, mais les résultats sont alléatoires ... Et de nombreuses allucinations 😩 |
| |
| |