{ "cells": [ { "cell_type": "markdown", "id": "0a5ae7d0-87a4-457f-b9fc-36a1e395143c", "metadata": {}, "source": [ "# Test 4 : Qwen3-VL-8B-Instruct" ] }, { "cell_type": "markdown", "id": "daa9aee5-ea73-4e8b-9d17-40b56f29d126", "metadata": {}, "source": [ "## one single image " ] }, { "cell_type": "code", "execution_count": 1, "id": "71915a07-6d9c-46da-9bcf-0bd3a81b5948", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/skiredj.abderrahman/.conda/envs/gptoss-vllm/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] } ], "source": [ "from transformers import Qwen3VLForConditionalGeneration, AutoProcessor" ] }, { "cell_type": "code", "execution_count": 2, "id": "ba739a63-f57c-49b1-91d1-cefd06c1619a", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Loading checkpoint shards: 100%|██████████| 4/4 [00:02<00:00, 1.60it/s]\n" ] } ], "source": [ "model = Qwen3VLForConditionalGeneration.from_pretrained(\n", " \"./Qwen3-VL-8B-Instruct\", dtype=\"auto\", device_map=\"auto\"\n", ")" ] }, { "cell_type": "code", "execution_count": 3, "id": "10cf19e8-f90f-4401-8b08-f7221bf528e2", "metadata": {}, "outputs": [], "source": [ "processor = AutoProcessor.from_pretrained(\"./Qwen3-VL-8B-Instruct\")" ] }, { "cell_type": "code", "execution_count": 4, "id": "ead1e5df-455a-408a-83a1-fd41d0c72513", "metadata": {}, "outputs": [], "source": [ "\n", "messages = [\n", " {\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image\",\n", " \"image\": \"journal_7.png\",\n", " },\n", " {\n", " \"type\": \"text\", \n", " \"text\": \"Transcribe all text from this image word-for-word. Do not repeat any sentences. Stop when you reach the end.\"\n", " },\n", " ],\n", " }\n", "]\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "27bd752b-d989-4031-9d08-86cb013250af", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "The following generation flags are not valid and may be ignored: ['temperature', 'top_p', 'top_k']. Set `TRANSFORMERS_VERBOSITY=info` for more details.\n" ] } ], "source": [ "\n", "\n", "inputs = processor.apply_chat_template(\n", " messages,\n", " tokenize=True,\n", " add_generation_prompt=True,\n", " return_dict=True,\n", " return_tensors=\"pt\"\n", ")\n", "inputs = inputs.to(model.device)\n", "\n", "# Anti-hallucination parameters\n", "generated_ids = model.generate(\n", " **inputs, \n", " max_new_tokens=1536,\n", " repetition_penalty=1.3,\n", " no_repeat_ngram_size=3,\n", " do_sample=False,\n", " pad_token_id=processor.tokenizer.pad_token_id,\n", " eos_token_id=processor.tokenizer.eos_token_id\n", ")\n", "\n", "generated_ids_trimmed = [\n", " out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)\n", "]\n", "\n", "output_text = processor.batch_decode(\n", " generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False\n", ")" ] }, { "cell_type": "code", "execution_count": 6, "id": "d62208fa-c97f-438e-9557-1bca6514cb9e", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "================================================================================\n", "EXTRACTED TEXT:\n", "================================================================================\n", "5481 الجريدة الرسمية (26 أغسطس 2024) عدد 7329 مكرر - صفحه 21 فرع 1446\n", "\n", "٦. وبعد معالجة دراسة جميع الشكايات والطلبات، تبين أن ما يناهز 994 شكاء وطلب تم دخول في إطار اختصاصات المجلس لم يتم معالجتها وتاخذ ما يليزم بخصوصها، بالإضافة إلى 115 شكوى عامة اتلافاً للاستئناف الوطنيين الخاصيين حقوق الطفل والأشخاص في وضعية إعاقة، في حين تبين أنه عام 1913 شكوايا طلب لا تندرج ضمن الاختصاص المجلس ولجان وأيضاً تم توحيدهم المعنى بها إلى سلوك المساطر القانونية أو الإدارية، أو تم إحالة على الجهات المتخصصة، بما فيه ذلك 134 شكوى تم إحالتهم عليها مؤسسسة وسيط المملكة للإحصائيات، فيما تم حفظ 296 شكوى لكل من يكونون تحت رقابة الشرطة الجنائية والمدنية.\n", "\n", "٧. وحسب التصنيفات الموضوعية لهذه الشكايت، بلغ عدد الشكاوي المتعلقة بالحقوق السياسية ما يناهي 343 شكوى وطلب، منها 152 شكوى تعاملت بإعادة تقديم الطلبات الخاصة بالمجالات التي تتضمن الحقوق الأساسية مثل الحق في الحياة والحصول على التعليم والصحة وغيرها من الأنشطة الاجتماعية الاقتصادية والثقافية والإبداعية، حيث بلغ العدد 162 شكوة حول قانون العمل النقابي، وفيما يتعلق بالقضايا الأخرى، فقد بلغ الاجمالى عدد الشكوات 651 شكوى فقط.\n", "\n", "٨. وبحسب تصنيف القوانين المنطبعة عن طريق مجلس الدولة ومجلس الوزراء، فإن هناك العديد من الحالات المرتبطة بالأمور العامة والتي يمكن حلها عبر الوسائل القضائية المختلفة، ومن بين هذه الأمور: 276 شكواية بشأن حق الملكية، و280 شكوى أخرى مرتبطة بأعمال النقل العام، كما يوجد أيضًا بعض الشكاوى ذات الطبيعة الفنية والقانونية التي تحتاج إلى استشارات متعددة المستويات، وقد أُرسلت أكثر من 1,312 شكواً للمراجعة والتقييم النهائي بواسطة اللجنة الوطنية للأحوال الشخصية والعلاقات الدولية، وذلك بهدف تحقيق الاستقرار الاجتماعي والاقتصادي داخل المجتمع المحلي.\n", "\n", "٩. وقد عمل المجلس على دراسات خاصة بشؤون الشكايل المتعلقة بموضوعات مختلفة، سواء كانت تلك المواضيع جزءًا من نظام الحكم الداخلي أو خارجي، ويتم التعامل مع كل حالة بشكل مستقل بناءً على نوع المشكلة وحجمها، بحيث تكون الحلول المناسبة هي الأكثر أهمية لتحقيق نتائج طويلة الأمد، ويمكن استخدام أدوات مختلفة لتوفير أفضل الخدمات للمستخدمين المحترفين الذين يتلقون خدماتنا.\n", "\n", "١٠. ويجب تسجيل أي حالات قد تنشأ نتيجة لأي عملية غير مباشرة، كأن يقوم أحد الموكلين بتوجيه رسالة إليه دون علمه بذلك، مما يؤدي إلى حدوث مشكلات جديدة وغير متوقعة، وبالتالي يجب الحرص دائمًا على عدم وجود أي خطأ محتمل أثناء إدارة الأعمال اليومية.\n", "================================================================================\n" ] } ], "source": [ "# Format the output nicely\n", "for text in output_text:\n", " print(\"=\" * 80)\n", " print(\"EXTRACTED TEXT:\")\n", " print(\"=\" * 80)\n", " # Replace \\n with actual line breaks\n", " formatted_text = text.replace('\\\\n', '\\n')\n", " print(formatted_text)\n", " print(\"=\" * 80)" ] }, { "cell_type": "markdown", "id": "3a0d370c-a39c-4109-864c-20174a09392f", "metadata": {}, "source": [ "## multiple images " ] }, { "cell_type": "code", "execution_count": 7, "id": "4a29bcd9-4e79-4f56-a9e4-86905a307c70", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Loading model...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Loading checkpoint shards: 100%|██████████| 4/4 [00:02<00:00, 1.72it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Model loaded successfully!\n", "Found 32 images to process\n", "Processing [1/32]: journal_10.png\n", " ✓ Completed: journal_10.png\n", "Processing [2/32]: journal_12.png\n", " ✓ Completed: journal_12.png\n", "Processing [3/32]: journal_13.png\n", " ✓ Completed: journal_13.png\n", "Processing [4/32]: journal_14.png\n", " ✓ Completed: journal_14.png\n", "Processing [5/32]: journal_15_left.png\n", " ✓ Completed: journal_15_left.png\n", "Processing [6/32]: journal_15_right.png\n", " ✓ Completed: journal_15_right.png\n", "Processing [7/32]: journal_16_left.png\n", " ✓ Completed: journal_16_left.png\n", "Processing [8/32]: journal_16_right.png\n", " ✓ Completed: journal_16_right.png\n", "Processing [9/32]: journal_17_left.png\n", " ✓ Completed: journal_17_left.png\n", "Processing [10/32]: journal_17_right.png\n", " ✓ Completed: journal_17_right.png\n", "Processing [11/32]: journal_18_left.png\n", " ✓ Completed: journal_18_left.png\n", "Processing [12/32]: journal_18_right.png\n", " ✓ Completed: journal_18_right.png\n", "Processing [13/32]: journal_19.png\n", " ✓ Completed: journal_19.png\n", "Processing [14/32]: journal_1_left.png\n", " ✓ Completed: journal_1_left.png\n", "Processing [15/32]: journal_1_right.png\n", " ✓ Completed: journal_1_right.png\n", "Processing [16/32]: journal_2.png\n", " ✓ Completed: journal_2.png\n", "Processing [17/32]: journal_20.png\n", " ✓ Completed: journal_20.png\n", "Processing [18/32]: journal_21.png\n", " ✓ Completed: journal_21.png\n", "Processing [19/32]: journal_22.png\n", " ✓ Completed: journal_22.png\n", "Processing [20/32]: journal_23.png\n", " ✓ Completed: journal_23.png\n", "Processing [21/32]: journal_24_left.png\n", " ✓ Completed: journal_24_left.png\n", "Processing [22/32]: journal_24_right.png\n", " ✓ Completed: journal_24_right.png\n", "Processing [23/32]: journal_25_left.png\n", " ✓ Completed: journal_25_left.png\n", "Processing [24/32]: journal_25_right.png\n", " ✓ Completed: journal_25_right.png\n", "Processing [25/32]: journal_27.png\n", " ✓ Completed: journal_27.png\n", "Processing [26/32]: journal_3.png\n", " ✓ Completed: journal_3.png\n", "Processing [27/32]: journal_4.png\n", " ✓ Completed: journal_4.png\n", "Processing [28/32]: journal_5.png\n", " ✓ Completed: journal_5.png\n", "Processing [29/32]: journal_6.png\n", " ✓ Completed: journal_6.png\n", "Processing [30/32]: journal_7.png\n", " ✓ Completed: journal_7.png\n", "Processing [31/32]: journal_8.png\n", " ✓ Completed: journal_8.png\n", "Processing [32/32]: journal_9.png\n", " ✓ Completed: journal_9.png\n", "\n", "✓ All images processed!\n", "Output saved to: ./output/output_Qwen3-VL-8B-Instruct.txt\n" ] } ], "source": [ "from transformers import Qwen3VLForConditionalGeneration, AutoProcessor\n", "import os\n", "from pathlib import Path\n", "\n", "# Configuration\n", "images_folder = \"./images\"\n", "output_folder = \"./output\"\n", "output_file = os.path.join(output_folder, \"output_Qwen3-VL-8B-Instruct.txt\")\n", "\n", "# Create output folder if it doesn't exist\n", "os.makedirs(output_folder, exist_ok=True)\n", "\n", "# Load model once\n", "print(\"Loading model...\")\n", "model = Qwen3VLForConditionalGeneration.from_pretrained(\n", " \"./Qwen3-VL-8B-Instruct\", dtype=\"auto\", device_map=\"auto\"\n", ")\n", "processor = AutoProcessor.from_pretrained(\"./Qwen3-VL-8B-Instruct\")\n", "print(\"Model loaded successfully!\")\n", "\n", "# Get all image files from the folder\n", "image_extensions = {'.png', '.jpg', '.jpeg', '.bmp', '.gif', '.tiff', '.webp'}\n", "image_files = [\n", " f for f in os.listdir(images_folder) \n", " if os.path.splitext(f.lower())[1] in image_extensions\n", "]\n", "image_files.sort() # Sort files for consistent ordering\n", "\n", "print(f\"Found {len(image_files)} images to process\")\n", "\n", "# Open output file for writing\n", "with open(output_file, 'w', encoding='utf-8') as f:\n", " for idx, image_file in enumerate(image_files, 1):\n", " image_path = os.path.join(images_folder, image_file)\n", " print(f\"Processing [{idx}/{len(image_files)}]: {image_file}\")\n", " \n", " try:\n", " messages = [\n", " {\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image\",\n", " \"image\": image_path,\n", " },\n", " {\n", " \"type\": \"text\", \n", " \"text\": \"Transcribe all text from this image word-for-word. Do not repeat any sentences. Stop when you reach the end. Format any tables with | separators between columns.\"\n", " },\n", " ],\n", " }\n", " ]\n", " \n", " inputs = processor.apply_chat_template(\n", " messages,\n", " tokenize=True,\n", " add_generation_prompt=True,\n", " return_dict=True,\n", " return_tensors=\"pt\"\n", " )\n", " inputs = inputs.to(model.device)\n", " \n", " # Anti-hallucination parameters\n", " generated_ids = model.generate(\n", " **inputs, \n", " max_new_tokens=1536,\n", " repetition_penalty=1.3,\n", " no_repeat_ngram_size=3,\n", " do_sample=False,\n", " pad_token_id=processor.tokenizer.pad_token_id,\n", " eos_token_id=processor.tokenizer.eos_token_id\n", " )\n", " \n", " generated_ids_trimmed = [\n", " out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)\n", " ]\n", " \n", " output_text = processor.batch_decode(\n", " generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False\n", " )\n", " \n", " # Write to file with separator\n", " f.write(f\"{'='*80}\\n\")\n", " f.write(f\"Image: {image_file}\\n\")\n", " f.write(f\"{'='*80}\\n\")\n", " for text in output_text:\n", " formatted_text = text.replace('\\\\n', '\\n')\n", " f.write(formatted_text)\n", " f.write(f\"\\n\\n\")\n", " \n", " print(f\" ✓ Completed: {image_file}\")\n", " \n", " except Exception as e:\n", " error_msg = f\"Error processing {image_file}: {str(e)}\"\n", " print(f\" ✗ {error_msg}\")\n", " f.write(f\"{'='*80}\\n\")\n", " f.write(f\"Image: {image_file}\\n\")\n", " f.write(f\"{'='*80}\\n\")\n", " f.write(f\"ERROR: {str(e)}\\n\\n\")\n", "\n", "print(f\"\\n✓ All images processed!\")\n", "print(f\"Output saved to: {output_file}\")\n" ] }, { "cell_type": "markdown", "id": "6f160c7f-6730-44fe-a30e-07b8a0ff25a5", "metadata": {}, "source": [ "# test 5 : gemma-3-27b-it-int4-awq" ] }, { "cell_type": "markdown", "id": "e86149f7-67a1-4d2d-82d3-bf934f825599", "metadata": {}, "source": [ "## one image " ] }, { "cell_type": "code", "execution_count": 1, "id": "0a048481-2e8e-4811-a9e6-546c4eb0ffba", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "============================================================\n", "EXTRACTED TEXT:\n", "============================================================\n", "6402\n", "\n", "قرر ما يلي :\n", "\n", "المادة الأولى\n", "\n", "تقبل معادلة دبلوم مهندس مهندس دولة، شهادة Génie civil : diplôme de\n", "mines-Télécom Lille Douai، de l’Institut Mines-Télécom، délivré en date du\n", "10 janvier 2024 - France.\n", "\n", "المادة الثانية\n", "\n", "ينشر هذا القرار بالجريدة الرسمية. (2024) 1446 محرم 19 في 19 يوم يوليو بعض\n", "المعاملات.\n", "\n", "قرار الوزير التعليم العالي والبحث العلمي والإبتكار رقم 2061.24\n", "صادر في 19 يوم يوليو (2024) 1446، يقتضي بتحديد بعض المعاملات الشهادات العالية :\n", "\n", "وزير التعليم العالي والبحث العلمي والإبتكار،\n", "بناء على المرسوم رقم 2.01.333 الصادر في 28 من ربيع الأول 1422\n", "(21 يونيو 2001) المتعلق بالتعليم العالي وتحديد الخصاص الخاصة بالشهادات العالية ؛\n", "\n", "وعلى المرسوم الصادر في 2.04.89 في 18 من ربيع الأول 1425\n", "(7 يونيو 2004) بتحديد اختصاص المؤسسات الجامعية والمسالك الدراسية\n", "والياكتا والقيام وتطوير المناهج والمطابقة، كما وقع تغييره وتميمه ؛\n", "\n", "وعلى المرسوم رقم 2.12.838 الصادر في 14 من ربيع الأول 1443\n", "(21 أكتوبر 2021) المتعلق باختصاصات وزير التعليم العالي والبحث العلمي والإبتكار ؛\n", "\n", "وبعد استشارة اللجنة القطاعية للعلوم والتكنولوجيا والمهندسة\n", "المعمارية والمكونة بتاريخ 4 يوليو 2024.\n", "\n", "قرر ما يلي :\n", "\n", "المادة الأولى\n", "\n", "تقبل معادلة دبلوم مهندس مهندس دولة، شهادة Informatique : diplôme de\n", "Lorraine، délivré en date du 26 octobre 2023 - France.\n", "============================================================\n" ] } ], "source": [ "import requests\n", "import base64\n", "\n", "# Read and encode image\n", "with open(\"journal_25_right.png\", \"rb\") as f:\n", " img_base64 = base64.b64encode(f.read()).decode('utf-8')\n", "\n", "url = \"http://gpu06:9998/v1/chat/completions\" # Note: chat/completions, not completions\n", "payload = {\n", " \"model\": \"/home/skiredj.abderrahman/models/gemma27b-it-int4-awq\",\n", " \"messages\": [\n", " {\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\n", " \"url\": f\"data:image/png;base64,{img_base64}\"\n", " }\n", " },\n", " {\n", " \"type\": \"text\",\n", " \"text\": \"Extract all text from this image. Provide only the text you see, nothing else.\"\n", " }\n", " ]\n", " }\n", " ],\n", " \"max_tokens\": 500\n", "}\n", "\n", "response = requests.post(url, json=payload)\n", "result = response.json()\n", "\n", "# Extract and print just the text content\n", "if 'choices' in result:\n", " extracted_text = result['choices'][0]['message']['content']\n", " print(\"=\" * 60)\n", " print(\"EXTRACTED TEXT:\")\n", " print(\"=\" * 60)\n", " print(extracted_text)\n", " print(\"=\" * 60)\n", "else:\n", " print(\"Full response:\")\n", " print(json.dumps(result, indent=2))" ] }, { "cell_type": "markdown", "id": "e973ddc5-4bc7-4ac4-8c19-66cd4ec0205c", "metadata": {}, "source": [ "## multiple images " ] }, { "cell_type": "code", "execution_count": 7, "id": "d02ba80b-731f-4103-a4e2-9fefb2060c21", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Found 10 images to process...\n", "Processing (1/10): 1.PNG\n", " ✓ Completed: 1.PNG\n", "Processing (2/10): 10.PNG\n", " ✓ Completed: 10.PNG\n", "Processing (3/10): 2.PNG\n", " ✓ Completed: 2.PNG\n", "Processing (4/10): 3.PNG\n", " ✓ Completed: 3.PNG\n", "Processing (5/10): 4.PNG\n", " ✓ Completed: 4.PNG\n", "Processing (6/10): 5.PNG\n", " ✓ Completed: 5.PNG\n", "Processing (7/10): 6.PNG\n", " ✓ Completed: 6.PNG\n", "Processing (8/10): 7.PNG\n", " ✓ Completed: 7.PNG\n", "Processing (9/10): 8.PNG\n", " ✓ Completed: 8.PNG\n", "Processing (10/10): 9.PNG\n", " ✓ Completed: 9.PNG\n", "\n", "✓ All done! Results saved to: output/gemma-3-27b-it-int4-awq_output_tables.txt\n" ] } ], "source": [ "import requests\n", "import base64\n", "import os\n", "from pathlib import Path\n", "\n", "# Configuration\n", "IMAGE_FOLDER = \"table_images\"\n", "OUTPUT_FOLDER = \"output\"\n", "OUTPUT_FILE = \"gemma-3-27b-it-int4-awq_output_tables.txt\"\n", "API_URL = \"http://gpu06:9998/v1/chat/completions\"\n", "MODEL_PATH = \"/home/skiredj.abderrahman/models/gemma27b-it-int4-awq\"\n", "\n", "# Create output folder if it doesn't exist\n", "os.makedirs(OUTPUT_FOLDER, exist_ok=True)\n", "\n", "# Supported image formats\n", "IMAGE_EXTENSIONS = {'.PNG', '.jpg', '.jpeg', '.bmp', '.gif', '.webp'}\n", "\n", "def extract_text_from_image(image_path):\n", " \"\"\"Extract text from a single image using the API\"\"\"\n", " try:\n", " with open(image_path, \"rb\") as f:\n", " img_base64 = base64.b64encode(f.read()).decode('utf-8')\n", " \n", " # Determine image format\n", " ext = Path(image_path).suffix.lower()\n", " mime_type = f\"image/{ext[1:]}\" if ext != '.jpg' else \"image/jpeg\"\n", " \n", " payload = {\n", " \"model\": MODEL_PATH,\n", " \"messages\": [{\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\"url\": f\"data:{mime_type};base64,{img_base64}\"}\n", " },\n", " {\n", " \"type\": \"text\",\n", " \"text\": \"\"\" Extract all text and tables from this image. Preserve the original layout, formatting, and table structure. Use markdown for tables.Provide only the text you see, nothing else.\"\"\"\n", " }\n", " ]\n", " }],\n", " \"max_tokens\": 800,\n", " \"temperature\": 0\n", " }\n", " \n", " response = requests.post(API_URL, json=payload)\n", " result = response.json()\n", " \n", " if 'choices' in result:\n", " return result['choices'][0]['message']['content']\n", " else:\n", " return f\"ERROR: {result}\"\n", " \n", " except Exception as e:\n", " return f\"ERROR: {str(e)}\"\n", "\n", "# Get all image files\n", "image_files = []\n", "for ext in IMAGE_EXTENSIONS:\n", " image_files.extend(Path(IMAGE_FOLDER).glob(f\"*{ext}\"))\n", "\n", "image_files = sorted(image_files)\n", "\n", "if not image_files:\n", " print(f\"No images found in '{IMAGE_FOLDER}' folder!\")\n", " exit(1)\n", "\n", "print(f\"Found {len(image_files)} images to process...\")\n", "\n", "# Process images and write to output file\n", "output_path = os.path.join(OUTPUT_FOLDER, OUTPUT_FILE)\n", "with open(output_path, 'w', encoding='utf-8') as out_file:\n", " for i, image_path in enumerate(image_files, 1):\n", " print(f\"Processing ({i}/{len(image_files)}): {image_path.name}\")\n", " \n", " # Extract text\n", " extracted_text = extract_text_from_image(image_path)\n", " \n", " # Write to file with separator\n", " out_file.write(\"=\" * 80 + \"\\n\")\n", " out_file.write(f\"IMAGE: {image_path.name}\\n\")\n", " out_file.write(\"=\" * 80 + \"\\n\")\n", " out_file.write(extracted_text + \"\\n\")\n", " out_file.write(\"\\n\\n\")\n", " \n", " print(f\" ✓ Completed: {image_path.name}\")\n", "\n", "print(f\"\\n✓ All done! Results saved to: {output_path}\")" ] }, { "cell_type": "markdown", "id": "2276999e-cdb0-445c-a2ea-6ef499bed418", "metadata": {}, "source": [ "## multiple images using skirdj prompt " ] }, { "cell_type": "code", "execution_count": 26, "id": "2cbc8651-2891-421e-9484-d14ed0e53bcf", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Found 32 images to process...\n", "Processing (1/32): journal_10.png\n", " ✓ Completed: journal_10.png\n", "Processing (2/32): journal_12.png\n", " ✓ Completed: journal_12.png\n", "Processing (3/32): journal_13.png\n", " ✓ Completed: journal_13.png\n", "Processing (4/32): journal_14.png\n", " ✓ Completed: journal_14.png\n", "Processing (5/32): journal_15_left.png\n", " ✓ Completed: journal_15_left.png\n", "Processing (6/32): journal_15_right.png\n", " ✓ Completed: journal_15_right.png\n", "Processing (7/32): journal_16_left.png\n", " ✓ Completed: journal_16_left.png\n", "Processing (8/32): journal_16_right.png\n", " ✓ Completed: journal_16_right.png\n", "Processing (9/32): journal_17_left.png\n", " ✓ Completed: journal_17_left.png\n", "Processing (10/32): journal_17_right.png\n", " ✓ Completed: journal_17_right.png\n", "Processing (11/32): journal_18_left.png\n", " ✓ Completed: journal_18_left.png\n", "Processing (12/32): journal_18_right.png\n", " ✓ Completed: journal_18_right.png\n", "Processing (13/32): journal_19.png\n", " ✓ Completed: journal_19.png\n", "Processing (14/32): journal_1_left.png\n", " ✓ Completed: journal_1_left.png\n", "Processing (15/32): journal_1_right.png\n", " ✓ Completed: journal_1_right.png\n", "Processing (16/32): journal_2.png\n", " ✓ Completed: journal_2.png\n", "Processing (17/32): journal_20.png\n", " ✓ Completed: journal_20.png\n", "Processing (18/32): journal_21.png\n", " ✓ Completed: journal_21.png\n", "Processing (19/32): journal_22.png\n", " ✓ Completed: journal_22.png\n", "Processing (20/32): journal_23.png\n", " ✓ Completed: journal_23.png\n", "Processing (21/32): journal_24_left.png\n", " ✓ Completed: journal_24_left.png\n", "Processing (22/32): journal_24_right.png\n", " ✓ Completed: journal_24_right.png\n", "Processing (23/32): journal_25_left.png\n", " ✓ Completed: journal_25_left.png\n", "Processing (24/32): journal_25_right.png\n", " ✓ Completed: journal_25_right.png\n", "Processing (25/32): journal_27.png\n", " ✓ Completed: journal_27.png\n", "Processing (26/32): journal_3.png\n", " ✓ Completed: journal_3.png\n", "Processing (27/32): journal_4.png\n", " ✓ Completed: journal_4.png\n", "Processing (28/32): journal_5.png\n", " ✓ Completed: journal_5.png\n", "Processing (29/32): journal_6.png\n", " ✓ Completed: journal_6.png\n", "Processing (30/32): journal_7.png\n", " ✓ Completed: journal_7.png\n", "Processing (31/32): journal_8.png\n", " ✓ Completed: journal_8.png\n", "Processing (32/32): journal_9.png\n", " ✓ Completed: journal_9.png\n", "\n", "✓ All done! Results saved to: output/gemma-3-27b-it-int4-awq_output_skirdj_prompt.txt\n" ] } ], "source": [ "import requests\n", "import base64\n", "import os\n", "from pathlib import Path\n", "\n", "# Configuration\n", "IMAGE_FOLDER = \"images\"\n", "OUTPUT_FOLDER = \"output\"\n", "OUTPUT_FILE = \"gemma-3-27b-it-int4-awq_output_skirdj_prompt.txt\"\n", "API_URL = \"http://gpu08:9998/v1/chat/completions\"\n", "MODEL_PATH = \"/home/skiredj.abderrahman/models/gemma27b-it-int4-awq\"\n", "\n", "# Create output folder if it doesn't exist\n", "os.makedirs(OUTPUT_FOLDER, exist_ok=True)\n", "\n", "# Supported image formats\n", "IMAGE_EXTENSIONS = {'.png', '.jpg', '.jpeg', '.bmp', '.gif', '.webp'}\n", "\n", "def extract_text_from_image(image_path):\n", " \"\"\"Extract text from a single image using the API\"\"\"\n", " try:\n", " with open(image_path, \"rb\") as f:\n", " img_base64 = base64.b64encode(f.read()).decode('utf-8')\n", " \n", " # Determine image format\n", " ext = Path(image_path).suffix.lower()\n", " mime_type = f\"image/{ext[1:]}\" if ext != '.jpg' else \"image/jpeg\"\n", " \n", " payload = {\n", " \"model\": MODEL_PATH,\n", " \"messages\": [{\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\"url\": f\"data:{mime_type};base64,{img_base64}\"}\n", " },\n", " {\n", " \"type\": \"text\",\n", " \"text\": \"\"\"\n", "Extract all visible text from the document image, following these rules:\n", "\n", "0. *Exhaustivity*\n", "\n", " * OCR *all text faithfully*. Do not omit or alter any word or detail.\n", "\n", "1. *Line Breaks*\n", "\n", " * Preserve line breaks *only* when:\n", "\n", " * The sentence ends with a period, question mark, or exclamation mark followed by a newline.\n", " * A heading/title is separated from body text.\n", " * ALWAYS insert a line break after subtitles starting with these keywords: المادة / الفصل / الباب.\n", " Example:\n", "\n", " \n", " المادة الثانية\n", " الفصل 2\n", " الباب الثالث\n", " \n", " * In all other cases, merge text into continuous paragraphs for readability.\n", "\n", "2. *Tables*\n", "\n", " * If tables are present, reformat them into clean, valid *Markdown table syntax*.\n", "\n", "3. *Ignore Content*\n", "\n", " * Do *not* OCR:\n", "\n", " * Headers at the very top of the page (e.g., journal name like \"الجريدة الرسمية\", issue numbers, dates).\n", " * Footers or page numbers.\n", " * Any number located at the extreme bottom of the page.\n", "\n", "4. *Subtitle Marking*\n", "\n", " * Subtitles are *only* those beginning with: المادة / الفصل.\n", " * Prepend ## (or deeper levels if nested) before subtitles, respecting hierarchy:\n", "\n", " * ##الفصل\n", "\n", " * ###المادة\n", "\n", " * Always add a line break *after* each subtitle. So whenever you write like \"المادة الثانية\" add a linebreak after it.\n", " * Never use a single # heading.\n", "\n", "5. *Two-Column Pages*\n", "\n", " * If the page is laid out in *two vertical columns* (with a clear dividing line between right and left), always OCR the *right column first, then the **left column*.\n", " * Do *not* confuse tables with columns — this rule applies *only* to page layouts, not tables.\n", "\n", "6. *Keep all dots*\n", " * If you see many dots in the text you are OCRizing (like \"....\"), please keep them all. They have meanings, so do not remove them.\n", "\n", "\"\"\"\n", " }\n", " ]\n", " }],\n", " \"max_tokens\": 500,\n", " \"temperature\": 0\n", " }\n", " \n", " response = requests.post(API_URL, json=payload)\n", " result = response.json()\n", " \n", " if 'choices' in result:\n", " return result['choices'][0]['message']['content']\n", " else:\n", " return f\"ERROR: {result}\"\n", " \n", " except Exception as e:\n", " return f\"ERROR: {str(e)}\"\n", "\n", "# Get all image files\n", "image_files = []\n", "for ext in IMAGE_EXTENSIONS:\n", " image_files.extend(Path(IMAGE_FOLDER).glob(f\"*{ext}\"))\n", "\n", "image_files = sorted(image_files)\n", "\n", "if not image_files:\n", " print(f\"No images found in '{IMAGE_FOLDER}' folder!\")\n", " exit(1)\n", "\n", "print(f\"Found {len(image_files)} images to process...\")\n", "\n", "# Process images and write to output file\n", "output_path = os.path.join(OUTPUT_FOLDER, OUTPUT_FILE)\n", "with open(output_path, 'w', encoding='utf-8') as out_file:\n", " for i, image_path in enumerate(image_files, 1):\n", " print(f\"Processing ({i}/{len(image_files)}): {image_path.name}\")\n", " \n", " # Extract text\n", " extracted_text = extract_text_from_image(image_path)\n", " \n", " # Write to file with separator\n", " out_file.write(\"=\" * 80 + \"\\n\")\n", " out_file.write(f\"IMAGE: {image_path.name}\\n\")\n", " out_file.write(\"=\" * 80 + \"\\n\")\n", " out_file.write(extracted_text + \"\\n\")\n", " out_file.write(\"\\n\\n\")\n", " \n", " print(f\" ✓ Completed: {image_path.name}\")\n", "\n", "print(f\"\\n✓ All done! Results saved to: {output_path}\")" ] }, { "cell_type": "markdown", "id": "774c6aab-91a5-45ba-911e-892e297b900b", "metadata": { "jp-MarkdownHeadingCollapsed": true }, "source": [ "# test 6 : Qwen3-32B-AWQ" ] }, { "cell_type": "code", "execution_count": 41, "id": "b4a6fa71-e1f0-4ac2-8dd6-5b70871493af", "metadata": {}, "outputs": [], "source": [ "import torch\n", "torch.cuda.empty_cache()" ] }, { "cell_type": "code", "execution_count": 44, "id": "b72279b5-e9b7-43d3-9ea0-4316c7ccb33c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'object': 'error', 'message': 'The model `/home/skiredj.abderrahman/khalil/Qwen3-VL-30B-A3B-Instruct-FP8` does not exist.', 'type': 'NotFoundError', 'param': None, 'code': 404}\n" ] } ], "source": [ "import requests\n", "import base64\n", "\n", "# Read and encode image\n", "with open(\"journal_25_right.png\", \"rb\") as f:\n", " img_base64 = base64.b64encode(f.read()).decode('utf-8')\n", "\n", "url = \"http://gpu05:9998/v1/chat/completions\" # Note: chat/completions, not completions\n", "payload = {\n", " \"model\": \"/home/skiredj.abderrahman/khalil/Qwen3-VL-30B-A3B-Instruct-FP8\",\n", " \"messages\": [\n", " {\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\n", " \"url\": f\"data:image/png;base64,{img_base64}\"\n", " }\n", " },\n", " {\n", " \"type\": \"text\",\n", " \"text\": \"Extract all text from this image. Provide only the text you see, nothing else.\"\n", " }\n", " ]\n", " }\n", " ],\n", " \"max_tokens\": 500\n", "}\n", "\n", "response = requests.post(url, json=payload)\n", "result = response.json()\n", "\n", "print(result)" ] }, { "cell_type": "markdown", "id": "43d7fa1d-eb9e-4957-b4f6-07e464903bdb", "metadata": {}, "source": [ "# deepseek-ai/DeepSeek-OCR" ] }, { "cell_type": "code", "execution_count": 1, "id": "fbb2784f-9bf8-408d-84d7-e19d4229c4e6", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/skiredj.abderrahman/.conda/envs/deepseek_khalil/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n", "The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.\n", "0it [00:00, ?it/s]\n" ] } ], "source": [ "from transformers import AutoModel, AutoTokenizer\n", "import torch\n", "import os" ] }, { "cell_type": "code", "execution_count": 2, "id": "76c3c69a-1289-441b-a5e9-d4b50ec7cb35", "metadata": {}, "outputs": [], "source": [ "\n", "os.environ[\"CUDA_VISIBLE_DEVICES\"] = '0'\n", "model_name = './DeepSeek-OCR'\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "d117d52d-d93c-4d76-afdc-a6ddbfab13c8", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "You are using a model of type deepseek_vl_v2 to instantiate a model of type DeepseekOCR. This is not supported for all configurations of models and can yield errors.\n", "Some weights of DeepseekOCRForCausalLM were not initialized from the model checkpoint at ./DeepSeek-OCR and are newly initialized: ['model.vision_model.embeddings.position_ids']\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" ] } ], "source": [ "tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n", "model = AutoModel.from_pretrained(model_name, trust_remote_code=True, use_safetensors=True)\n", "model = model.eval().cuda().to(torch.bfloat16)\n", "\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "ce9fb536-707f-46b7-9692-ceb88f1607e1", "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/skiredj.abderrahman/.conda/envs/deepseek_khalil/lib/python3.12/site-packages/transformers/generation/configuration_utils.py:590: UserWarning: `do_sample` is set to `False`. However, `temperature` is set to `0.0` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`.\n", " warnings.warn(\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n", "The attention mask is not set and cannot be inferred from input because pad token is same as eos token. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "The `seen_tokens` attribute is deprecated and will be removed in v4.41. Use the `cache_position` model input instead.\n", "`get_max_cache()` is deprecated for all Cache classes. Use `get_max_cache_shape()` instead. Calling `get_max_cache()` will raise error from v4.48\n", "The attention layers in this model are transitioning from computing the RoPE embeddings internally through `position_ids` (2D tensor with the indexes of the tokens), to using externally computed `position_embeddings` (Tuple of tensors, containing cos and sin). In v4.46 `position_ids` will be removed and `position_embeddings` will be mandatory.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[45, 103, 930, 902]]<|/det|>\n", "
- أحمد بلغريبي بن علي لفائدة :
شركة فيفالي سلف ( )
ملاحظة :
مع الاشارة أن هذا الملك خاضع للظهير الشريف رقم 1-62-105 المؤرخ في 27 محرم 1382 الموافق 30 يونيو 1962 المتمم والمغري بالظهير الشريف رقم 1-62-32 بتباري 10 جمادى الأولى 1389 الموافق 25/7/69 المتعلق بضم الازاعي الفلاحية و خاصة الفصل 4 مكرر منه.
- فان المكتب يملك بهذا الرسم العقاري ماسينته 7763558400/434101134
- خديجة الشهيب بنت عبد السلام
- لطيفة بركة بنت عبد السلام
- رقية الطيبي بنت حمان بن محمد
- عبد الاله بركة بن ادريس
- بريعة بركة بنت ادريس
- زهرة بركة بنت دريس
- زهرة الشهيب بنت عبد السلام م
- رشيد الايوي بن محمد بن محمد بن الجيلالي
- حنان الايوي بنت محمد بن محمد بن الجيلالي
- هناء الايوي بنت محمد بن محمد بن الجيلالي
- ابراهيم بلغريبي بن علي
- أحمد بلغريبي بن علي
- عبد الرحمان بلغريبي بن علي
- عبد الواحد بلغريبي بن علي
- محمد بركة بن الجيلالي
- احمد المتوسل بن محمد
- محمد علي حمدان بن الغالي
- محمد المتوسل بن أحمد
- سعيد المتوسل بن أحمد
- يوسف المتوسل بن أحمد
- عبد الرزاق بركة بن الجيلالي
- وفاء المتوسل بنت أحمد
- خديجة المنيوي بنت عبد الرحمان
- زين بلغريبي بنت علي
- عائشة بلغريبي بنت علي
- جمال بركة بن الجيلالي
- المكتب الوطني للكهرباء والماء
- الصالح للشرب - قطاع الماء -
رسم عقاري
\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 724\n", "compression ratio: 0.93\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 34663.67it/s]\n" ] } ], "source": [ "# prompt = \"\\nFree OCR. \"\n", "prompt = \"\\n<|grounding|>Convert the document to markdown.\"\n", "image_file = './images/journal_14.png'\n", "output_path = './output/deepseek_output'\n", "\n", "res = model.infer(tokenizer, prompt=prompt, image_file=image_file, output_path = output_path, base_size = 1024, image_size = 640, crop_mode=True, save_results = True, test_compress = True)" ] }, { "cell_type": "code", "execution_count": null, "id": "bf28ad85-93e2-4826-8490-404b2435b553", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 10, "id": "7b44bfcf-3ec5-43e6-a467-1f90c9a0c8b0", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "You are using a model of type deepseek_vl_v2 to instantiate a model of type DeepseekOCR. This is not supported for all configurations of models and can yield errors.\n", "Some weights of DeepseekOCRForCausalLM were not initialized from the model checkpoint at ./DeepSeek-OCR and are newly initialized: ['model.vision_model.embeddings.position_ids']\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" ] } ], "source": [ "from transformers import AutoModel, AutoTokenizer\n", "import torch\n", "from pathlib import Path\n", "import os\n", "\n", "os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0\"\n", "\n", "# --- Model ---\n", "model_name = \"./DeepSeek-OCR\"\n", "tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n", "model = AutoModel.from_pretrained(model_name, _attn_implementation='flash_attention_2', trust_remote_code=True, use_safetensors=True)\n", "model = model.eval().cuda().to(torch.bfloat16)" ] }, { "cell_type": "code", "execution_count": 25, "id": "9bcd129c-04db-482b-abee-3dd4bc1e9625", "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "ERROR! Session/line number was not unique in database. History logging moved to new session 63\n", "Found 31 images to process\n", "\n", "[1/31] Processing: journal_10.png\n", "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[475, 99, 523, 117]]<|/det|>\n", "ملحق \n", "\n", "<|ref|>text<|/ref|><|det|>[[117, 130, 864, 232]]<|/det|>\n", "بالقرار المشترك لوزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات ووزير الداخلية\n", "ووزير الصناعة والتجارة رقم 2480.23 الصادر في 18 من محرم 1446 (24 يوليو 2024) بتحديد\n", "كيفيات القيام بالتصاريح المتعلقة بالفواكه والخضروات المنتجة في إطار التجميع الفلاحي المرخص\n", "بتسويقها مباشرة دون إلزامية المرور عبر أسواق الجملة \n", "\n", "<|ref|>text<|/ref|><|det|>[[450, 244, 530, 259]]<|/det|>\n", "* * * * * * \n", "\n", "<|ref|>text<|/ref|><|det|>[[202, 278, 802, 328]]<|/det|>\n", "نموذج التصريح المتعلق بالفواكه والخضروات المنتجة في إطار التجميع الفلاحي\n", "المرخص بتسويقها مباشرة دون إلزامية المرور عبر أسواق الجملت \n", "\n", "<|ref|>text<|/ref|><|det|>[[450, 339, 530, 355]]<|/det|>\n", "* * * * * * \n", "\n", "<|ref|>text<|/ref|><|det|>[[154, 371, 839, 414]]<|/det|>\n", "تصريح يتعلق بالفواكه والخضروات المنتجة في إطار التجميع الفلاحى والمرخص بتسويقها مباشرة دون إلزامية المرور عبر أسواقع الجملة \n", "\n", "<|ref|>text<|/ref|><|det|>[[468, 424, 850, 441]]<|/det|>\n", "I. المدة موضوع التصريح: من .................... إلى .................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[675, 444, 850, 461]]<|/det|>\n", "II. تحديد هوية المجمّع: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[707, 471, 880, 489]]<|/det|>\n", "بالنسبة للأشخاص الذاتيين: \n", "\n", "<|ref|>text<|/ref|><|det|>[[308, 501, 850, 518]]<|/det|>\n", "- الإسم العائلي والشخصي: ............................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[290, 522, 850, 539]]<|/det|>\n", "- رقم البطاقة الوطنية للتعريف الإلكترونية أو كل وثيقة تعريف أخرى: ............................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[320, 543, 850, 559]]<|/det|>\n", "- عنوان الإقامة: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[320, 565, 850, 581]]<|/det|>\n", "- البريد الإلكتروني: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[320, 586, 850, 602]]<|/det|>\n", "- الهاتف: ............................................................................................................................ \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[690, 636, 880, 653]]<|/det|>\n", "بالنسبة للأشخاص الاعتباريين: \n", "\n", "<|ref|>text<|/ref|><|det|>[[400, 666, 850, 682]]<|/det|>\n", "- التسمية: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[400, 687, 850, 703]]<|/det|>\n", "- الشكل القانوني: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[400, 708, 850, 724]]<|/det|>\n", "- المقر الاجتماعي: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[330, 729, 850, 745]]<|/det|>\n", "- رقم السجل التجاري أو رقم تعريفي آخر: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[320, 750, 850, 766]]<|/det|>\n", "- الإسم العائلي والشخصي للممثل القانوني: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[400, 771, 850, 787]]<|/det|>\n", "- رقم وثيقة تعريف الممثل القانوني: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[400, 792, 850, 808]]<|/det|>\n", "- البريد الإلكتروني: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[400, 813, 850, 829]]<|/det|>\n", "- الهاتف: ............................................................................................................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[205, 863, 880, 880]]<|/det|>\n", "مرجع شهادة التجميع الفلاحي (الرقم والتاريخ): ................................ تاريخ انتهاء الصلاحية: ................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[179, 890, 880, 907]]<|/det|>\n", "مرجع ترخيص التسويق المباشر للفواكه والخضروات (الرقم والتاريخ): ................................ تاريخ انتهاء الصلاحية: ................................\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 995\n", "compression ratio: 1.27\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 25/25 [00:00<00:00, 121503.59it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_10.png\n", "\n", "[2/31] Processing: journal_12.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[103, 92, 891, 172]]<|/det|>\n", "ملحق بالقرار المشترك لوزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات والوزير المنتدب لدى وزيرة الاقتصاد والمالية المكلف بالميزانية رقم 2003.24 الصادر في 17 من محرم 1446 (23 يوليو 2024) بالترخيص لشركة «AHARA MONITORING Sarl AU» بإنشاء واستغلال مزرعة لتربية الأحياء البحرية تسمى «Sahara Monitoring» وبنشر مستخرج من الاتفاقية المتعلقة بها \n", "\n", "<|ref|>text<|/ref|><|det|>[[137, 193, 860, 255]]<|/det|>\n", "مستخرج من اتفاقية إنشاء واستغلال مزرعة لتربية الأحياء البحرية تسمى «Sahara Monitoring» رقم 2023/GON/468 الموقعة بتاريخ 28 من جمادى الأولى 1445 (12 ديسمبر 2023) بين شركة «AHARA MONITORING Sarl AU» ووزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابا \n", "\n", "<|ref|>text<|/ref|><|det|>[[234, 262, 757, 280]]<|/det|>\n", "(المادة 9 من المرسوم رقم 2.08.562 الصادر في 13 من ذي الحجة 1429 (12 ديسمبر 2008)) \n", "\n", "<|ref|>text<|/ref|><|det|>[[161, 293, 884, 308]]<|/det|>\n", "اسم المستفيد: AHARA MONITORING Sarl AU» المكان مقرها برقم 27، عمارة 2، إقامة نجاح، جي السلام، أكادير. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 312, 884, 326]]<|/det|>\n", "مدة الاتفاقية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[512, 312, 884, 326]]<|/det|>\n", "عشر (10) سنوات، قابلة للتجديد. \n", "\n", "<|ref|>text<|/ref|><|det|>[[465, 333, 884, 348]]<|/det|>\n", "مكان إنشاء مزرعة تربية الأحياء البحرية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 355, 884, 370]]<|/det|>\n", "المساحة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[550, 387, 884, 402]]<|/det|>\n", "الحدود الخارجية لمكان المزرعة. \n", "\n", "<|ref|>table<|/ref|><|det|>[[248, 386, 644, 465]]<|/det|>\n", "
الحدودخط العرضخط الطول
B128°27'9,406\"غربا 11°28'31,985\"
B228°27'15,312\"غربا 11°28'40,749\"
B328°27'28,221\"غربا 11°28'29,611\"
B428°27'22,315\"غربا 11°28'20,847\"
\n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 400, 884, 415]]<|/det|>\n", " \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 430, 884, 445]]<|/det|>\n", " \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 560, 884, 575]]<|/det|>\n", "منطقة حماية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 590, 884, 605]]<|/det|>\n", "الإشارات في البحر. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 610, 884, 625]]<|/det|>\n", "نشاط مزرعة تربية الأحياء البحرية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 640, 884, 655]]<|/det|>\n", "التقنية المستعملة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 670, 884, 684]]<|/det|>\n", "وسائل الاستغلال. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 688, 884, 704]]<|/det|>\n", "المراقبة والتنبع التقني والعلمي. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 718, 884, 733]]<|/det|>\n", "المراقبة البيئية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 748, 884, 762]]<|/det|>\n", "مبلغ الأثاثة المستحقة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 400, 644, 415]]<|/det|>\n", "الحدود الخط العرض \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 400, 360, 415]]<|/det|>\n", "خط الطول \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 418, 360, 432]]<|/det|>\n", "غربا 11°28'31,985\" \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 435, 360, 450]]<|/det|>\n", "غربا 11°28'40,749\" \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 453, 360, 467]]<|/det|>\n", "غربا 11°28'29,611\" \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 470, 360, 484]]<|/det|>\n", "غربا 11°28'20,847\" \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 418, 644, 432]]<|/det|>\n", "B1 \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 435, 644, 450]]<|/det|>\n", "B2 \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 453, 644, 467]]<|/det|>\n", "B3 \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 470, 644, 484]]<|/det|>\n", "B4 \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 488, 360, 503]]<|/det|>\n", "غربا 11°27'43,961\" \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 506, 360, 520]]<|/det|>\n", "غربا 11°27'52,725\" \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 523, 360, 537]]<|/det|>\n", "غربا 11°27'41,585\" \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 540, 360, 554]]<|/det|>\n", "غربا 11°27'32,821\" \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 488, 644, 503]]<|/det|>\n", "B1 \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 506, 644, 520]]<|/det|>\n", "B2 \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 523, 644, 537]]<|/det|>\n", "B3 \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 540, 644, 554]]<|/det|>\n", "B4 \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 567, 640, 581]]<|/det|>\n", "منطقة عرضها خمسون (50) مترا تحيط بالحدود الخارجية لمزرعة تربية الأحياء البحرية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[335, 593, 640, 608]]<|/det|>\n", "ليلا وينا بواسطة إشارات تراعي التنظيم المتعلق بسلامة الملاحة البحرية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[255, 613, 640, 628]]<|/det|>\n", "تربية بوزورك/بلح البحر من الصفنين «Mytilus galloprovincialis» و «Perna perna» \n", "\n", "<|ref|>text<|/ref|><|det|>[[525, 640, 640, 655]]<|/det|>\n", "الحبال الشبه السطحية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[565, 669, 640, 684]]<|/det|>\n", "سفن الخدمة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 688, 884, 704]]<|/det|>\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 1608\n", "compression ratio: 2.06\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 44/44 [00:00<00:00, 237209.99it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_12.png\n", "\n", "[3/31] Processing: journal_13.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[410, 93, 585, 120]]<|/det|>\n", "# نصوص خاصة \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 140, 905, 197]]<|/det|>\n", "مرسوم رقم 2.24.547 صادر في 21 من صفر 1446 (26 أغسطس 2024) بإعلان أن المنفعة العامة تقضي بتزويد جماعة تيسة والجماعات المجاورة لها بالماء الصالح للشرب انطلاقا من سد إدريس الأول وبنزع ملكية القطع الأرضية اللازمة لهذا الغرض بجماعة واد الجمعة بإقليم تاونات. \n", "\n", "<|ref|>text<|/ref|><|det|>[[750, 207, 850, 225]]<|/det|>\n", "رئيس الحكومة، \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 226, 905, 264]]<|/det|>\n", "بناء على القانون رقم 7.81 المتعلق بنزع الملكية لأجل المنفعة العامة وبالاحتلال المؤقت، الصادر بتنفيذه الظهير الشريف رقم 1.81.254 بتاريخ 11 من رجب 1402 (6 ماي 1982)؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[120, 264, 905, 283]]<|/det|>\n", "وعلى المرسوم رقم 2.82.382 الصادر في 2 رجب 1403 (16 أبريل 1983) بتطبيق القانون رقم 7.81 المشار إليه أعلاه؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[177, 283, 905, 302]]<|/det|>\n", "وبعد الاطلاع على ملف البحث الإداري المباشر بجماعة واد الجمعة من 16 نوفمبر 2022 إلى 16 يناير 2023؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[469, 302, 905, 321]]<|/det|>\n", "وباقتراح من وزير التجهيز والماء وبعد استشارة وزير الداخلية، \n", "\n", "<|ref|>text<|/ref|><|det|>[[735, 322, 825, 340]]<|/det|>\n", "رسم ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[456, 340, 539, 359]]<|/det|>\n", "## المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 359, 905, 397]]<|/det|>\n", "يعين أن المنفعة العامة تقضي بتزويد جماعة تيسة والجماعات المجاورة لها بإقليم تاونات بالماء الصالح للشرب انطلاقا من سد إدريس الأول. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[456, 397, 539, 415]]<|/det|>\n", "## المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 415, 905, 453]]<|/det|>\n", "تزع بناء على ما ذكر، ملكية القطع الأرضية الكائنة بجماعة واد الجمعة بإقليم تاونات المبينة في الجدول أسفله والمحددة بالتصاميم التجزئية ذات المقياس 1/1000 الملحقة بأصل هذا المرسوم: \n", "\n", "<|ref|>table<|/ref|><|det|>[[91, 456, 905, 944]]<|/det|>\n", "
أرقام القطع
الارضية
مراجعها
العقارية
أسماء الملاك أو المفترض أنهم الملاكعناوين
الملاك
الملاحظات
سأه
رسم عقاري
عدد 07/30904/7
- محمد لايوي بن محمد
- العربي بن محمد بن الحسين
- علل بن العربي بن محمد
- عبد الرحمان بركة بن محمد بن
محمد
- بوشى بركة بن محمد بن محمد
- محمد بن الطيب بن محمد
- الحريشة
- فاطمة بنت محمد بن الطيب
- بوشى بن محمد بن الطيب
- عبد الله بن محمد بن الطيب
- سلام بن محمد بن الطيب
- محمد بن محمد بن الطيب
- الغالية بنت محمد بن الطيب
- زهور بنت محمد بن الطيب
- عبد النبي بن محمد بن الطيب
- احميدة بن محمد بن الطيب
- محمد بركة بن احمد
- مصطفى بركة بن احمد
- فاطمة بركة بنت احمد
- محمد فاتح بن احمد
- حفيظة فاتح بنت احمد
- رشيدة فاتح بنت احمد
- محمد بركة بن عبد السلام
- الجيللي بركة بن عبد السلام
جملة
واد
الجمعة
002465- مشروع نزع الملكية المقيد بتاريخ 25/10/2017 (سجل: 14 عدد: 994) لقطعة مساحتها 9 هكتار 54 سنتيار لنزع ملكية قطعة ارضية مساحتها 9 هكتار 53 س تقريبا لفائدة: الملكي الوطني للماء الصالح للشرب
- حجز تحفظي المقيد بتاريخ 06/06/2017 (سجل: 20 عدد: 330) ضمانا لدين قدره 290000 درهم كافة الحقوق المشاعة احمد بلغريسي بن علي لفائدة:
- محمد كرزاي
- مشروع نزع الملكية المقيد بتاريخ 05/07/2017 (سجل: 20 عدد: 515) لفائدة الملكي الوطني للكهربائي والماء الصالح للشرب
- قطاع الماء - لقطعتين ارضيتين الأولى مساحتها 72 ار 46 س والثانية مساحتها 90 ار 24 س.
- الرهن الجبري المقيد بتاريخ 14/02/2020 (سجل: 39 عدد: 258) ضمانا لدين مبلغه خمسة وسبعون الف ومائتين وأربعة درهم و تسعة وأربعون سنتيا 75204.49) درهم (كافة الحقوق العائدة للمدين ضد.
- ابراهيم بلغريسي بن علي (المذكورة) أعلاه (لفائدة:
- ادارة الضرائب تمارة (أ)
- حجز تحفظي المقيد بتاريخ 10/03/2022 (سجل: 69 عدد: 989) ضمانا لدين قدره 69773.86 درهم كافة الحقوق المشاعة
- محمد لايوي بن محمد
- العربي بن محمد بن الحسين
- علل بن العربي بن محمد
- عبد الرحمان بركة بن محمد بن
(محمد
- بوشى بركة بن محمد بن محمد
- محمد بن طيب بن محمد
- الحريشة
- فاطمة بنت محمد بن طيب
- بوشى بن محمد بن الطيب
- عبد الله بن محمد ب بن الطيب
- سلام بن محمد بن الطيب
- محمد بن محمد بن طيب
- الغالية بنت محمد بن الطيب
- زهور بنت محمد بن الطيب
- عبد النبي بن محمد بن الطيب
- احميدة ب بن محمد بن الطيب
- محمد بركة بن احمد
- مصطفی بركة بن احمد
- فاطمة بركة بنت احمد
- محمد كرزاي
- مشروع نزع الملكية المقيد بتاريخ
20 عدد: 515) لفائدة الملكي الوطني للكهربائي والماء الصالح للنشر
- قطاع الماء - لقطعتين ارضيتين الأولى مساحةها 90 ار 24 س.
- الرهن الجبري المقيد بتاريخ 15/02/2020 (سجل: 39 عدد: 258) ضمانا لديين مبلغه خمسة وسبعون الف ومائتين وأربعة درهم و تسمعة وأربعون سنتيا 75204.49) درهم (كافة الحقو ق العائدة للمدين ضد.
- ابراهيم بلغريسي بن علي(المذكورة) أعلاه (لفائدة:
- ادارة الضرئاب تمارة (أ)
- حجز تحفظي المقيد بتاريخ 10/3/2022 (سجل: 69 عدد: 989) ضمانا لدين قدره 69773.86 درهم كافة الحقوق المشاعة
- محمد لايوي بن محمد
- العربي بن محمد بن الحسين
- علل نبي العربي بن محمد بن الطيب
- عبد الرحمان بركة بن محمد بن
(محمد
- موشى بركة بن محمد بن محمد بن
- محمد بن طيب بن محمد بن
- الحريشة
- فاطمة بنت محمد بن طيب
(محمد
- بوشى بركة بن محمد بن محمد بن
- محمد بن محمد بن طيب بن محمد
- الغالية بنت محمد بن الطيب
- زهور بنت محمد ب بن الطيب
- عبد النبي بن محمد بن الطيب
- احميدة نبي محمد بن الطيب
- محمد بركة بن احمد
- مصطفى ب ركة بن احمد
- فاطمة بركة بنت احمد
- محمد فاتح بن احمد
- حفيظة فاتح بنت احمد
- محمد كرزا
- مشروع نزع الملكية المقيد بتاريخ 20 عدد: 515) لفائدة الملكي الوطني للكهربائي والماء الصالحي للنشر
- قطاع الماء - لقطعتين ارضيتين الأولوى مساحتها 90 ار 24 س.
- الرهن الجبري المقید بتاريخ 15/02/2020 (سجل: 39 عدد: 258) ضد.
- ابراهيم بلغريسي بن علي (المذكورة)
- ادارة الضرائب تمارة (أ)
- حجز التحفظي المقيد بتاريخ 10/3/2022 (سجل: 69 عدد 989) ضمانا لدين قدره 69773.86 درهم كافة الحقوق المشاعة
- محمد كرزيا
- مشروع نزع الملكية المقيد بتاريخ 20 عدد: 515 (سجل: 20 عدد: 515) لفائدة الملكي الوطني للكهرباين والماء الصالح للنشر
- قطاع الماء - لقطعتين ارضييتين الأولى مساحتها 90 ار 24 س.
- الرهن الجبري المقيدي بتاريخ 15/02/2020 (سجل: 39 عدد: 258) مضمانا لدين مبلغه خمسة وسبعون الف ومائتين وأربعة دهم و تسمعة وأربعون سنتيا 75204.49) درهم(كافة الحقوق العائدة للمدين ضد.
- ابراهيم بلغرىسي بن علي (المذكورة) أعلاه (لفائدة:
- أدارة الضرائب تمارة (أ)
- حجز تحفظي المقيدي بتاريخ 10/3/2022 (سجل: 69 عدد: 989) ضد.
- ابراهيم بلغريسي بن علي (المذكور) أعلاه (لفائدة:
- ادارة الضرائب تمارة(أ)
- حجز تحفظي المقيد بتاريخ 10/3/2020 (سجل: 20 عدد: 515) لفائدة الملكي الوطني للكهربايين والماء الصالح للنشر
- قطاع الماء - لقطعتين ارضييتين الأولى مساحتها 90 ار 24 س.
- الرهن الجبري المقيدي بتاريخ 15/02/2020 (سجل: 39عدد: 258) ضد.
- ابراهيم بلغريسي بن علي (الذكورة) أعلاه (لفائدة:
- ادارة الضرائبي تمارة (أ)
- حجز تحفظي المقيد بتاريخ 10/2/2020 (سجل: 20 عدد: 515) لفائدة الملكي الوطني للماء الصالح للنشر
- قطاع الماء - لقطعتين ارضييتي ن الأولى مساحتها 90 ار 24 س.
- الرهن الجبري المقيدي بتاريخ 15/02/2020 (سجل: 20 عدد: 515) لفائدة الملكي الوطني ل كهربائي والماء الصالح للنشر
- قطاع الماء - لقطعتين ا رضييتين الأولى مساحتها 90 ار 24 س.
- ابراهيم بلغريسي بن علي (الذكورة)أعلاه (لفائدة:
- ادارة الضرائبي تمارة (أ)
- محمد كرزاب
- مشروع نزع الملكية المقيد بتاريخ 20 عدد: 515(سجل: 20 عدد: 515) لفائدة الملكي الوطني للكهربايي والماء الصالح للنشر
- قطاع الماء - لقطعتين ارضيييتين الأولى مساحتها 90 ار 24 س.
- ارباهيم بلغريسي بن علي (الذكورة) أعلاه (لفائدة:
- محمد كرزي
- مشروع نزع الملكية المقيد بتاريخ 20 عدد: 515 ) لفائدة الملكي الوطني للكهربايي والماء الصالح للنشر
- قطعاء الماء - لقطعتين ارضييتين الأولى مساحتها 90 ار24 س.
- الرهن الجبري المقيدي بتاريخ 15/02/20 (سجل: 20 عدد: 515) لفائدة الملكي الوطني للكهربي والماء الصالح للنشر
- قطعاء الماء - لقطعتين ارضيتين الأولى مساحتها 90 ار 24 س.
- ايراهيم بلغريسي بن علي (الذكورة) أعلاه (لفائدة
- ادارة الضرائبي تمارة (أ)
- حجز تحظفي المقيد بتاريخ 10/2/2020 (سجل: 20 عدد: 51) لفائدة الملكي الوطني للكهربايي والماء الصالح للنشر
- محمد كزاب
- مشروع نزع الملكية المقيد بتاريخ 20 عدد:515) لفائدة الملكي الوطني للكهربايي والماء الصالح للنشر

- قطعاء الماء - لقطعتين ارضييتين الأولى مساحته 90 ار 24 س.
- ايراهيم بلغريسي بن علي(الذكورة) أعلاه (لفائدة:
- ادارة الضرئبي تمارة (أ)
- حجز تحظفي المقيد بتاريخ 10 /2/2020 (سجل: 20 عدد: 515) لفائدة الملكي الوطني للكهربايي والماء الصالح للنشر
- قطعاء الماء - لقطععتين ارضييتين الأولى مساحتها 90 ار 24 س.
- محمد كزاب
- مشروع نزع الملكية المقيد ب رتبة 20 عدد: 515) لفائدة الملكي الوطني للكهربايي والماء السالح للنشر
- قطعاء الماء - لقطععتين ارضييتين الأو لى مساحتها 90 ار 24 س.
- ايراهيم بلغرىسي بن علي (الذكورة) أعلاه (لفائدة:
- أدارة الضرائبي تمارة (أ)
- حجز تحظفي المقيدي بتاريخ 10/2/2020 (سجل: 20 عدد: 515) ل فائدة الملكي الوطني للكهربايي والماء الصالح للنشر
- قطعااء الماء - لقطععتين ارضييتين الأولى مساحتها 90 ا ر 24 س.
- ايراهيم بلغريسي بن علي (الذكرورة) أعلاه (لفائدة:
- ادارة الضرائبي تمار (أ)
- حجز تحظفي المقيد بتاريخ 10/2/20 (سجل: 20 عدد: 515) لفائدة الملكي الوطني للكربايي والماء الصالح للنشر
- قطعاء الماء - لقطععتي ارضييتين الأولى مساحتها 90 ار 24 س.
\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 3815\n", "compression ratio: 4.88\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 13/13 [00:00<00:00, 86549.13it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_13.png\n", "\n", "[4/31] Processing: journal_14.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[45, 103, 930, 902]]<|/det|>\n", "
- أحمد بلغريبي بن علي لفائدة :
شركة فيفالي سلف ( )
ملاحظة :
مع الاشارة أن هذا الملك خاضع للظهير الشريف رقم 1-62-105 المؤرخ في 27 محرم 1382 الموافق 30 يونيو 1962 المتمم والمغري بالظهير الشريف رقم 1-62-32 بتباري 10 جمادى الأولى 1389 الموافق 25/7/69 المتعلق بضم الازاعي الفلاحية و خاصة الفصل 4 مكرر منه.
- فان المكتب يملك بهذا الرسم العقاري ماسينته 7763558400/434101134
- خديجة الشهيب بنت عبد السلام
- لطيفة بركة بنت عبد السلام
- رقية الطيبي بنت حمان بن محمد
- عبد الاله بركة بن ادريس
- بريعة بركة بنت ادريس
- زهرة بركة بنت دريس
- زهرة الشهيب بنت عبد السلام م
- رشيد الايوي بن محمد بن محمد بن الجيلالي
- حنان الايوي بنت محمد بن محمد بن الجيلالي
- هناء الايوي بنت محمد بن محمد بن الجيلالي
- ابراهيم بلغريبي بن علي
- أحمد بلغريبي بن علي
- عبد الرحمان بلغريبي بن علي
- عبد الواحد بلغريبي بن علي
- محمد بركة بن الجيلالي
- احمد المتوسل بن محمد
- محمد علي حمدان بن الغالي
- محمد المتوسل بن أحمد
- سعيد المتوسل بن أحمد
- يوسف المتوسل بن أحمد
- عبد الرزاق بركة بن الجيلالي
- وفاء المتوسل بنت أحمد
- خديجة المنيوي بنت عبد الرحمان
- زين بلغريبي بنت علي
- عائشة بلغريبي بنت علي
- جمال بركة بن الجيلالي
- المكتب الوطني للكهرباء والماء
- الصالح للشرب - قطاع الماء -
رسم عقاري
\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 724\n", "compression ratio: 0.93\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 16070.13it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_14.png\n", "\n", "[5/31] Processing: journal_15_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[77, 92, 960, 202]]<|/det|>\n", "«المادة الأولى. - تفوض إلى الأشخاص الواردة أسماؤهم في الجدول «التالي، كل حسب اختصاصه الترابي، سلطة ترخيص مباشرة التحصيل «الجبري من طرف المحاسبين التابعين للخزينة العامة للمملكة طبقا للمادة 37 من القانون رقم 15.97 المشار إليه أعلاه بمثابة مدونة «تحصيل الديون العمومية: \n", "\n", "<|ref|>table<|/ref|><|det|>[[77, 207, 960, 511]]<|/det|>\n", "
المفوض إليهمالمهامالنوابالاختصاص الترابي
توفيق القب.خازن عمالة الدار البيضاء - الجنوبمحمد خلق، المتصرف من الدرجة الأولى
محمد كوبرزيم.خازن عمالة المحمدية بالنيابة.سعيد بوخالد، المتصرف من الدرجة الأولى
الحسين العمري.الخازن الإقليمي بالقنطرةعبد الملك الحميداني، المتصرف من الدرجة الأولى
الميلودية الخالدي.الخازن الإقليمي بالنيابة بسيدي قاسم.أنس المقي، المتصرف من الدرجة الثانية.
المادة الثانية
ينشر هذا القرار بالجريدة الرسمية.
وحمر بالرباط في 24 من ذي الحجة 1445 (فاتح يوليو 2024).
الإمضاء: نادية فتاح.
\n", "\n", "<|ref|>text<|/ref|><|det|>[[77, 682, 960, 767]]<|/det|>\n", "قرار لوزيرة الاقتصاد والمالية رقم 2143.24 صادر في 24 من ذي الحجة 1445 (فاتح يوليو 2024) بتغيير القرار رقم 3257.21 الصادر في 14 من ربيع الأول 1443 (21 أكتوبر 2021) بتفويض السلطة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[571, 792, 841, 810]]<|/det|>\n", "وزيرة الاقتصاد والمالية، \n", "\n", "<|ref|>text<|/ref|><|det|>[[77, 816, 966, 881]]<|/det|>\n", "بعد الاطلاع على قرار وزيرة الاقتصاد والمالية رقم 3257.21 الصادر في 14 من ربيع الأول 1443 (أكتوبر 2021) بتفويض السلطة؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[77, 889, 966, 931]]<|/det|>\n", "وبناء على المرسوم رقم 2.22.81 الصادر في 8 رمضان 1444 (30 مارس 2023) المتعلق بتفويض السلطة والإمضاء؛\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 750\n", "compression ratio: 1.92\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 6/6 [00:00<00:00, 131758.24it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_15_left.png\n", "\n", "[6/31] Processing: journal_15_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[28, 92, 914, 340]]<|/det|>\n", "
المفوض إليهمالمهامالاختصاص الترابي
المصطفى الزهراوي، المتصرف من الدرجة الأولى.الخازن الجهوي بوجدة.جهة الشرق.
توفيق صديقي، المتصرف من الدرجة الأولى.الخازن الجهوي ببي مالل.جهة بي مالل - خنيفرة.
عبد العزيز الحوائي، المتصرف من الدرجة الأولى.الخازن الجهوي باكدير.جهة سوس - ماسة ؛
جهة كلميم - واد نون ؛
جهة الداخلة - وادي الذهب ؛
جهة العيون - الساقية الحمراء.
(الباقي لا تغيير فيه).
المادة الثانية
ينشر هذا القرار بالجريدة الرسمية.
وحمر بالرباط في 24 من ذي الحجة 1445 (فاتح يوليو 2024).
الإمضاء: نادية فتاح.
\n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 523, 920, 612]]<|/det|>\n", "قرار لوزيرة الاقتصاد والمالية رقم 2142.24 صادر في 24 من ذي الحجة 1445 (فاتح يوليو 2024) بتغيير القرار رقم 2849.22 الصادر في 4 صفر 1444 (فاتح سبتمبر 2022) بتفويض السلطة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[515, 644, 790, 661]]<|/det|>\n", "وزيرة الاقتصاد والمالية، \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 668, 920, 714]]<|/det|>\n", "بعد الاطلاع على قرار وزيرة الاقتصاد والمالية رقم 2849.22 الصادر في 4 صفر 1444 (فاتح سبتمبر 2022) بتفويض السلطة؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 724, 920, 769]]<|/det|>\n", "وبناء على المرسوم رقم 2.22.81 الصادر في 8 رمضان 1444 (30 مارس 2023) المتعلق بتفويض السلطة والإمضاء؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 778, 920, 823]]<|/det|>\n", "وعلى المرسوم رقم 2.21.829 الصادر في 14 من ربيع الأول 1443 (21 أكتوبر 2021) المتعلق باختصاصات وزيرة الاقتصاد والمالية، \n", "\n", "<|ref|>text<|/ref|><|det|>[[600, 833, 777, 851]]<|/det|>\n", "قدرت ما يلي: \n", "\n", "<|ref|>text<|/ref|><|det|>[[395, 858, 555, 877]]<|/det|>\n", "المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 888, 920, 933]]<|/det|>\n", "تغير على النحو التالي المادة الأولى من القرار المشار إليه أعلاه رقم 2849.22 بتاريخ 4 صفر 1444 (فاتح سبتمبر 2022):\n", "==================================================\n", "image size: (2386, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 774\n", "compression ratio: 1.98\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 9/9 [00:00<00:00, 210886.79it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_15_right.png\n", "\n", "[7/31] Processing: journal_16_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[744, 95, 999, 124]]<|/det|>\n", "## عامة \n", "\n", "<|ref|>text<|/ref|><|det|>[[350, 145, 707, 164]]<|/det|>\n", "قانون تنظيمي رقم 30.24 \n", "\n", "<|ref|>text<|/ref|><|det|>[[185, 167, 832, 231]]<|/det|>\n", "يقضي بتغيير وتتميم القانون التنظيمي رقم 02.12\n", "المتعلق بالتعيين في المناصب العليا تطبيقا لأحكام\n", "الفصلين 49 و92 من الدستور \n", "\n", "<|ref|>text<|/ref|><|det|>[[450, 260, 610, 278]]<|/det|>\n", "مادة فريدة \n", "\n", "<|ref|>text<|/ref|><|det|>[[87, 288, 999, 390]]<|/det|>\n", "يغير ويتمم، على النحو التالي، المحققان رقم 1 ورقم 2 المرفقان\n", "بالقانون التنظيمي رقم 02.12 من شعبان 1433/17 يوليو 2012)،\n", "الشريف رقم 1.12.20 بتاريخ 27 من شعبان 1433/17 يوليو 2012)،\n", "كما وقع تغييره وتتميمه: \n", "\n", "<|ref|>text<|/ref|><|det|>[[430, 400, 612, 418]]<|/det|>\n", "«الملحق رقم 1» \n", "\n", "<|ref|>text<|/ref|><|det|>[[187, 448, 860, 466]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجية» \n", "\n", "<|ref|>text<|/ref|><|det|>[[384, 474, 928, 492]]<|/det|>\n", "(أ) المؤسسات العمومية الاستراتيجية: \n", "\n", "<|ref|>text<|/ref|><|det|>[[500, 504, 928, 519]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجي» \n", "\n", "<|ref|>text<|/ref|><|det|>[[500, 529, 928, 545]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجيه» \n", "\n", "<|ref|>text<|/ref|><|det|>[[450, 561, 928, 579]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجى» \n", "\n", "<|ref|>text<|/ref|><|det|>[[530, 588, 928, 604]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجيا» \n", "\n", "<|ref|>text<|/ref|><|det|>[[500, 616, 928, 631]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجا» \n", "\n", "<|ref|>text<|/ref|><|det|>[[500, 667, 928, 683]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجة» \n", "\n", "<|ref|>text<|/ref|><|det|>[[530, 694, 928, 710]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجو» \n", "\n", "<|ref|>text<|/ref|><|det|>[[430, 721, 928, 737]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجيو» \n", "\n", "<|ref|>text<|/ref|><|det|>[[580, 748, 928, 764]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجين» \n", "\n", "<|ref|>text<|/ref|><|det|>[[500, 775, 928, 791]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجون» \n", "\n", "<|ref|>text<|/ref|><|det|>[[325, 803, 928, 819]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجن» \n", "\n", "<|ref|>text<|/ref|><|det|>[[480, 830, 928, 846]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجم» \n", "\n", "<|ref|>text<|/ref|><|det|>[[365, 857, 928, 873]]<|/det|>\n", "«الئحة المؤسسات والمقاولات العمومية الاستراتيجك» \n", "\n", "<|ref|>text<|/ref|><|det|>[[562, 884, 928, 900]]<|/det|>\n", "(الباقي لا تغيير فيه.)\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 864\n", "compression ratio: 2.22\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 22/22 [00:00<00:00, 297660.28it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_16_left.png\n", "\n", "[8/31] Processing: journal_16_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[0, 95, 150, 120]]<|/det|>\n", "## نصوص \n", "\n", "<|ref|>text<|/ref|><|det|>[[22, 145, 915, 241]]<|/det|>\n", "ظهر شريف رقم 1.24.45 صادر في 11 من صفر 1446 (16 أغسطس 2024)\n", "بتنفيذ القانون التنظيمي رقم 30.24 بتغيير وتتميم القانون\n", "التنظيمي رقم 02.12 المتعلق بالتعيين في المناصب العليا تطبيقا\n", "لأحكام الفصلين 49 و 92 من الدستور. \n", "\n", "<|ref|>text<|/ref|><|det|>[[644, 277, 840, 293]]<|/det|>\n", "الحمد لله وحده، \n", "\n", "<|ref|>text<|/ref|><|det|>[[300, 304, 625, 321]]<|/det|>\n", "الطابع الشريف - بداخله : \n", "\n", "<|ref|>text<|/ref|><|det|>[[135, 329, 760, 347]]<|/det|>\n", "(محمد بن الحسن بن محمد بن يوسف الله وليه) \n", "\n", "<|ref|>text<|/ref|><|det|>[[80, 358, 825, 376]]<|/det|>\n", "يعلم من ظهرنا الشريف هذا، أسماء الله وأعز أمره أننا : \n", "\n", "<|ref|>text<|/ref|><|det|>[[40, 393, 856, 410]]<|/det|>\n", "بناء على الدستور ولا سيما الفصول 42 و 50 و 85 و 132 منه : \n", "\n", "<|ref|>text<|/ref|><|det|>[[15, 427, 920, 572]]<|/det|>\n", "وبعد الاطلاع على قرار المحكمة الدستورية رقم 24-24 م.د\n", "الصادر في 3 صفر 1446 (8 أغسطس 2024) الذي صرح بمقتضاه :\n", "«بأن ما ورد في القانون التنظيمي رقم 30.24 القاضي بتغيير وتتميم\n", "القانون التنظيمي رقم 02.12 المتعلق بالتعيين في المناصب العليا\n", "تطبيقا لأحكام الفصلين 49 و 92 من الدستور، ليس فيه ما يخالف\n", "الدستور»، \n", "\n", "<|ref|>text<|/ref|><|det|>[[380, 583, 750, 600]]<|/det|>\n", "أصدرنا أمرنا الشريف بما يلي : \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 611, 920, 732]]<|/det|>\n", "ينفذ وينشر بالجريدة الرسمية، عقب ظهرنا الشريف هذا،\n", "القانون التنظيمي رقم 30.24 القاضي بتغيير وتتميم القانون التنظيمي\n", "رقم 02.12 المتعلق بالتعيين في المناصب العليا تطبيقا لأحكام الفصلين\n", "49 و 92 من الدستور، كما وافق عليه مجلس النواب ومجلس\n", "المستشارين. \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 747, 789, 765]]<|/det|>\n", "وحرر بتطوان في 11 من صفر 1446 (16 أغسطس 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[650, 785, 825, 799]]<|/det|>\n", "وقعه بالعطف : \n", "\n", "<|ref|>text<|/ref|><|det|>[[660, 817, 825, 831]]<|/det|>\n", "رئيس الحكومة، \n", "\n", "<|ref|>text<|/ref|><|det|>[[620, 849, 863, 863]]<|/det|>\n", "الإمضاء : عزيز أخنوش. \n", "\n", "<|ref|>text<|/ref|><|det|>[[456, 876, 485, 887]]<|/det|>\n", "* \n", "\n", "<|ref|>text<|/ref|><|det|>[[406, 911, 530, 923]]<|/det|>\n", "* * *\n", "==================================================\n", "image size: (2386, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 761\n", "compression ratio: 1.95\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 16/16 [00:00<00:00, 233828.79it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_16_right.png\n", "\n", "[9/31] Processing: journal_17_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[70, 92, 930, 111]]<|/det|>\n", "«المادة 2. - تمنح ............................ وطني للإعلام والاتصال.» \n", "\n", "<|ref|>text<|/ref|><|det|>[[70, 125, 930, 164]]<|/det|>\n", "«يخصص غلاف مالي سنوي بقيمة ثلاثة ملايين درهم (3.000.000 درهم) لتنظيم هذه الجائزة.» \n", "\n", "<|ref|>text<|/ref|><|det|>[[156, 177, 884, 196]]<|/det|>\n", "«يمكن ............................ هذا الغلاف المالي.» \n", "\n", "<|ref|>text<|/ref|><|det|>[[70, 209, 930, 248]]<|/det|>\n", "«المادة 3. - تشتمل «الجائزة الوطنية الكبرى للصحافة» على «الأصناف التالية: \n", "\n", "<|ref|>text<|/ref|><|det|>[[640, 263, 884, 280]]<|/det|>\n", "1- جائزة التلفزة؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[450, 294, 884, 310]]<|/det|>\n", "2- ............................؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[450, 325, 884, 341]]<|/det|>\n", "3- ............................؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[450, 356, 884, 372]]<|/det|>\n", "4- ............................؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[520, 386, 884, 403]]<|/det|>\n", "5- جائزة صحافة الوكالة؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[500, 417, 884, 434]]<|/det|>\n", "6- جائزة الصحافة الجهوية؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[420, 448, 884, 465]]<|/det|>\n", "7- جائزة الإنتاج الصحافي الأمازيغي؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[70, 479, 884, 497]]<|/det|>\n", "8- جائزة الإنتاج الصحافي حول الثقافة والمجال الصحراوي الحساني؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[640, 510, 884, 527]]<|/det|>\n", "9- جائزة الصورة؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[480, 541, 884, 558]]<|/det|>\n", "10- جائزة التحقيق الصحفي؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[460, 572, 884, 589]]<|/det|>\n", "11- جائزة الرسم الكاريكاتوري؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[70, 602, 930, 641]]<|/det|>\n", "12- جائزة تقديرية تمنح لشخصية إعلامية وطنية ساهمت إسهاما «متميزا في تطوير الإعلام الوطني وترسيخ المبادئ النبيلة للمهنة؛» \n", "\n", "<|ref|>text<|/ref|><|det|>[[70, 655, 930, 695]]<|/det|>\n", "13- جائزة تقديرية تمنح للصحفيين المغاربة العاملين في «مؤسسات صحافية أجنبية من داخل أو خارج المغرب.» \n", "\n", "<|ref|>text<|/ref|><|det|>[[206, 709, 884, 726]]<|/det|>\n", "«ويمكن ............................ الأصناف.» \n", "\n", "<|ref|>text<|/ref|><|det|>[[70, 740, 930, 900]]<|/det|>\n", "«المادة 4. - تبلغ قيمة المكافأة المالية لجوائز التلفزة، والإذاعة، «الصحافة المكتوبة، والصحافة الإلكترونية، وصحافة الوكالة، «الصحافة الجهوية، وجائزة الإنتاج الصحافي الأمازيغي، والإنتاج «الصحافي حول الثقافة والمجال الصحراوي الحساني، والصورة، «التحقيق الصحفي، والرسم الكاريكاتوري، مائة ألف درهم (100.000 درهم)، لكل واحدة منها، ومائة وعشرون ألف درهم (120.000 درهم)، لكل صنف من الجائزتين التقديريتين.» \n", "\n", "<|ref|>text<|/ref|><|det|>[[206, 914, 884, 931]]<|/det|>\n", "«ويمكن تغيير ............................ بالمالية.»\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 855\n", "compression ratio: 2.19\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 20/20 [00:00<00:00, 283398.92it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_17_left.png\n", "\n", "[10/31] Processing: journal_17_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[370, 92, 570, 110]]<|/det|>\n", "## «الملحق رقم 2 \n", "\n", "<|ref|>text<|/ref|><|det|>[[100, 135, 840, 174]]<|/det|>\n", "«لائحة بتتميم المناصب العليا التي يتم التداول في شأنها\n", "في مجلس الحكومة \n", "\n", "<|ref|>text<|/ref|><|det|>[[206, 180, 864, 200]]<|/det|>\n", "(أ) المسؤولون عن المؤسسات العمومية التالية: \n", "\n", "<|ref|>text<|/ref|><|det|>[[404, 207, 864, 222]]<|/det|>\n", "«......» \n", "\n", "<|ref|>text<|/ref|><|det|>[[404, 234, 864, 249]]<|/det|>\n", "«......» \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 260, 870, 298]]<|/det|>\n", "(ب) المسؤولون عن المقاولات العمومية ............ هذا القانون\n", "«التنظيمي». \n", "\n", "<|ref|>text<|/ref|><|det|>[[212, 304, 864, 323]]<|/det|>\n", "(ج) المناصب العليا بالإدارات العمومية التالية: \n", "\n", "<|ref|>text<|/ref|><|det|>[[404, 330, 864, 345]]<|/det|>\n", "«......» \n", "\n", "<|ref|>text<|/ref|><|det|>[[404, 357, 864, 372]]<|/det|>\n", "«......» \n", "\n", "<|ref|>text<|/ref|><|det|>[[444, 384, 864, 400]]<|/det|>\n", "- رئيس المجلس العام للتجهيز: \n", "\n", "<|ref|>text<|/ref|><|det|>[[340, 408, 864, 425]]<|/det|>\n", "- رئيس المجلس العام للتنمية الفلاحية: \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 433, 864, 470]]<|/det|>\n", "- المفتشون الجهويون للتعمير والهندسة المعمارية وإعداد التراب\n", "«الوطني»: \n", "\n", "<|ref|>text<|/ref|><|det|>[[360, 480, 864, 496]]<|/det|>\n", "- رؤساء .................... القطاعية: \n", "\n", "<|ref|>text<|/ref|><|det|>[[370, 504, 864, 520]]<|/det|>\n", "- رؤساء .................... المشتركة.» \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 550, 916, 627]]<|/det|>\n", "مرسوم رقم 2.24.366 صادر في 21 من صفر 1446 (26 أغسطس 2024)\n", "بتغيير وتتميم المرسوم رقم 2.03.729 الصادر في 18 من ربيع\n", "الآخر 1425 (7 يونيو 2004) بإحداث «الجائزة الوطنية الكبرى\n", "للصحافة». \n", "\n", "<|ref|>text<|/ref|><|det|>[[580, 658, 764, 675]]<|/det|>\n", "رئيس الحكومة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[404, 684, 870, 702]]<|/det|>\n", "بناء على الفصل 90 من الدستور: \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 710, 916, 767]]<|/det|>\n", "وبعد الاطلاع على المرسوم رقم 2.03.729 الصادر في 18 من ربيع\n", "الأخر 1425 (7 يونيو 2004) بإحداث «الجائزة الوطنية ال\n", "كبرى للصحافة»، كما وقع تغييره وتتميمه: \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 775, 916, 813]]<|/det|>\n", "وبعد المداولة في مجلس الحكومة المنعقد بتاريخ 12 من محرم 1446\n", "(18 يوليو 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[607, 822, 777, 839]]<|/det|>\n", "رسم ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[420, 847, 550, 865]]<|/det|>\n", "## المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 873, 916, 930]]<|/det|>\n", "تغير وتتمم، على النحو التالي، مقتضيات المواد 2 و 3 و 4 و 5\n", "من المرسوم المشار إليه أعلاه رقم 2.03.729 الصادر في 18 من ربيع\n", "الأخر 1445 (7 يونيو 2004):\n", "==================================================\n", "image size: (2386, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 867\n", "compression ratio: 2.22\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 22/22 [00:00<00:00, 309646.60it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_17_right.png\n", "\n", "[11/31] Processing: journal_18_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[420, 93, 585, 110]]<|/det|>\n", "## المادة السادسة \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 132, 951, 270]]<|/det|>\n", "يسند إلى وزير التعليم العالي والبحث العلمي والابتكار تنفيذ هذا المرسوم، الذي ينشر بالجريدة الرسمية، وتسري أحكامه على جميع الطلبة المسجلين بالمسالك المعتمدة بمدرسة الدراسات العليا للمحاسبة والمالية - HECF Fès والمشار إليها في الجدول المرفق بهذا المرسوم. \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 290, 820, 309]]<|/det|>\n", "وحزر بالرباط في 21 من صفر 1446 (26 أغسطس 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[188, 335, 440, 350]]<|/det|>\n", "الإمضاء : عزيز أخنوش. \n", "\n", "<|ref|>text<|/ref|><|det|>[[631, 370, 808, 384]]<|/det|>\n", "وقعه بالعطف : \n", "\n", "<|ref|>text<|/ref|><|det|>[[494, 404, 939, 420]]<|/det|>\n", "وزير التعليم العالي والبحث العلمي والابتكار، \n", "\n", "<|ref|>text<|/ref|><|det|>[[560, 440, 875, 455]]<|/det|>\n", "الإمضاء : عبد اللطيف ميراوي.\n", "==================================================\n", "image size: (2375, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 292\n", "compression ratio: 0.75\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 7/7 [00:00<00:00, 215883.29it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_18_left.png\n", "\n", "[12/31] Processing: journal_18_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[380, 92, 567, 110]]<|/det|>\n", "## المادة الرابعة \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 130, 920, 327]]<|/det|>\n", "من أجل تطبيق أحكام الفقرة الأولى من المادة 54 من القانون المشار إليه أعلاه رقم 01.00 المتعلق بتنظيم التعليم العالي، ومقتضيات المادة 7 من المرسوم السالف الذكر رقم 2.14.665، يؤشر رئيس جامعة سيدي محمد بن عبد الله بفاس على الشهادات والدبلومات المسلمة من لدن مدرسة الدراسات العليا للمحاسبة والمالية - HECF، في إطار المسالك المعتمدة، ابتداء من تاريخ سريان مفعول هذا المرسوم. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[370, 345, 570, 362]]<|/det|>\n", "## المادة الخامسة \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 380, 920, 458]]<|/det|>\n", "يجوز لمدرسة الدراسات العليا للمحاسبة والمالية - HECF Fès، طيلة مدة منح الاعتراف، استعمال عبارة «مدرسة معرف بها» ضمن إعلانتها والوثائق الصادرة عنها.\n", "==================================================\n", "image size: (2389, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 272\n", "compression ratio: 0.7\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 4/4 [00:00<00:00, 136400.13it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_18_right.png\n", "\n", "[13/31] Processing: journal_19.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[253, 103, 757, 170]]<|/det|>\n", "ملحق المرسوم رقم 2.24.481 الصادر في 21 من صفر 1446 (26 أغسطس 2024)\n", "القاضي بمنح اعتراف الدولة بمدرسة الدراسات العليا للمحاسبة والمالية بفاس– HECF Fès \n", "\n", "<|ref|>text<|/ref|><|det|>[[429, 191, 580, 220]]<|/det|>\n", "________________ \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[395, 220, 616, 252]]<|/det|>\n", "جدول يحدد معادلة الدبلومات المسلمة \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[275, 256, 747, 289]]<|/det|>\n", "من لدن مدرسة الدراسات العليا للمحاسبة والمالية مع الشهادات الوطنية المطابقة لها \n", "\n", "<|ref|>table<|/ref|><|det|>[[119, 323, 890, 860]]<|/det|>\n", "
الرقم الترتيبيتسمية الدبلوم (باللغة العربية)تسمية الدبلوم (باللغة الفرنسية/اللغة الإنجليزية)مدة التكوينالشهادة أو الدبلوم الوطني المعادل (ة) له
1دبلوم في \"التدبير والمنظمات\" اختيارات: - المحاسبة والتسيير - المالية والبنك - التسويق والتجارةDiplôme en « Management et Organisations » Options: - Comptabilité et Gestion - Finance et Banque - Marketing et Commerceثلاث سنوات دراسية متتالية بعد شهادة الباكالورياشهادة الإجازة المهنية
2دبلوم في \"التدبير وإدارة الأعمال\" اختيارات: - المحاسبة والتسيير - المالية والبنك - التسوق والتجارةDiplôme en « Management et Administration des Affaires » Options: - Comptabilité et Gestion - Finance et Banque - Marketing et Commerce.ثلاث سنوات دراسية متتالية بعد شهادة الباكالوریاشهادة الإجازة المهنية
\n", "==================================================\n", "image size: (3368, 2382)\n", "valid image tokens: 781\n", "output texts tokens (valid): 481\n", "compression ratio: 0.62\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 5/5 [00:00<00:00, 150874.24it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_19.png\n", "\n", "[14/31] Processing: journal_1_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[83, 92, 970, 175]]<|/det|>\n", "«يجب أن تقرن هذه الشهادة بتدريب مدته ثلاث سنوات مع «اجتياز امتحان تقييمي بنجاح مسلم من طرف إحدى كليات الطب «والصيدلة بالمغرب الذي تصادق عليه اللجنة القطاعية لعلوم «الصحة». \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[440, 188, 610, 203]]<|/det|>\n", "## المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[440, 217, 910, 233]]<|/det|>\n", "ينشر هذا القرار بالجريدة الرسمية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 245, 750, 262]]<|/det|>\n", "وحرر بالرباط في 10 محرم 1446 (16 يوليو 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[201, 281, 510, 294]]<|/det|>\n", "الإمضاء: عبد اللطيف ميراوي. \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 323, 970, 412]]<|/det|>\n", "قرار لوزير التعليم العالي والبحث العلمي والابتكار رقم 1857.24 صادر في 10 محرم 1446 (16 يوليو 2024) بتتميم القرار رقم 2963.97 الصادر في 2 شعبان 1418 (3 ديسمبر 1997) بتحديد لائحة الشهادات التي تعادل دبلوم دكتور في الطب. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[311, 440, 833, 456]]<|/det|>\n", "## وزير التعليم العالي والبحث العلمي والابتكار، \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 464, 970, 550]]<|/det|>\n", "بعد الاطلاع على قرار وزير التعليم العالي والبحث العلمي والثقافة رقم 2963.97 الصادر في 2 شعبان 1418 (3 ديسمرب 1997) بتحديد لائحة الشهادات التي تعادل دبلوم الدكتور في الطب، كما وقع تغييره وتتميمه : \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 562, 970, 625]]<|/det|>\n", "وبناء على المرسوم رقم 2.21.838 الصادر في 14 من ربيع الأول 1443 (21 أكتوبر 2021) المتعلق باختصاصات وزير التعليم العالي والبحث العلمي والابتكار؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 636, 970, 676]]<|/det|>\n", "وبعد استشارة اللجنة القطاعية لعلوم الصحة المنعقدة بتاريخ 22 ماي 2024: \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 689, 970, 729]]<|/det|>\n", "وبعد استطلاع رأي المجلس الوطني للهيئة الوطنية للطبيبات والأطباء، \n", "\n", "<|ref|>text<|/ref|><|det|>[[680, 738, 833, 754]]<|/det|>\n", "قرار ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[448, 763, 610, 780]]<|/det|>\n", "## المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 792, 970, 832]]<|/det|>\n", "تتمم على النحو التالي المادة الأولى من القرار المشار إليه أعلاه رقم 2963.97 الصادر في 2 شعبان 1418 (3 ديسمبر 1997): \n", "\n", "<|ref|>text<|/ref|><|det|>[[83, 844, 970, 928]]<|/det|>\n", "«المادة الأولى. - تحدد على النحو التالي لائحة الشهادات التي تعادل «دبلوم دكتور في الطب، مشفوعة بشهادة البكالوريا للتعليم الثانوي «شعبة العلوم التجريبية أو العلوم الرياضية أو دبلوم معترف «بمعادلته لها:\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 813\n", "compression ratio: 2.08\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 15/15 [00:00<00:00, 244803.74it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_1_left.png\n", "\n", "[15/31] Processing: journal_1_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[384, 92, 555, 110]]<|/det|>\n", "## المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[384, 120, 850, 139]]<|/det|>\n", "ينشر هذا القرار بالجريدة الرسمية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 149, 707, 169]]<|/det|>\n", "وحرب بالرباط في 10 محرم 1446 (16 يوليو 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[135, 185, 444, 200]]<|/det|>\n", "الإمضاء: عبد اللطيف ميراوي. \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 225, 911, 330]]<|/det|>\n", "قرار لوزير التعليم العالي والبحث العلمي والابتكار رقم 1856.24 صادر في 10 محرم 1446 (16 يوليو 2024) بتتميم القرار رقم 2188.04 الصادر في 14 من ذي القعدة 1425 (27 ديسمبر 2004) بتحديد لائحة الشهادات التي تعادل دبلوم التخصص في الطب، تخصص: أمراض العيون. \n", "\n", "<|ref|>text<|/ref|><|det|>[[252, 352, 800, 371]]<|/det|>\n", "وزير التعليم العالي والبحث العلمي والابتكار، \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 377, 911, 481]]<|/det|>\n", "بعد الاطلاع على قرار وزير التربية الوطنية والتعليم العالي وتكوين الأطر والبحث العلمي رقم 2188.04 الصادر في 14 من ذي القعدة 1426 (27 ديسمبر 2004) بتحديد لائحة الشهادات التي تعادل ببلوم التخصص في الطب، تخصص: أمراض العيون، كما وقع تتميمه: \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 492, 911, 550]]<|/det|>\n", "وبناء على المرسوم رقم 2.21.838 الصادر في 14 من ربيع الأول 1443 (21 أكتوبر 2021) المتعلق باختصاصات وزير التعليم العالي والبحث العلمي والابتكار؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 560, 911, 598]]<|/det|>\n", "وبعد استشارة اللجنة القطاعية لعلوم الصحة المنعقدة بتاريخ 22 ماي 2024؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 606, 911, 645]]<|/det|>\n", "وبعد استطلاع رأي المجلس الوطني للهيئة الوطنية للطبيبات والأطباء، \n", "\n", "<|ref|>text<|/ref|><|det|>[[600, 652, 750, 670]]<|/det|>\n", "قرار ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[390, 674, 550, 692]]<|/det|>\n", "## المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 702, 911, 741]]<|/det|>\n", "تتمم على النحو التالي المادة الأولى من القرار المشار إليه أعلاه رقم 2188.04 الصادر في 14 من ذي القعدة 1427 (27 ديسمبر 2004): \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 749, 911, 789]]<|/det|>\n", "«المادة الأولى - تحدد على النحو التالي لائحة الشهادات التي تعادل «دبلوم التخصص في الطب، تخصص: أمراض العيون: \n", "\n", "<|ref|>text<|/ref|><|det|>[[27, 800, 830, 816]]<|/det|>\n", "«- فيدرالية روسيا: \n", "\n", "<|ref|>text<|/ref|><|det|>[[67, 830, 920, 846]]<|/det|>\n", "«- Diploma, specialization in ophtalmology, délivré par \n", "\n", "<|ref|>text<|/ref|><|det|>[[80, 846, 911, 863]]<|/det|>\n", "« Peoples Friendship University of Russia - Fédération de \n", "\n", "<|ref|>text<|/ref|><|det|>[[80, 863, 220, 879]]<|/det|>\n", "« Russie.\n", "==================================================\n", "image size: (2386, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 828\n", "compression ratio: 2.12\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 18/18 [00:00<00:00, 277564.24it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_1_right.png\n", "\n", "[16/31] Processing: journal_2.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[245, 215, 775, 335]]<|/det|>\n", "# المحور الأول\n", "وضعية حقوق الإنسان الموضوعاتية\n", "والفتوية \n", "\n", "<|ref|>text<|/ref|><|det|>[[451, 384, 544, 406]]<|/det|>\n", "فى أرقام \n", "\n", "<|ref|>text<|/ref|><|det|>[[444, 415, 551, 445]]<|/det|>\n", "3318 \n", "\n", "<|ref|>text<|/ref|><|det|>[[446, 450, 546, 468]]<|/det|>\n", "عدد الشكايات \n", "\n", "<|ref|>text<|/ref|><|det|>[[450, 469, 544, 487]]<|/det|>\n", "المتوسط بها \n", "\n", "<|ref|>text<|/ref|><|det|>[[400, 510, 447, 536]]<|/det|>\n", "83 \n", "\n", "<|ref|>text<|/ref|><|det|>[[373, 540, 480, 576]]<|/det|>\n", "الآلية الوطنية للتنظيم\n", "الخاصة بالأطفال ضحايا\n", "انتهاكات حقوق الطفل \n", "\n", "<|ref|>text<|/ref|><|det|>[[400, 583, 447, 610]]<|/det|>\n", "32 \n", "\n", "<|ref|>text<|/ref|><|det|>[[373, 612, 480, 650]]<|/det|>\n", "الآلية الوطنية الخاصة\n", "بجماعة حقوق الأشخاص\n", "فى وضعية إعاقة \n", "\n", "<|ref|>text<|/ref|><|det|>[[544, 510, 630, 576]]<|/det|>\n", "1404\n", "المقر\n", "المركزي \n", "\n", "<|ref|>text<|/ref|><|det|>[[544, 583, 630, 610]]<|/det|>\n", "1799\n", "اللجان \n", "\n", "<|ref|>text<|/ref|><|det|>[[551, 612, 620, 650]]<|/det|>\n", "الجهوية \n", "\n", "<|ref|>text<|/ref|><|det|>[[208, 697, 310, 725]]<|/det|>\n", "11086 \n", "\n", "<|ref|>text<|/ref|><|det|>[[215, 727, 303, 756]]<|/det|>\n", "عدد التظاهرات\n", "بالقضاء العام \n", "\n", "<|ref|>text<|/ref|><|det|>[[208, 777, 308, 805]]<|/det|>\n", "266610 \n", "\n", "<|ref|>text<|/ref|><|det|>[[215, 808, 300, 825]]<|/det|>\n", "عدد الجمعيات \n", "\n", "<|ref|>text<|/ref|><|det|>[[390, 697, 480, 725]]<|/det|>\n", "26 \n", "\n", "<|ref|>text<|/ref|><|det|>[[390, 727, 480, 766]]<|/det|>\n", "عدد المحاكمات\n", "التي تمت\n", "ملاحظتها \n", "\n", "<|ref|>text<|/ref|><|det|>[[410, 777, 456, 805]]<|/det|>\n", "83 \n", "\n", "<|ref|>text<|/ref|><|det|>[[410, 808, 450, 825]]<|/det|>\n", "عدد\n", "المحكومين\n", "بالإعداد \n", "\n", "<|ref|>text<|/ref|><|det|>[[560, 697, 640, 725]]<|/det|>\n", "285 \n", "\n", "<|ref|>text<|/ref|><|det|>[[560, 727, 640, 766]]<|/det|>\n", "عدد الزيارات\n", "للمؤسسات\n", "السجنية \n", "\n", "<|ref|>text<|/ref|><|det|>[[560, 777, 640, 805]]<|/det|>\n", "1312 \n", "\n", "<|ref|>text<|/ref|><|det|>[[570, 808, 620, 825]]<|/det|>\n", "عدد\n", "شكايات \n", "\n", "<|ref|>text<|/ref|><|det|>[[570, 808, 620, 825]]<|/det|>\n", "السجناء \n", "\n", "<|ref|>text<|/ref|><|det|>[[707, 697, 792, 725]]<|/det|>\n", "280 \n", "\n", "<|ref|>text<|/ref|><|det|>[[707, 727, 797, 766]]<|/det|>\n", "شكاية من نساء\n", "أو فتيات ضحايا\n", "العنف \n", "\n", "<|ref|>text<|/ref|><|det|>[[720, 777, 783, 805]]<|/det|>\n", "276 \n", "\n", "<|ref|>text<|/ref|><|det|>[[720, 808, 783, 825]]<|/det|>\n", "شكاية\n", "تهم حقوق\n", "المهاجرين\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 747\n", "compression ratio: 0.96\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 29/29 [00:00<00:00, 243757.15it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_2.png\n", "\n", "[17/31] Processing: journal_20.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[93, 210, 875, 770]]<|/det|>\n", "
الرقم الترتيبيتسمية الدبلوم (باللغة العربية)تسمية الدبلوم (باللغة الفرنسية/اللغة الإنجليزية)مدة التكوينالشهادة أو الدبلوم الوطني المعادل (ة) له
3دبلوم في \"التدبير وإدارة الأعمال\" اختيارات: - المحاسبة والتسيير - المالية والبنك - التسويق والتجارةDiplôme en « Management et Administration des Affaires »
Options:
- Comptabilité et Gestion
- Finance et Banque
- Marketing et Commerce
ثلاث سنوات دراسية متتالية بعد شهادة الباكالورياشهادة الإجازة
4دبلوم في \"المحاسبة والمراقبة والافتتاح\"Diplôme en « Comptabilité, Contrôle et Audit »سنتان دراستتان متتاليتان بعد \"شهادة الباكالوريا + ثلاث سنوات دراسية\"شهادة الماستر المتخصص
5دبلوم في \"التسويق والاستراتيجية الرقمية\"Diplôme en « Marketing et Stratégie Digitale »سنتان دراستتان متتاليتان بعد \"شهادة الباكلوريا + ثلاث سنوات دراسية\"شهادة الماستر المتخصص.
6دبلوم في \"البنك والمالية والتأمين\"Diplôme en « Banque, Finance et Assurance »سنتان دراستتان متتاليتان بعد \"شهادة البكالوريا + ثلاث سنوات دراسية\"شهادة الماستر المتخصص 6
\n", "==================================================\n", "image size: (3368, 2382)\n", "valid image tokens: 781\n", "output texts tokens (valid): 442\n", "compression ratio: 0.57\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 35848.75it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_20.png\n", "\n", "[18/31] Processing: journal_22.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[473, 93, 523, 110]]<|/det|>\n", "ملحق \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[362, 135, 633, 155]]<|/det|>\n", "المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>text<|/ref|><|det|>[[92, 160, 905, 219]]<|/det|>\n", "1- يجب أن تحترم مكيفات الهواء أحادية ومزدوجة القناة المستويات المشار إليها في الجداول 1 و 2 و 3 أدناه، والتي يتم احتسابها وفقًا للمواصفة القياسية NM. 14.2.302. كما يجب أن تحترم مكيفات الهواء أحادية ومزدوجة القنااة المستويات المتعلقة بحالة السكون وحالة إيقاف التشغيل كما هو موضح في الجدول 2 أدناه. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[323, 225, 671, 245]]<|/det|>\n", "الجدول 1: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|>[[137, 249, 860, 337]]<|/det|>\n", "
مكيفات الهواء أحادية القناةمكيفات الهواء مزدوجة القناة
COP rated *EER rated*COP rated*EER rated*
1.802.402.362.40
1.622.162.122.16
\n", "\n", "<|ref|>text<|/ref|><|det|>[[866, 343, 884, 353]]<|/det|>\n", "* \n", "\n", "<|ref|>text<|/ref|><|det|>[[241, 368, 880, 388]]<|/det|>\n", "(Coefficient d'efficacité énergétique nominal) : المعامل الإسمي للنجاعة الطاقية \n", "\n", "<|ref|>text<|/ref|><|det|>[[380, 394, 880, 413]]<|/det|>\n", "(Coefficient de performance nominal) : معامل الأداء الإسمي \n", "\n", "<|ref|>text<|/ref|><|det|>[[384, 420, 880, 439]]<|/det|>\n", "(Potentiel de réchauffement planétaire) : احتمالية الاحترار العالمي \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[181, 445, 816, 486]]<|/det|>\n", "الجدول 2: المستويات المتعلقة بالحد الأقصى للاستهلاك الكهربائي في حالة «إيقاف التشغيل» وحالة «السكون» لمكيفات الهواء أحادية ومزدوجة القناة \n", "\n", "<|ref|>table<|/ref|><|det|>[[137, 491, 860, 625]]<|/det|>\n", "
حالة «إيقاف التشغيل»يجب ألا يتجاوز الاستهلاك الكهربائي للجهاز في جميع الحالات الموافقة لحالة «إيقاف التشغيل» 1.00 واط.
حالة «السكون»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجد في حالة تتوفر فيها وظيفة التنشيط فقط، أو وظيفة التنشيط فقط مرتبطة بمؤشر وحيد يدل على أن وظيفة التنشيط مفعلة، 1.00 واط.
حالة «السكون» و/أو حالة «إيقاف التشغيل»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجب في حالة تتوفر فيها فقط وظيفة عرض معلومة أو حالة، أو فقط عرض معلومة أو حالة مرتبطة بوظيفة إعادة التنشيط، 2 واط.
حالة «السكون» و/أو حالة «الإيقاف التشغيل»يكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود، مزودًا بحالة «إيقاف التشغيل» و/أو «السكون» و/أو بحالة أخرى يتم فيها، عند توصيله بالتيار الكهربائي، احترام المتطلبات المطبقة فيما يخص الاستهلاك الكهربائي في حالة «إيقاف التشغيل» و/أو «السكون».
\n", "\n", "<|ref|>text<|/ref|><|det|>[[92, 628, 905, 667]]<|/det|>\n", "2- يجب أن تحترم مكيفات الهواء، باستثناء مكيفات الهواء أحادية ومزدوجة القناة، المستويات المتعلقة بالأداء الطاقي الأدنى كما هو مشار إليها في الجدول 3 أدناه والتي يتم احتسابها وفقًا للمواصفة القياسية المغربية NM. 14.2.302. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[323, 672, 671, 692]]<|/det|>\n", "الجدول 3: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|> [[162, 696, 835, 777]]<|/det|>\n", "
SCOP*
(موسم التدفئة «المتوسط»)
SEER*
3.43.6
3.063.24
\n", "\n", "<|ref|>text<|/ref|><|det|>[[866, 784, 884, 794]]<|/det|>\n", "* \n", "\n", "<|ref|>text<|/ref|><|det|>[[293, 810, 880, 830]]<|/det|>\n", "(Coefficient d'efficacité énergétique saisonnier) : معامل النجاعة الطاقية الموسمي \n", "\n", "<|ref|>text<|/ref|><|det|>[[390, 836, 880, 855]]<|/det|>\n", "(Coefficient de performance saisonnier) : معامل الأداء الموسمي \n", "\n", "<|ref|>text<|/ref|><|det|>[[380, 861, 880, 880]]<|/det|>\n", "(Potentiel de réchauffement planétaire) : احتمالية الاحترار العالمي \n", "\n", "<|ref|>text<|/ref|><|det|>[[92, 886, 905, 925]]<|/det|>\n", "3- يجب أن تحترم مكيفات الهواء المستويات المشار إليها في الجدول 4 أدناه والتي يتم احتسابها وفقًا للمواصفة القياسية المغربية NM. 14.2.302.\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 1364\n", "compression ratio: 1.75\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 19/19 [00:00<00:00, 205921.90it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_22.png\n", "\n", "[19/31] Processing: journal_23.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[323, 92, 672, 113]]<|/det|>\n", "الجدول 4: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|>[[101, 113, 896, 386]]<|/det|>\n", "
COP ratedEER ratedمكيفات الهواء مزدهجة القناةمكيفات الهواء باستثناء مكيفات الهواء أحادية ومزدوجة القناةSEER
COP ratedEER ratedCOP ratedEER rated
2.042.602.602.603.804.60إذا كان PRP لغاز التبريد أكثر من 150 بالنسبة لقدرة إسمية أصغر من 6 كيلوواط
1.842.342.342.343.424.14إذا كان PRP لغاز التبريد أصغر أو يساوي 150 بالنسبة لقدرة إسمية أصغر من 6 كيلوواط.
2.042.602.603.804.304.30إذا كان PRP لغاز التبريد أكثر من 150 بالنسبة لقدرة أسمية أكبر أو تساوي 6 كيلوواط وأصغر أو تساوي 12 كيلوواط
1.842.343.423.423.873.87إذا كان PRP لغاز التبريد أصغر أو يساوي 150 بالنسبة لقدرة إسمية أكثر أو تساوي 6 كيلوواط وأصغر أو تساوي 12 كيلوواط
\n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 392, 900, 432]]<|/det|>\n", "4- يجب أن تحترم مكيفات الهواء أحادية ومزدوجة القناة المستويات المذكورة في الجدول 4 والمستويات المشار إليها في الجدول 5 أدناه والتي يتم احتسابها وفقاً للمواصفة القياسية المغربية NM 14.2.302. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[182, 436, 808, 479]]<|/det|>\n", "الجدول 5: المستويات المتعلقة بالحد الأقصى للاستهلاك الكهربائي في حالة «إيقاف التشغيل» وحالة «السكون» بالنسبة لمكيفات الهواء أحادية ومزدوجة القناة \n", "\n", "<|ref|>table<|/ref|><|det|>[[97, 483, 900, 771]]<|/det|>\n", "
حالة «إيقاف التشغيل»يجب ألا يتجاوز الاستهلاك الكهربائي للجهاز في جميع الحالات الموافقة لحالة «إيقاف التشغيل» 0.50 واط.
حالة «السكون»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجد في حالة تتوفر فيها وظيفة التشغيل فقط، أو وظيفة التشغيل فقط مرتبطة بمؤشر وحيد يدل على أن وظيفة التشغيل معقلة 0.50 واط.
توفر حالة «السكون» و/أو حالة «إيقاف التشغيل»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجب في حالة تتوفر فيها فقط وظيفة عرض معلومة أو حالة، أو فقط عرض معلومة أو حالة مرتبطة بوظيفة إعادة التشغيل، 1.00 واط.
تدبير الاستهلاكيكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود، مزوداً بحالة «إيقاف التشغيل» و/أو «السكون» و/أو بحالة أخرى يتم فيها، عند توصيله بالتيار الكهربائي، احترام المتطلبات المطبقة فيما يخص الاستهلاك الكهربائي في حالة «إيقاف التشغيل» و/أو «السكون».
يكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود، مزدوداً بحالة «إيقاف التشغيل» و/أو «السكون».
في حالة «السكون»، أو في حالة «إيقاف التشغيل»، أو في حالة أخرى تحترم المتطلبات المطبقة فيما يخص استهلاك الطاقة في حالة «إيقاف التشغيل» و/أو حالة «السكون» عندما يكون موصولاً بالتيار الكهربائي، ويتم تنشيط وظيفة تدبير الاستهلاك قبل التوزيع في المصنع.
\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 1106\n", "compression ratio: 1.42\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 5/5 [00:00<00:00, 116508.44it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_23.png\n", "\n", "[20/31] Processing: journal_24_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[822, 95, 999, 123]]<|/det|>\n", "## خاصة \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[444, 145, 612, 161]]<|/det|>\n", "### المادة الثالثة \n", "\n", "<|ref|>text<|/ref|><|det|>[[167, 177, 900, 194]]<|/det|>\n", "يفوض حق نزع الملكية إلى رئيس مجلس جماعة مير اللفت. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[435, 208, 616, 225]]<|/det|>\n", "### المادة الرابعة \n", "\n", "<|ref|>text<|/ref|><|det|>[[87, 240, 999, 305]]<|/det|>\n", "يسند تنفيذ هذا المرسوم، الذي ينشر في الجريدة الرسمية، إلى وزير الداخلية ورئيس مجلس جماعة مير اللفت، كل واحد منهما فيما يخصه. \n", "\n", "<|ref|>text<|/ref|><|det|>[[87, 319, 820, 337]]<|/det|>\n", "وحرب بالرباط في 24 من صفر 1446 (29 أغسطس 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[220, 357, 435, 371]]<|/det|>\n", "الإمضاء: عزيز أخنوش \n", "\n", "<|ref|>text<|/ref|><|det|>[[687, 387, 860, 400]]<|/det|>\n", "وقعه بالعطف: \n", "\n", "<|ref|>text<|/ref|><|det|>[[687, 417, 860, 430]]<|/det|>\n", "وزير الداخلية، \n", "\n", "<|ref|>text<|/ref|><|det|>[[635, 448, 895, 462]]<|/det|>\n", "الإمضاء: عبد الوافي لفتيت. \n", "\n", "<|ref|>text<|/ref|><|det|>[[87, 496, 999, 564]]<|/det|>\n", "قرار لوزير التعليم العالي والبحث العلمي والابتكار رقم 2060.24 صادر في 19 من محرم 1446 (25 يوليو 2024) بتحديد بعض المعادلات بين الشهادات. \n", "\n", "<|ref|>text<|/ref|><|det|>[[310, 593, 860, 611]]<|/det|>\n", "وزير التعليم العالي والبحث العلمي والابتكار، \n", "\n", "<|ref|>text<|/ref|><|det|>[[87, 620, 999, 690]]<|/det|>\n", "بناء على المرسوم رقم 2.01.333 الصادر في 28 من ربيع الأول 1422 (21 يونيو 2001) المتعلق بتحديد الشروط والمسطرة الخاصة بمنح معادلة شهادات التعليم العالي؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[87, 702, 999, 795]]<|/det|>\n", "وعلى المرسوم رقم 2.04.89 الصادر في 18 من ربيع الآخر 1425 (7 يونيو 2004) بتحديد اختصاص المؤسسات الجامعية وأسلاك الدراسات العليا وكذا الشهادات الوطنية المطابقة، كما وقع تغييره وتتميمه؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[87, 807, 999, 876]]<|/det|>\n", "وعلى المرسوم رقم 2.21.838 الصادر في 14 من ربيع الأول 1443 (21 أكتوبر 2021) المتعلق باختصاصات وزير التعليم العالي والبحث العلمي والابتكار؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[87, 888, 999, 932]]<|/det|>\n", "وبعد استشارة اللجنة القطاعية للعلوم والتقنيات والهندسة والهندسة المعمارية المنعقدة بتاريخ 4 يوليو 2024،\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 728\n", "compression ratio: 1.87\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 16/16 [00:00<00:00, 260111.88it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_24_left.png\n", "\n", "[21/31] Processing: journal_24_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[0, 95, 170, 120]]<|/det|>\n", "نصوص \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 147, 920, 220]]<|/det|>\n", "مرسوم رقم 2.24.717 صادر في 24 من صفر 1446 (29 أغسطس 2024)\n", "بإعلان أن المنفعة العامة تقضي بإحداث ملعب للقرب بحي\n", "تيرت 02 بجماعة مير اللفت بإقليم سيدي إفني وبنزع ملكية\n", "القطعتين الأرضيتين اللازمتين لهذا الغرض. \n", "\n", "<|ref|>text<|/ref|><|det|>[[615, 237, 780, 255]]<|/det|>\n", "رئيس الحكومة، \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 258, 920, 312]]<|/det|>\n", "بناء على القانون التنظيمي رقم 113.14 المتعلق بالجماعات، الصادر\n", "بتنفيذه الظهير الشريف رقم 1.15.85 بتاريخ 20 من رمضان 1436\n", "(7 يوليو 2015)؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 317, 920, 370]]<|/det|>\n", "وعلى القانون رقم 7.81 المتعلق بنزع الملكية لأجل المنفعة العامة\n", "وبالاحتلال المؤقت الصادر بتنفيذه الظهير الشريف رقم 1.81.254\n", "بتاريخ 11 من رجب 1402 (6 ماي 1982)؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 376, 920, 411]]<|/det|>\n", "وعلى المرسوم رقم 2.82.382 الصادر في 2 رجب 1403 (16 أبريل 1983)\n", "بتطبيق القانون رقم 7.81 المشار إليه أعلاه؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 418, 920, 454]]<|/det|>\n", "وعلى ملف البحث الإداري المباشر من 14 فبراير إلى 15 أبريل 2024\n", "بجماعة مير اللفت؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[495, 463, 840, 481]]<|/det|>\n", "وباقتراح من وزير الداخلية، \n", "\n", "<|ref|>text<|/ref|><|det|>[[600, 485, 755, 502]]<|/det|>\n", "رسم ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[390, 502, 530, 520]]<|/det|>\n", "المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 526, 920, 563]]<|/det|>\n", "يعين أن المنفعة العامة تقضي بإحداث ملعب للقرب بحي تيرت 02\n", "بجماعة مير اللفت بإقليم سيدي إفني. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[390, 570, 530, 587]]<|/det|>\n", "المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[25, 594, 920, 650]]<|/det|>\n", "تنزع بناء على ما ذكر ملكية القطعتين الأرضيتين اللازمتين لهذا\n", "الغرض، كما رسمت حدودها بحاشية ملونة في التصميم التجزئي\n", "الملحق بأصل هذا المرسوم وعينتا في الجدول التالي: \n", "\n", "<|ref|>table<|/ref|><|det|>[[25, 656, 915, 920]]<|/det|>\n", "
رقم القطعة
الأرضية في
التصميم
واسمها
نوعيتها
ومرجعها
العقاري
مساحتها
بالمتر
المربع
أسماء وعناوين الملاكين أو المفرضين
أنهم كذلك
1
الملك المسي:
«ملك ادعلي»
عارية، غير
محفظة
581 م²- ابراهيم ابردام بن الحسين
- محمد ابردام بن الحسين بن الحسن
2
الملك المسي:
«المستقبل»
ستستخرج
من الرسم
العقاري
عدد
31/28748
2050 م²- 1- محمد بن لشهب بن محمد بنسبة 24/1
- 2- محمد بن لشهب بن الزيد بنسبة 24/18
- 3- علي بن لشهب بن محمد بنسبة 24/1
- 4- عائشة بن لشهب بنت محمد بنسبة
1/24
- 5- الزيد بن لشهب بن محمد بنسبة 24/1
- 6- أحمد بن لشهب بن محمد بنسبة 24/1
- 7- ملك بن لشهب بن محمد بنسبة 24/1
\n", "==================================================\n", "image size: (2386, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 1039\n", "compression ratio: 2.66\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 14/14 [00:00<00:00, 247764.79it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_24_right.png\n", "\n", "[22/31] Processing: journal_25_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[440, 92, 600, 110]]<|/det|>\n", "## المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[440, 122, 910, 140]]<|/det|>\n", "ينشر هذا القرار بالجريدة الرسمية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[85, 151, 810, 170]]<|/det|>\n", "وحبر بالرباط في 19 من محرم 1446 (25 يوليو 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[202, 187, 500, 201]]<|/det|>\n", "الإمضاء: عبد اللطيف ميراوي. \n", "\n", "<|ref|>text<|/ref|><|det|>[[85, 230, 960, 293]]<|/det|>\n", "قرار لوزير التعليم العالي والبحث العلمي والابتكار رقم 2062.24 صادر في 19 من محرم 1446 (25 يوليو 2024) بتحديد بعض المعادلات بين الشهادات. \n", "\n", "<|ref|>text<|/ref|><|det|>[[350, 320, 841, 338]]<|/det|>\n", "وزير التعليم العالي والبحث العلمي والابتكار، \n", "\n", "<|ref|>text<|/ref|><|det|>[[85, 345, 960, 410]]<|/det|>\n", "بناء على المرسوم رقم 2.01.333 الصادر في 28 من ربيع الأول 1422 (21 يونيو 2001) المتعلق بتحديد الشروط والمسترة الخاصة بمنح معادلة شهادات التعليم العالي؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[85, 420, 960, 506]]<|/det|>\n", "وعلى المرسوم رقم 2.04.89 الصادر في 18 من ربيع الآخر 1425 (7 يونيو 2004) بتحديد اختصاص المؤسسات الجامعية وأسلاك الدراسات العليا وكذا الشهادات الوطنية المطابقة، كما وقع تغييره وتتميمه؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[85, 517, 960, 580]]<|/det|>\n", "وعلى المرسوم رقم 2.21.838 الصادر في 14 من ربيع الأول 1443 (21 أكتوبر 2021) المتعلق باختصاصات وزير التعليم العالي والبحث العلمي والابتكار؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[85, 591, 960, 633]]<|/det|>\n", "وبعد استشارة اللجنة القطاعية للعلوم والتقنيات والهندسة والهندسة المعمارية المنعقدة بتاريخ 4 يوليو 2024، \n", "\n", "<|ref|>text<|/ref|><|det|>[[682, 641, 830, 658]]<|/det|>\n", "قرار ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[447, 666, 608, 684]]<|/det|>\n", "## المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[85, 695, 960, 735]]<|/det|>\n", "تقبل لمعادلة دبلوم مهندس دولة، الشهادة التالية في Génie civil : \n", "\n", "<|ref|>text<|/ref|><|det|>[[120, 747, 960, 811]]<|/det|>\n", "- Grade d'ingénieur civil électricien, délivré en date du 26 juin 2004 par la Faculté polytechnique de Mons - Belgique. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[440, 822, 608, 839]]<|/det|>\n", "## المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[440, 850, 923, 868]]<|/det|>\n", "ينشر هذا القرار بالجريدة الرسمية. \n", "\n", "<|ref|>text_start<|/ref|><|det|>[[85, 879, 810, 898]]<|/det|>\n", "وحبر بالرباط في 19 من محرم 1446 (25 يوليو 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[188, 916, 500, 930]]<|/det|>\n", "الإمضاء: عبد اللطيف ميراوي.\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 807\n", "compression ratio: 2.07\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 18/18 [00:00<00:00, 183692.15it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_25_left.png\n", "\n", "[23/31] Processing: journal_25_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[621, 95, 775, 112]]<|/det|>\n", "قرار ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[392, 120, 550, 138]]<|/det|>\n", "## المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 149, 866, 166]]<|/det|>\n", ": تقبل ملعادلة دبلوم مهندس دولة، الشهادة التالية في Génie civil \n", "\n", "<|ref|>text<|/ref|><|det|>[[68, 177, 884, 240]]<|/det|>\n", "- Titre d’ingénieur diplôme de l’Ecole nationale supérieure Mines-Télécom Lille Douai, de l’Institut Mines-Télécom, délivré en date du 10 janvier 2024 - France. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[392, 252, 550, 269]]<|/det|>\n", "## المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[392, 281, 824, 299]]<|/det|>\n", "ينشر هذا القرار بالجريدة الرسمية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 310, 739, 328]]<|/det|>\n", "وحرار بالرباط في 19 من محرم 1446 (25 يوليو 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[135, 348, 444, 362]]<|/det|>\n", "الإمضاء: عبد اللطيف ميراوي. \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 392, 884, 453]]<|/det|>\n", "قرار لوزير التعليم العالي والبحث العلمي والابتكار رقم 2061.24 صادر في 19 من محرم 1446 (25 يوليو 2024) بتحديد بعض الملادلات بين الشهادات. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[253, 485, 775, 503]]<|/det|>\n", "### وزير التعليم العالي والبحث العلمي والابتكار، \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 510, 884, 575]]<|/det|>\n", "بناء على المرسوم رقم 2.01.333 الصادر في 28 من ربيع الأول 1422 (21 يونيو 2001) المتعلق بتحديد الشروط والمستطرة الخاصة بمنح معادلة شهادات التعليم العالي؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 584, 884, 671]]<|/det|>\n", "وعلى المرسوم رقم 2.04.89 الصادر في 18 من ربيع الآخر 1425 (7 يونيو 2004) بتحديد اختصاص المؤسسات الجامعية وأسلاك الدراسات العليا وكذا الشهادات الوطنية المطابقة، كما وقع تغييره وتتميمه؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 681, 884, 744]]<|/det|>\n", "وعلى المرسوم رقم 2.21.838 الصادر في 14 من ربيع الأول 1443 (21 أكتوبر 2021) المتعلق باختصاصات وزير التعليم العالي والبحث العلمي والابتكار؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 755, 884, 797]]<|/det|>\n", "وبعد استشارة اللجنة القطاعية للعلوم والتقنيات والهندسة والهندسة المعمارية المنعقدة بتاريخ 4 يوليو 2024، \n", "\n", "<|ref|>text<|/ref|><|det|>[[592, 807, 775, 824]]<|/det|>\n", "قرار ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[392, 832, 550, 850]]<|/det|>\n", "## المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[28, 861, 884, 879]]<|/det|>\n", ": تقبل ملعادلة دبلوم مهندس دولة، الشهاة التالية في Informatique \n", "\n", "<|ref|>text<|/ref|><|det|>[[68, 890, 884, 908]]<|/det|>\n", "- Titre d’ingénieur de télécom Nancy de l’Université de \n", "\n", "<|ref|>text<|/ref|><|det|>[[90, 914, 850, 931]]<|/det|>\n", "Lorraine, délivré en date du 26 octobre 2023 - France.\n", "==================================================\n", "image size: (2386, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 857\n", "compression ratio: 2.2\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 19/19 [00:00<00:00, 188396.63it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_25_right.png\n", "\n", "[24/31] Processing: journal_27.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[758, 95, 840, 112]]<|/det|>\n", "قرار ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[460, 123, 545, 142]]<|/det|>\n", "## المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[98, 153, 911, 197]]<|/det|>\n", "تغير حدود المسلك العمومي بدوار عين الحجر الرابط بين فاس ودوار الكعدة قصد توسيع عرضه إلى حدود 20 مترا بجماعة عين البيضاء بعمالة فاس. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[457, 207, 547, 225]]<|/det|>\n", "## المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[98, 236, 911, 281]]<|/det|>\n", "تعين بناء على ما ذكر القطعة الأرضية المراد نزع ملكيتها لما تستوجبه هذه العملية كما رسمت حدودها بحواشي ملونة في التصميم الملحق بأصل هذا القرار والمبينة في الجدول أسفله: \n", "\n", "<|ref|>table<|/ref|><|det|>[[99, 288, 909, 469]]<|/det|>\n", "
رقم القطعة في التصميممرجعها العقاريمساحتها الإجماليةأسماء الملاك أو المفروض أنهم الملاكالمساحة المراد نزع ملكيتها
1 - الملك المسمى عين الحجرالرسم العقاري
07/199286
71 هكتارا 81 ارا- فائزة السودي القرشي بنت عبد الكريم
- وفاء الشرايب بنت أحمد
- زينة السودي القرشي بنت أحمد
- سلمى السودي القرشي بنت أحمد
- صوفيا السودي القرشي بنت أحمد
- آمال عيوش بنت ادريس
- صربة عيوش بنت ادريس
- محمد خليد عيوش بن ادريس
6296 مترا مربعا
\n", "\n", "<|ref|>text<|/ref|><|det|>[[560, 484, 887, 504]]<|/det|>\n", "## المادة الثالثة. - ينشر هذا القرار بالجريدة الرسمية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[98, 515, 562, 536]]<|/det|>\n", "وحرر بجماعة عين البيضاء في 18 من رمضان 1445 (29 مارس 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[150, 556, 265, 571]]<|/det|>\n", "الإمضاء: رشيد الهرد.\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 566\n", "compression ratio: 0.72\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 9/9 [00:00<00:00, 226040.34it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_27.png\n", "\n", "[25/31] Processing: journal_3.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[413, 116, 580, 153]]<|/det|>\n", "# المحور الأول \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[369, 179, 625, 237]]<|/det|>\n", "## وضعية حقوق الإنسان\n", "## الموضوعاتية والفنوية \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[500, 295, 780, 320]]<|/det|>\n", "### أولاً: دراسة الشكايات ومعالجتها \n", "\n", "<|ref|>text<|/ref|><|det|>[[144, 333, 784, 465]]<|/det|>\n", "1. تعد دراسة الشكايات ومعالجتها وتتبع مسارها إحدى المهام الأصيلة للمجلس، طبقا لمقتضيات القانون رقم 76.15 الذي خول له صلاحيات موسعة في مجال حماية حقوق الإنسان. كما أن ضمان الحماية المطلوبة لا يتوقف على مجرد تلقي الشكايات، بل كذلك على إمكانية تتبع كل حالة على حدة والتحري فيها ورصدها وتوثيقها بمختلف الوسائل المتاحة. وتأسيسا على ذلك، يمارس المجلس صلاحياته في تلقي الشكايات ودراستها وتتبع مآلها وفق الإجراءات والمساطر التي يؤطرها نظامه الداخلي، ولاسيما من خلال المواد 44 و45 و46 و47. \n", "\n", "<|ref|>text<|/ref|><|det|>[[144, 473, 784, 583]]<|/det|>\n", "2. عمل المجلس ولجانه الجهوية خلال هذه السنة على وضع تدابير وإجراءات خاصة لاستقبال الوافدين من المشتريات والمشتكين، بما يقتضيه حسن استقبالهم، وتذليل الصعاب التي قد تواجههم، والعمل على معالجة تظلماتهم ودراسة طلباتهم بالعناية والسرعة والفعالية المطلوبة، مع مراعاة ظروف كل فئة ولاسيما الفئات الأولى بالرعاية كالأطفال والأشخاص في وضعية إعاقة والمسنين والأشخاص المحرومين من حريتهم والمهاجرين واللاجئين وطالبي اللجوء. \n", "\n", "<|ref|>text<|/ref|><|det|>[[144, 591, 784, 856]]<|/det|>\n", "3. ارتفع عدد الشكايات التي توصل بها المجلس ولجانه الجهوية وآلياته الوطنية برسم سنة 2023 إلى 1318 شكاية وطلبا، منها 1404 شكايات وطلبات تلقتها المصالح المركزية للمجلس، في حين توصلت اللجان الجهوية بما مجموعه 1799 شكاية وطلب. وتبعا لذلك، توصلت اللجنة الجهوية بجهة بني ملال-خنيفرة بـ 127 شكاية وطلبا، واللجنة الجهوية بجهة كلميم-واد نون بـ 172 شكاية وطلبا، واللجنة الجهوية بجهة الرباط-سال-القنيطرة بـ 115 شكاية وطلبا، واللجنة الجهوية بجهة الشرق بـ 133 شكاية وطلبا، واللجنة الجهوية بجهة طنجة-تطوان-الحسيمة بـ 234 شكاية وطلبا، واللجنة الجهوية بجهة سوس-ماسة بـ 76 شكاية وطلبا، واللجنة الجهوية بجهة العيون-الساقية الحمراء بـ 106 شكاية وطلبا، واللجنة الجهوية بجهة الدار البيضاء-سطلات بـ 263 شكاية وطلبا، واللجنة الجهوية بجهة مراكش-أسفي بـ 116 شكاية وطلبا، واللجنة الجهوية بجهة درعة-تافيلات بـ 276 شكاية وطلبا، واللجنة الجهوية بجهة فاس-مكناس بـ 163 شكاية وطلبا، واللجنة الجهوية بجهة الداخلة-وادي الذهب بـ 18 شكاية وطلبا. وقد عرفت هذه السنة زيادة في عدد الشكايات المتوصل بها بنسبة 2,25 % مقارنة مع سنة 2022. \n", "\n", "<|ref|>text<|/ref|><|det|>[[144, 868, 810, 930]]<|/det|>\n", "4. أما الآلية الوطنية للتظلم الخاصة بالأطفال ضحايا انتهاكات حقوق الطفل، فقد توصلت بما مجموعه 83 شكاية وطلب، بينما تلقت الآلية الوطنية الخاصة بحماية حقوق الأشخاص في وضعية إعاقة 32 شكاية وطلبا.\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 995\n", "compression ratio: 1.27\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 7/7 [00:00<00:00, 171696.65it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_3.png\n", "\n", "[26/31] Processing: journal_4.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table_caption<|/ref|><|det|>[[211, 110, 780, 129]]<|/det|>\n", "جدول توضيحي لمجموع الشكايات المتوصل بها من طرف المجلس ولجانه الجهوية وأثيته الوطنيتين \n", "\n", "<|ref|>table<|/ref|><|det|>[[173, 142, 820, 770]]<|/det|>\n", "
النسبة المئوية (%)عدد الشكاياتالجهة
42,31%1404مديرية الحماية
3,47%115اللجنة الجهوية لحقوق الإنسان بجهة الرباط-سلام-القنيطرة
7,93%263اللجنة الجهوية لحقوق الإنسان بجهة الدار البيضاء-سطات
7,05%234اللجنة الجهوية لحقوق الإنسان بجهة طنجة-تطوان-الحسيمة
4,91%163اللجنة الجهوية لحقوق الإنسان بجهة فاس-مكناس
4,01%133اللجنة الجهوية لحقوق الإنسان بجهة بجهة الشرق
8,32%276اللجنة الجهوية لحقوق الإنسان بجهة درعة-تافيلات
3,5%116اللجنة الجهوية لحقوق الإنسان بجهة مراكش-أسفي
3,83%127اللجنة الجهوية لحقوق الإنسان بجهة بني ملال-خنيفرة
2,29%76اللجنة الجهوية لحقوق الإنسان بجهة سوس-ماسة
5,19%172اللجنة الجهوية لحقوق الإنسان بجهة كلميم-واد نون
\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 451\n", "compression ratio: 0.58\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 2/2 [00:00<00:00, 60787.01it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_4.png\n", "\n", "[27/31] Processing: journal_5.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[167, 100, 816, 355]]<|/det|>\n", "
3,19%106اللجنة الجهوية لحقوق الإنسان بجهة العيون- الساقية الحمراء.
0,54%18اللجنة الجهوية لحقوق الإنسان بجهة الداخلة- وادي الذهب
2,5%83الآلية الوطنية للتنظيم الخاصة بالأطفال ضحايا انتهاكات حقوق الطفل
0,96%32الآلية الوطنية الخاصة بحماية حقوق الأشخاص في وضعية إعاقة
% 1003318المجموع
\n", "\n", "<|ref|>image_caption<|/ref|><|det|>[[392, 420, 590, 438]]<|/det|>\n", "
رسم بياني حول الشكايات الواردة
\n", "\n", "<|ref|>image<|/ref|><|det|>[[175, 444, 808, 660]]<|/det|>\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 227\n", "compression ratio: 0.29\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 100%|██████████| 1/1 [00:00<00:00, 14820.86it/s]\n", "other: 100%|██████████| 2/2 [00:00<00:00, 28435.96it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_5.png\n", "\n", "[28/31] Processing: journal_6.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[168, 97, 833, 207]]<|/det|>\n", "5. وتنوعت الطريقة التي توصل من خلالها المجلس ولجانه الجهوية وآلياته الوطنية بالشكايات والطلبات، حيث بلغ ما تم وضعه بشكل مباشر بمقر المجلس أو لجانه 1486، وأثناء استقبال المشتكيات والمشتكيات 143 (أعد بشأنها محاضر استماع)، وعبر البريد العادي 1144، وعبر البريد الإلكتروني الخاص بالمجلس أو بالآليتين 374، وعبر الهاتف 109، وبواسطة الفاكس 62 شكاية وطلب. \n", "\n", "<|ref|>table_caption<|/ref|><|det|>[[215, 228, 785, 246]]<|/det|>\n", "جدول توضيحي يوضح طريقة وضع الشكايات الواردة على المجلس ولجانه الجهوية وآليته الوطنية \n", "\n", "<|ref|>table<|/ref|><|det|>[[168, 246, 812, 477]]<|/det|>\n", "
طريقة التوصل بالشكاياتعددهاالنسبة المئوية (%)
الوضع المباشر148644,79%
البريد114434,48%
البريد الإلكتروني37411,27%
الاستقبال (محاضر الاستماع)1434,31%
الهاتف621,87%
المجموع3318100%
\n", "\n", "<|ref|>image_caption<|/ref|><|det|>[[373, 500, 630, 517]]<|/det|>\n", "
رسم بياني يوضح طريقة التوصل بالشكايات
\n", "\n", "<|ref|>image<|/ref|><|det|>[[202, 515, 785, 750]]<|/det|>\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 421\n", "compression ratio: 0.54\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 100%|██████████| 1/1 [00:00<00:00, 13706.88it/s]\n", "other: 100%|██████████| 4/4 [00:00<00:00, 54827.50it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_6.png\n", "\n", "[29/31] Processing: journal_7.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[168, 101, 835, 258]]<|/det|>\n", "6. وبعد معالجة ودراسة جميع الشكايات والطلبات، تبين أن ما يناهز 994 شكاية وطلب تدخل في إطار اختصاصات المجلس تمت معالجتها واتخاذ ما يلزم بخصوصها، بالإضافة إلى 115 شكاية عالجتها الآليات الوطنيتين الخاصتين بحقوق الطفل والأشخاص في وضعية اعاقة، في حين تبين أن 1913 شكاية وطلب لا تندرج ضمن اختصاص المجلس ولجانه وآلياته تم توجيه المعين بها إلى سلك المساطر القانونية أو الإدارية، أو تمت إحالتها على الجهات المختصة، بما في ذلك 134 شكاية تمت إحالتها على مؤسسة وسيط المملكة للاختصاص، فيما تم حفظ 296 شكاية لكونها لا تحترم الشروط القانونية والواقعية لقبولها أو مجهولة المصدر، أو سبق البت فيها. \n", "\n", "<|ref|>text<|/ref|><|det|>[[168, 259, 835, 389]]<|/det|>\n", "7. وحسب التصنيف الموضوعي لهذه الشكايات، بلغ عدد الشكايات المتعلقة بالحقوق المدنية والسياسية ما يناهز 343 شكاية وطلب، منها 152 شكاية تتعلق بادعاءات المس بالحق في السلامة الجسدية، و29 شكاية تتعلق بحرية الجمعيات والعمل النقابي، في حين توزعت باقي الشكايات البالغ عددها 162 على الحقوق الأخرى، ومن بينها الحق في التجمع والتظاهر وحرية الرأي والتعبير والحق في المحاكمة العادلة. أما فيما يخص الحقوق الاقتصادية والاجتماعية والثقافية والبيئية، فقد بلغ عدد الشكايات بشأنها ما مجموعه 651 شكاية وطلب. \n", "\n", "<|ref|>text<|/ref|><|det|>[[168, 391, 835, 520]]<|/det|>\n", "8. وحسب التصنيف انطلاقا من حقوق بعض الفئات والمجموعات، فقد تلقى المجلس ولجانه الجهوية 276 شكاية تهم حقوق المهاجرين، و280 شكاية من نساء أو فتيات ضحايا العنف، في حين بلغ عدد الشكايات والطلبات الواردة من سجناء أو ذويهم 1312 شكاية وطلب، تتوزع على طلبات العفو والتظلم من الأحكام القضائية وطلبات الترحيل أو الاحتفاظ بنفس المؤسسة السجنية وإعادة التصنيف، وتظلمات تهم التطبيق ومتابعة الدراسة والاتصال بالعالم الخارجي وادعاءات سوء المعاملة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[168, 523, 835, 655]]<|/det|>\n", "9. وقد عمل المجلس على دراسة هذه الشكايات جميعها دراسة دقيقة للوقوف على حقيقة الادعاءات الواردة فيها، وأحال ما يقتضي إحالته على الجهات المعنية للتحري في موضوع الانتهاكات المحتملة، مع متابعتها وصولا الى معالجتها وإشعار المشتكين بكل الإجراءات المتخذة بخصوصها. كما تم إرشاد بعضهم وتوجيههم إلى سلوك المساطر والإجراءات القانونية المخول لهم اتباعها لطرح أو متابعة إجراءات معالجة شكاياتهم أو تظلماتهم أمام الجهات المختصة باعتبارها هي وحدها المعنية بالبت فيها وكذا تبليغهم بالقرارات المتخذة بشأنها. \n", "\n", "<|ref|>text<|/ref|><|det|>[[168, 657, 835, 722]]<|/det|>\n", "10. ويسجل المجلس تفاعل القطاعات الحكومية مع الشكايات التي يحيلها عليها، إلا أن هذا التفاعل ما زال يتم بدرجات تتفاوت بين قطاع وآخر، كما أن نوعية الأجوبة تبقى أغلبها ذات طبيعة عامة وتبريرية، مما يجعلها غير مقنعة بالنسبة لموضوع الادعاء. كما يسجل المجلس، في الكثير من الحالات، عدم\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 936\n", "compression ratio: 1.2\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 5/5 [00:00<00:00, 142663.40it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_7.png\n", "\n", "[30/31] Processing: journal_8.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[456, 98, 523, 123]]<|/det|>\n", "ملحق \n", "\n", "<|ref|>text<|/ref|><|det|>[[128, 131, 840, 234]]<|/det|>\n", "بالقرار المشترك لوزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات ووزير الداخلية\n", "وزير الصناعة والتجارة رقم 2479.23 الصادر في 18 من محرم 1446 (24 يوليو 2024) المتعلق\n", "بطلب الترخيص لتسويق الفواكه والخضروات المنتجة في إطار التجميع الفلاحي مباشرة دون\n", "الزامية المرور عبر أسواق الجملة \n", "\n", "<|ref|>text<|/ref|><|det|>[[409, 238, 475, 252]]<|/det|>\n", "******** \n", "\n", "<|ref|>text<|/ref|><|det|>[[118, 264, 844, 308]]<|/det|>\n", "نموذج طلب الترخيص لتسويق الفواكه والخضروات المنتجة في إطار التجمع الفلاحي مباشرة دون إزامية المرور\n", "عبر أسواق الجملة \n", "\n", "<|ref|>text<|/ref|><|det|>[[421, 321, 536, 340]]<|/det|>\n", "المملكة المغربية \n", "\n", "<|ref|>text<|/ref|><|det|>[[287, 351, 680, 371]]<|/det|>\n", "وزارة الفلاحة والصيد البحري والتنمية القروية والمياه والغابات \n", "\n", "<|ref|>text<|/ref|><|det|>[[462, 381, 504, 393]]<|/det|>\n", "**** \n", "\n", "<|ref|>text<|/ref|><|det|>[[236, 409, 730, 430]]<|/det|>\n", "طلب ترخيص لتسويق الفواكه والخضروات المنتجة في إطار التجمع \n", "الفلاحي \n", "\n", "<|ref|>text<|/ref|><|det|>[[331, 440, 636, 461]]<|/det|>\n", "مباشرة دون إزامية المرور عبر أسواق الجملة \n", "\n", "<|ref|>text<|/ref|><|det|>[[481, 472, 848, 490]]<|/det|>\n", "المديرية الجهوية للفلاحة \n", "\n", "<|ref|>text<|/ref|><|det|>[[763, 501, 875, 520]]<|/det|>\n", "تعريف المجمع: \n", "\n", "<|ref|>text<|/ref|><|det|>[[710, 530, 875, 548]]<|/det|>\n", "بالنسبة للأشخاص الذاتيين: \n", "\n", "<|ref|>text<|/ref|><|det|>[[203, 558, 840, 576]]<|/det|>\n", "- الاسم العائلي والشخصي: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[203, 577, 840, 595]]<|/det|>\n", "- رقم البطاقة الوطنية للتعريف الالكترونية أو وثيقة تعريف أخرى: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[203, 597, 840, 614]]<|/det|>\n", "- عنوان الإقامة: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[203, 616, 840, 633]]<|/det|>\n", "- البريد الإلكتروني: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[203, 635, 840, 652]]<|/det|>\n", "- الهاتف: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[696, 663, 875, 681]]<|/det|>\n", "بالنسبة للأشخاص الاعتباريين: \n", "\n", "<|ref|>text<|/ref|><|det|>[[113, 691, 840, 708]]<|/det|>\n", "- التسمية: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[113, 710, 840, 727]]<|/det|>\n", "- الشكل القانوني: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[113, 729, 840, 746]]<|/det|>\n", "- المقر الاجتماعي: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[113, 748, 840, 765]]<|/det|>\n", "- رقم السجل التجاري أو كل مُعَرَف آخر: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[113, 767, 840, 784]]<|/det|>\n", "- الاسم العائلي والشخصي للممثل القانوني: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[113, 786, 840, 803]]<|/det|>\n", "- رقم وثيقة تعريف الممثل القانوني: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[113, 805, 840, 822]]<|/det|>\n", "- البريد الإلكتروني: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[113, 824, 840, 841]]<|/det|>\n", "- الهاتف: .......................................................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[209, 853, 875, 871]]<|/det|>\n", "مرجع شهادة التجميع الفلاحي (الرقم والتاريخ): ................................ تاريخ انتهاء الصلاحية: ....................\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 972\n", "compression ratio: 1.24\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 27/27 [00:00<00:00, 256213.14it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_8.png\n", "\n", "[31/31] Processing: journal_9.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[111, 98, 880, 135]]<|/det|>\n", "مرجع ترخيص التسويق المباشر للفوائه والخضروات (الرقم والتاريخ)، إذا تعلق الأمر بطلب تجديد الترخيص: .................... تاريخ انتهاء الصلاحية: .................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[111, 170, 880, 208]]<|/det|>\n", "أطلب الترخيص لي لتسويق الفواكه والخضروات المنتجة في إطار التجميع الفلاحي مباشرة دون إلزامية المرور عبر أسواق الجملة في المدن التالية: \n", "\n", "<|ref|>text<|/ref|><|det|>[[595, 221, 848, 237]]<|/det|>\n", "• ................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[595, 241, 848, 256]]<|/det|>\n", "• ................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[595, 260, 848, 275]]<|/det|>\n", "• ................................ \n", "\n", "<|ref|>text<|/ref|><|det|>[[390, 285, 636, 302]]<|/det|>\n", "وحرر ب .................... في .................... \n", "\n", "<|ref|>text<|/ref|><|det|>[[465, 312, 533, 328]]<|/det|>\n", "التوقيع: \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 360, 900, 420]]<|/det|>\n", "قرار مشترك لوزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات ووزير الداخلية ووزير الصناعة والتجارة رقم 2480.23 صادر في 18 من محرم 1446 (24 يوليو 2024) بتحديد كيفيات القيام بالتصاريح المتعلقة بالفواكه والخضروات المنتجة في إطار التجميع الفلاحي المرخص بتسويقها مباشرة دون إلزامية المرور عبر أسواق الجملة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[451, 440, 848, 460]]<|/det|>\n", "وزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات، \n", "\n", "<|ref|>text<|/ref|><|det|>[[753, 464, 848, 482]]<|/det|>\n", "وزير الداخلية، \n", "\n", "<|ref|>text<|/ref|><|det|>[[690, 486, 848, 505]]<|/det|>\n", "وزير الصناعة والتجارة، \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 510, 900, 548]]<|/det|>\n", "بناء على القانون رقم 37.21 بسن تدابير خاصة تتعلق بالتسويق المباشر للفوائه والخضروات المنتجة في إطار التجميع الفلاحي، الصادر بتنفيذه الظهير الشريف رقم 1.21.72 بتاريخ 3 ذي الحجة 1442 (14 يوليو 2021)، لا سيما المادة الرابعة منه؛ \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 554, 900, 593]]<|/det|>\n", "وعلى المرسوم رقم 2.23.920 الصادر في 2 محرم 1446 (8 يوليو 2024) بتطبيق القانون رقم 37.21 بسن تدابير خاصة تتعلق بالتسويق الماشرف للفوائه والخضروات المنتجة في إطار التجميع الفلاحي ولا سيما المادة 12 منه، \n", "\n", "<|ref|>text<|/ref|><|det|>[[745, 597, 839, 615]]<|/det|>\n", "قروا ما يلي: \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[457, 619, 540, 637]]<|/det|>\n", "المادة الأولى \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 640, 900, 679]]<|/det|>\n", "تعد التصاريح المشار إليها في المادة 12 من المرسوم المشار إليه أعلاه رقم 2.23.920، من طرف المجمّع المعني وفق النموذج المحدد في الملحق بهذا القرار المشترك. \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 684, 900, 722]]<|/det|>\n", "تودع التصاريح المذكورة أعلاه لدى مصلحة تلقي التصاريح الموضوعة من قبل الجماعة المعنية رهن إشارة المجمّعين، طبقاً لأحكام المادة الرابعة من القانون المشار إليه أعلاه رقم 37.21. \n", "\n", "<|ref|>text<|/ref|><|det|>[[126, 727, 880, 768]]<|/det|>\n", "يجب إيداع هذه التصاريح كل ثلاثة أشهر، وذلك في اليوم الأخير من أيام العمل من الثلاثة (3) أشهر، على أبعد تقدير.\n", "المادة الثانية \n", "\n", "<|ref|>text<|/ref|><|det|>[[580, 775, 880, 795]]<|/det|>\n", "ينشر هذا القرار المشترك بالجريدة الرسمية. \n", "\n", "<|ref|>text<|/ref|><|det|>[[91, 797, 460, 816]]<|/det|>\n", "وحرر بالرباط في 18 من محرم 1446 (24 يوليو 2024). \n", "\n", "<|ref|>text<|/ref|><|det|>[[275, 824, 357, 839]]<|/det|>\n", "وزير الداخلية، \n", "\n", "<|ref|>text<|/ref|><|det|>[[243, 839, 386, 854]]<|/det|>\n", "الإمضاء: عبد الوافي لفتيت. \n", "\n", "<|ref|>text<|/ref|><|det|>[[435, 857, 562, 872]]<|/det|>\n", "وزير الصناعة والتجارة، \n", "\n", "<|ref|>text<|/ref|><|det|>[[435, 872, 560, 887]]<|/det|>\n", "الإمضاء: رياض مزور. \n", "\n", "<|ref|>text<|/ref|><|det|>[[520, 825, 840, 840]]<|/det|>\n", "وزير الفلاحة والصيد البحري والتنمية القروية والمياة والغابات، \n", "\n", "<|ref|>text<|/ref|><|det|>[[625, 840, 748, 855]]<|/det|>\n", "الإمضاء: محمد صديقي.\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 1224\n", "compression ratio: 1.57\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 26/26 [00:00<00:00, 177320.17it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_9.png\n", "\n", "All done! Results saved to './deepseek_output' folder.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "# Setup directories\n", "input_folder = './images'\n", "output_folder = './deepseek_output'\n", "\n", "# Create output folder if it doesn't exist\n", "os.makedirs(output_folder, exist_ok=True)\n", "\n", "# Define prompt\n", "prompt = \"\\n<|grounding|>Convert the document to markdown. \"\n", "\n", "# Supported image extensions\n", "image_extensions = {'.jpg', '.jpeg', '.png', '.bmp', '.tiff', '.webp'}\n", "\n", "# Get all image files from images2 folder\n", "image_files = []\n", "for ext in image_extensions:\n", " image_files.extend(Path(input_folder).glob(f'*{ext}'))\n", " image_files.extend(Path(input_folder).glob(f'*{ext.upper()}'))\n", "\n", "image_files = sorted(image_files)\n", "\n", "if not image_files:\n", " print(f\"No image files found in '{input_folder}' folder!\")\n", "else:\n", " print(f\"Found {len(image_files)} images to process\\n\")\n", " \n", " # Process each image\n", " for idx, image_path in enumerate(image_files, 1):\n", " print(f\"[{idx}/{len(image_files)}] Processing: {image_path.name}\")\n", " \n", " # Create output subfolder for this image\n", " image_output_path = os.path.join(output_folder, image_path.stem)\n", " \n", " try:\n", " # Run inference\n", " res = model.infer(\n", " tokenizer, \n", " prompt=prompt, \n", " image_file=str(image_path), \n", " output_path=image_output_path, \n", " base_size=1024, \n", " image_size=640, \n", " crop_mode=True, \n", " save_results=True, \n", " test_compress=True\n", " )\n", " print(f\" ✓ Completed: {image_path.name}\\n\")\n", " \n", " except Exception as e:\n", " print(f\" ✗ Error processing {image_path.name}: {str(e)}\\n\")\n", " continue\n", " \n", " print(f\"All done! Results saved to '{output_folder}' folder.\")" ] }, { "cell_type": "markdown", "id": "71f59c0f-a127-490f-a436-11c576c750bb", "metadata": {}, "source": [ "### Test : deepseek using skiredj prompt is a FAIlure generate empty markdowns " ] }, { "cell_type": "code", "execution_count": 1, "id": "2e31d037-1704-4dc8-b2ed-3c8b8ded8dd7", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n", "You are using a model of type deepseek_vl_v2 to instantiate a model of type DeepseekOCR. This is not supported for all configurations of models and can yield errors.\n", "You are attempting to use Flash Attention 2.0 without specifying a torch dtype. This might lead to unexpected behaviour\n", "You are attempting to use Flash Attention 2.0 with a model not initialized on GPU. Make sure to move the model to GPU after initializing it on CPU with `model.to('cuda')`.\n", "Some weights of DeepseekOCRForCausalLM were not initialized from the model checkpoint at ./DeepSeek-OCR and are newly initialized: ['model.vision_model.embeddings.position_ids']\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" ] } ], "source": [ "from transformers import AutoModel, AutoTokenizer\n", "import torch\n", "from pathlib import Path\n", "import os\n", "\n", "os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0\"\n", "\n", "# --- Model ---\n", "model_name = \"./DeepSeek-OCR\"\n", "tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n", "model = AutoModel.from_pretrained(model_name, _attn_implementation='flash_attention_2', trust_remote_code=True, use_safetensors=True)\n", "model = model.eval().cuda().to(torch.bfloat16)" ] }, { "cell_type": "code", "execution_count": 13, "id": "ded97933-2538-4410-a512-27ed9e044f44", "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Found 31 images to process\n", "\n", "[1/31] Processing: journal_10.png\n", "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_10.png\n", "\n", "[2/31] Processing: journal_12.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_12.png\n", "\n", "[3/31] Processing: journal_13.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_13.png\n", "\n", "[4/31] Processing: journal_14.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2382, 3368)\n", "valid image tokens: 781\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_14.png\n", "\n", "[5/31] Processing: journal_15_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_15_left.png\n", "\n", "[6/31] Processing: journal_15_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2386, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_15_right.png\n", "\n", "[7/31] Processing: journal_16_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_16_left.png\n", "\n", "[8/31] Processing: journal_16_right.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2386, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: journal_16_right.png\n", "\n", "[9/31] Processing: journal_17_left.png\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([3, 100, 1280])\n", "=====================\n", "\n", "==================================================\n", "image size: (2378, 6736)\n", "valid image tokens: 390\n", "output texts tokens (valid): 1\n", "compression ratio: 0.0\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 0it [00:00, ?it/s]\n" ] }, { "ename": "KeyboardInterrupt", "evalue": "", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mKeyboardInterrupt\u001b[39m Traceback (most recent call last)", "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[14]\u001b[39m\u001b[32m, line 37\u001b[39m\n\u001b[32m 33\u001b[39m image_output_path = os.path.join(output_folder, image_path.stem)\n\u001b[32m 35\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m 36\u001b[39m \u001b[38;5;66;03m# Run inference\u001b[39;00m\n\u001b[32m---> \u001b[39m\u001b[32m37\u001b[39m res = \u001b[43mmodel\u001b[49m\u001b[43m.\u001b[49m\u001b[43minfer\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 38\u001b[39m \u001b[43m \u001b[49m\u001b[43mtokenizer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[32m 39\u001b[39m \u001b[43m \u001b[49m\u001b[43mprompt\u001b[49m\u001b[43m=\u001b[49m\u001b[43mprompt\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[32m 40\u001b[39m \u001b[43m \u001b[49m\u001b[43mimage_file\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mstr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mimage_path\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[32m 41\u001b[39m \u001b[43m \u001b[49m\u001b[43moutput_path\u001b[49m\u001b[43m=\u001b[49m\u001b[43mimage_output_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[32m 42\u001b[39m \u001b[43m \u001b[49m\u001b[43mbase_size\u001b[49m\u001b[43m=\u001b[49m\u001b[32;43m1024\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[32m 43\u001b[39m \u001b[43m \u001b[49m\u001b[43mimage_size\u001b[49m\u001b[43m=\u001b[49m\u001b[32;43m640\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[32m 44\u001b[39m \u001b[43m \u001b[49m\u001b[43mcrop_mode\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[32m 45\u001b[39m \u001b[43m \u001b[49m\u001b[43msave_results\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[32m 46\u001b[39m \u001b[43m \u001b[49m\u001b[43mtest_compress\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\n\u001b[32m 47\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 48\u001b[39m \u001b[38;5;28mprint\u001b[39m(\u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33m ✓ Completed: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mimage_path.name\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[33m\"\u001b[39m)\n\u001b[32m 50\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.cache/huggingface/modules/transformers_modules/DeepSeek-OCR/modeling_deepseekocr.py:1037\u001b[39m, in \u001b[36mDeepseekOCRForCausalLM.infer\u001b[39m\u001b[34m(self, tokenizer, prompt, image_file, output_path, base_size, image_size, crop_mode, test_compress, save_results, eval_mode)\u001b[39m\n\u001b[32m 1034\u001b[39m plt.savefig(\u001b[33mf\u001b[39m\u001b[33m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00moutput_path\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m/geo.jpg\u001b[39m\u001b[33m'\u001b[39m)\n\u001b[32m 1035\u001b[39m plt.close()\n\u001b[32m-> \u001b[39m\u001b[32m1037\u001b[39m \u001b[43mresult\u001b[49m\u001b[43m.\u001b[49m\u001b[43msave\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43mf\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[38;5;132;43;01m{\u001b[39;49;00m\u001b[43moutput_path\u001b[49m\u001b[38;5;132;43;01m}\u001b[39;49;00m\u001b[33;43m/result_with_boxes.jpg\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/PIL/Image.py:2588\u001b[39m, in \u001b[36mImage.save\u001b[39m\u001b[34m(self, fp, format, **params)\u001b[39m\n\u001b[32m 2585\u001b[39m fp = cast(IO[\u001b[38;5;28mbytes\u001b[39m], fp)\n\u001b[32m 2587\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m-> \u001b[39m\u001b[32m2588\u001b[39m \u001b[43msave_handler\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfp\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfilename\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 2589\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m:\n\u001b[32m 2590\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m open_fp:\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/PIL/JpegImagePlugin.py:850\u001b[39m, in \u001b[36m_save\u001b[39m\u001b[34m(im, fp, filename)\u001b[39m\n\u001b[32m 845\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 846\u001b[39m \u001b[38;5;66;03m# The EXIF info needs to be written as one block, + APP1, + one spare byte.\u001b[39;00m\n\u001b[32m 847\u001b[39m \u001b[38;5;66;03m# Ensure that our buffer is big enough. Same with the icc_profile block.\u001b[39;00m\n\u001b[32m 848\u001b[39m bufsize = \u001b[38;5;28mmax\u001b[39m(\u001b[38;5;28mlen\u001b[39m(exif) + \u001b[32m5\u001b[39m, \u001b[38;5;28mlen\u001b[39m(extra) + \u001b[32m1\u001b[39m)\n\u001b[32m--> \u001b[39m\u001b[32m850\u001b[39m \u001b[43mImageFile\u001b[49m\u001b[43m.\u001b[49m\u001b[43m_save\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 851\u001b[39m \u001b[43m \u001b[49m\u001b[43mim\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfp\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m[\u001b[49m\u001b[43mImageFile\u001b[49m\u001b[43m.\u001b[49m\u001b[43m_Tile\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mjpeg\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m(\u001b[49m\u001b[32;43m0\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[32;43m0\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m \u001b[49m\u001b[43m+\u001b[49m\u001b[43m \u001b[49m\u001b[43mim\u001b[49m\u001b[43m.\u001b[49m\u001b[43msize\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[32;43m0\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mrawmode\u001b[49m\u001b[43m)\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbufsize\u001b[49m\n\u001b[32m 852\u001b[39m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/PIL/ImageFile.py:646\u001b[39m, in \u001b[36m_save\u001b[39m\u001b[34m(im, fp, tile, bufsize)\u001b[39m\n\u001b[32m 644\u001b[39m fh = fp.fileno()\n\u001b[32m 645\u001b[39m fp.flush()\n\u001b[32m--> \u001b[39m\u001b[32m646\u001b[39m \u001b[43m_encode_tile\u001b[49m\u001b[43m(\u001b[49m\u001b[43mim\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfp\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtile\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbufsize\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfh\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 647\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m (\u001b[38;5;167;01mAttributeError\u001b[39;00m, io.UnsupportedOperation) \u001b[38;5;28;01mas\u001b[39;00m exc:\n\u001b[32m 648\u001b[39m _encode_tile(im, fp, tile, bufsize, \u001b[38;5;28;01mNone\u001b[39;00m, exc)\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/PIL/ImageFile.py:681\u001b[39m, in \u001b[36m_encode_tile\u001b[39m\u001b[34m(im, fp, tile, bufsize, fh, exc)\u001b[39m\n\u001b[32m 678\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 679\u001b[39m \u001b[38;5;66;03m# slight speedup: compress to real file object\u001b[39;00m\n\u001b[32m 680\u001b[39m \u001b[38;5;28;01massert\u001b[39;00m fh \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m681\u001b[39m errcode = \u001b[43mencoder\u001b[49m\u001b[43m.\u001b[49m\u001b[43mencode_to_file\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfh\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbufsize\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 682\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m errcode < \u001b[32m0\u001b[39m:\n\u001b[32m 683\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m _get_oserror(errcode, encoder=\u001b[38;5;28;01mTrue\u001b[39;00m) \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mexc\u001b[39;00m\n", "\u001b[31mKeyboardInterrupt\u001b[39m: " ] }, { "name": "stderr", "output_type": "stream", "text": [ "Traceback (most recent call last):\n", "Exception ignored in: 'zmq.backend.cython._zmq.Frame.__dealloc__'\n", "Traceback (most recent call last):\n", " File \"zmq/backend/cython/_zmq.py\", line 179, in zmq.backend.cython._zmq._check_rc\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3171, in _run_cell\n", " result = runner(coro)\n", " ^^^^^^^^^^^^\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/async_helpers.py\", line 128, in _pseudo_sync_runner\n", " coro.send(None)\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3413, in run_cell_async\n", " self._format_exception_for_storage(result.error_in_exec)\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/interactiveshell.py\", line 3467, in _format_exception_for_storage\n", " stb = self.InteractiveTB.structured_traceback(\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py\", line 1185, in structured_traceback\n", " return FormattedTB.structured_traceback(\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py\", line 1056, in structured_traceback\n", " return VerboseTB.structured_traceback(\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py\", line 864, in structured_traceback\n", " formatted_exceptions: list[list[str]] = self.format_exception_as_a_whole(\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py\", line 749, in format_exception_as_a_whole\n", " records = self.get_records(etb, context, tb_offset) if etb else []\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py\", line 822, in get_records\n", " mod = inspect.getmodule(cf.tb_frame)\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File \"/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/inspect.py\", line 1003, in getmodule\n", " return sys.modules.get(modulesbyfile[file])\n", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", "KeyboardInterrupt\n", "\n", "During handling of the above exception, another exception occurred:\n", "\n", "Traceback (most recent call last):\n", " File \"zmq/backend/cython/_zmq.py\", line 179, in zmq.backend.cython._zmq._check_rc\n", " PyErr_CheckSignals()\n", " ^^^^^^^^^^^\n", "KeyboardInterrupt\n", "KeyboardInterrupt: \n" ] }, { "ename": "KeyboardInterrupt", "evalue": "", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mKeyboardInterrupt\u001b[39m Traceback (most recent call last)", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/async_helpers.py:128\u001b[39m, in \u001b[36m_pseudo_sync_runner\u001b[39m\u001b[34m(coro)\u001b[39m\n\u001b[32m 120\u001b[39m \u001b[38;5;250m\u001b[39m\u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 121\u001b[39m \u001b[33;03mA runner that does not really allow async execution, and just advance the coroutine.\u001b[39;00m\n\u001b[32m 122\u001b[39m \n\u001b[32m (...)\u001b[39m\u001b[32m 125\u001b[39m \u001b[33;03mCredit to Nathaniel Smith\u001b[39;00m\n\u001b[32m 126\u001b[39m \u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 127\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m--> \u001b[39m\u001b[32m128\u001b[39m \u001b[43mcoro\u001b[49m\u001b[43m.\u001b[49m\u001b[43msend\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[32m 129\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mStopIteration\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m exc:\n\u001b[32m 130\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m exc.value\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/interactiveshell.py:3413\u001b[39m, in \u001b[36mInteractiveShell.run_cell_async\u001b[39m\u001b[34m(self, raw_cell, store_history, silent, shell_futures, transformed_cell, preprocessing_exc_tuple, cell_id)\u001b[39m\n\u001b[32m 3409\u001b[39m exec_count = \u001b[38;5;28mself\u001b[39m.execution_count\n\u001b[32m 3410\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m result.error_in_exec:\n\u001b[32m 3411\u001b[39m \u001b[38;5;66;03m# Store formatted traceback and error details\u001b[39;00m\n\u001b[32m 3412\u001b[39m \u001b[38;5;28mself\u001b[39m.history_manager.exceptions[exec_count] = (\n\u001b[32m-> \u001b[39m\u001b[32m3413\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_format_exception_for_storage\u001b[49m\u001b[43m(\u001b[49m\u001b[43mresult\u001b[49m\u001b[43m.\u001b[49m\u001b[43merror_in_exec\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 3414\u001b[39m )\n\u001b[32m 3416\u001b[39m \u001b[38;5;66;03m# Each cell is a *single* input, regardless of how many lines it has\u001b[39;00m\n\u001b[32m 3417\u001b[39m \u001b[38;5;28mself\u001b[39m.execution_count += \u001b[32m1\u001b[39m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/interactiveshell.py:3467\u001b[39m, in \u001b[36mInteractiveShell._format_exception_for_storage\u001b[39m\u001b[34m(self, exception, filename, running_compiled_code)\u001b[39m\n\u001b[32m 3464\u001b[39m stb = evalue._render_traceback_()\n\u001b[32m 3465\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 3466\u001b[39m \u001b[38;5;66;03m# Otherwise, use InteractiveTB to format the traceback.\u001b[39;00m\n\u001b[32m-> \u001b[39m\u001b[32m3467\u001b[39m stb = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mInteractiveTB\u001b[49m\u001b[43m.\u001b[49m\u001b[43mstructured_traceback\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 3468\u001b[39m \u001b[43m \u001b[49m\u001b[43metype\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mevalue\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtb\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtb_offset\u001b[49m\u001b[43m=\u001b[49m\u001b[32;43m1\u001b[39;49m\n\u001b[32m 3469\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 3470\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m:\n\u001b[32m 3471\u001b[39m \u001b[38;5;66;03m# In case formatting fails, fallback to Python's built-in formatting.\u001b[39;00m\n\u001b[32m 3472\u001b[39m stb = traceback.format_exception(etype, evalue, tb)\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py:1185\u001b[39m, in \u001b[36mAutoFormattedTB.structured_traceback\u001b[39m\u001b[34m(self, etype, evalue, etb, tb_offset, context)\u001b[39m\n\u001b[32m 1183\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 1184\u001b[39m \u001b[38;5;28mself\u001b[39m.tb = etb\n\u001b[32m-> \u001b[39m\u001b[32m1185\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mFormattedTB\u001b[49m\u001b[43m.\u001b[49m\u001b[43mstructured_traceback\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 1186\u001b[39m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43metype\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mevalue\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43metb\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtb_offset\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcontext\u001b[49m\n\u001b[32m 1187\u001b[39m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py:1056\u001b[39m, in \u001b[36mFormattedTB.structured_traceback\u001b[39m\u001b[34m(self, etype, evalue, etb, tb_offset, context)\u001b[39m\n\u001b[32m 1053\u001b[39m mode = \u001b[38;5;28mself\u001b[39m.mode\n\u001b[32m 1054\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m mode \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m.verbose_modes:\n\u001b[32m 1055\u001b[39m \u001b[38;5;66;03m# Verbose modes need a full traceback\u001b[39;00m\n\u001b[32m-> \u001b[39m\u001b[32m1056\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mVerboseTB\u001b[49m\u001b[43m.\u001b[49m\u001b[43mstructured_traceback\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 1057\u001b[39m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43metype\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mevalue\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43metb\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtb_offset\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcontext\u001b[49m\n\u001b[32m 1058\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1059\u001b[39m \u001b[38;5;28;01melif\u001b[39;00m mode == \u001b[33m\"\u001b[39m\u001b[33mDocs\u001b[39m\u001b[33m\"\u001b[39m:\n\u001b[32m 1060\u001b[39m \u001b[38;5;66;03m# return DocTB\u001b[39;00m\n\u001b[32m 1061\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m DocTB(\n\u001b[32m 1062\u001b[39m theme_name=\u001b[38;5;28mself\u001b[39m._theme_name,\n\u001b[32m 1063\u001b[39m call_pdb=\u001b[38;5;28mself\u001b[39m.call_pdb,\n\u001b[32m (...)\u001b[39m\u001b[32m 1071\u001b[39m etype, evalue, etb, tb_offset, \u001b[32m1\u001b[39m\n\u001b[32m 1072\u001b[39m ) \u001b[38;5;66;03m# type: ignore[arg-type]\u001b[39;00m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py:864\u001b[39m, in \u001b[36mVerboseTB.structured_traceback\u001b[39m\u001b[34m(self, etype, evalue, etb, tb_offset, context)\u001b[39m\n\u001b[32m 855\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mstructured_traceback\u001b[39m(\n\u001b[32m 856\u001b[39m \u001b[38;5;28mself\u001b[39m,\n\u001b[32m 857\u001b[39m etype: \u001b[38;5;28mtype\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 861\u001b[39m context: \u001b[38;5;28mint\u001b[39m = \u001b[32m5\u001b[39m,\n\u001b[32m 862\u001b[39m ) -> \u001b[38;5;28mlist\u001b[39m[\u001b[38;5;28mstr\u001b[39m]:\n\u001b[32m 863\u001b[39m \u001b[38;5;250m \u001b[39m\u001b[33;03m\"\"\"Return a nice text document describing the traceback.\"\"\"\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m864\u001b[39m formatted_exceptions: \u001b[38;5;28mlist\u001b[39m[\u001b[38;5;28mlist\u001b[39m[\u001b[38;5;28mstr\u001b[39m]] = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mformat_exception_as_a_whole\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 865\u001b[39m \u001b[43m \u001b[49m\u001b[43metype\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mevalue\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43metb\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcontext\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtb_offset\u001b[49m\n\u001b[32m 866\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 868\u001b[39m termsize = \u001b[38;5;28mmin\u001b[39m(\u001b[32m75\u001b[39m, get_terminal_size()[\u001b[32m0\u001b[39m])\n\u001b[32m 869\u001b[39m theme = theme_table[\u001b[38;5;28mself\u001b[39m._theme_name]\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py:749\u001b[39m, in \u001b[36mVerboseTB.format_exception_as_a_whole\u001b[39m\u001b[34m(self, etype, evalue, etb, context, tb_offset)\u001b[39m\n\u001b[32m 747\u001b[39m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(tb_offset, \u001b[38;5;28mint\u001b[39m)\n\u001b[32m 748\u001b[39m head = \u001b[38;5;28mself\u001b[39m.prepare_header(\u001b[38;5;28mstr\u001b[39m(etype), \u001b[38;5;28mself\u001b[39m.long_header)\n\u001b[32m--> \u001b[39m\u001b[32m749\u001b[39m records = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mget_records\u001b[49m\u001b[43m(\u001b[49m\u001b[43metb\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcontext\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtb_offset\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mif\u001b[39;00m etb \u001b[38;5;28;01melse\u001b[39;00m []\n\u001b[32m 751\u001b[39m frames = []\n\u001b[32m 752\u001b[39m skipped = \u001b[32m0\u001b[39m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/IPython/core/ultratb.py:822\u001b[39m, in \u001b[36mVerboseTB.get_records\u001b[39m\u001b[34m(self, etb, context, tb_offset)\u001b[39m\n\u001b[32m 820\u001b[39m \u001b[38;5;28;01mwhile\u001b[39;00m cf \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 821\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m--> \u001b[39m\u001b[32m822\u001b[39m mod = \u001b[43minspect\u001b[49m\u001b[43m.\u001b[49m\u001b[43mgetmodule\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcf\u001b[49m\u001b[43m.\u001b[49m\u001b[43mtb_frame\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 823\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m mod \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 824\u001b[39m mod_name = mod.\u001b[34m__name__\u001b[39m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/inspect.py:1003\u001b[39m, in \u001b[36mgetmodule\u001b[39m\u001b[34m(object, _filename)\u001b[39m\n\u001b[32m 1001\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[32m 1002\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m file \u001b[38;5;129;01min\u001b[39;00m modulesbyfile:\n\u001b[32m-> \u001b[39m\u001b[32m1003\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43msys\u001b[49m\u001b[43m.\u001b[49m\u001b[43mmodules\u001b[49m\u001b[43m.\u001b[49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodulesbyfile\u001b[49m\u001b[43m[\u001b[49m\u001b[43mfile\u001b[49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1004\u001b[39m \u001b[38;5;66;03m# Update the filename to module name cache and check yet again\u001b[39;00m\n\u001b[32m 1005\u001b[39m \u001b[38;5;66;03m# Copy sys.modules in order to cope with changes while iterating\u001b[39;00m\n\u001b[32m 1006\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m modname, module \u001b[38;5;129;01min\u001b[39;00m sys.modules.copy().items():\n", "\u001b[31mKeyboardInterrupt\u001b[39m: " ] } ], "source": [ "# Setup directories\n", "input_folder = './images'\n", "output_folder = './DS_output_prompt_skirdj_2'\n", "\n", "# Create output folder if it doesn't exist\n", "os.makedirs(output_folder, exist_ok=True)\n", "\n", "# Define prompt\n", "prompt = \"\\n<|grounding|>\\n\\nExtract all visible text from this document image following these rules:\\n\\n0. Exhaustivity\\n- OCR all text faithfully without omitting or altering ANY word or detail.\\n\\n1. Line Breaks\\n- Preserve line breaks ONLY when:\\n * A sentence ends with a period, question mark, or exclamation mark followed by a newline.\\n * A heading/title is separated from body text.\\n- ALWAYS insert a line break after subtitles beginning with: المادة / الفصل / الباب.\\n Examples:\\n المادة الثانية\\n الفصل 2\\n الباب الثالث\\n- In all other cases, merge text into continuous paragraphs for readability.\\n\\n2. Tables\\n- If tables exist, convert them into clean valid Markdown table syntax.\\n\\n3. Ignore Content\\n- Do NOT OCR:\\n * Headers at the top of the page (e.g., journal name like \\\"الجريدة الرسمية\\\", issue numbers, dates)\\n * Footers or page numbers\\n * Any number located at the extreme bottom edge of the page\\n\\n4. Subtitle Rules\\n- Subtitles are ONLY lines beginning with: المادة / الفصل\\n- Before subtitles, prepend Markdown headers:\\n * الفصل → ##فصل\\n * المادة → ###مادة\\n- Always add a line break AFTER each subtitle line.\\n- NEVER use a single # heading.\\n\\n5. Two-Column Pages\\n- If layout has two vertical columns, read RIGHT column first, then LEFT column.\\n- Do NOT apply this rule to tables — only to page layout.\\n\\n6. Keep All Dots\\n- If text contains sequences of dots (e.g., \\\"....\\\"), keep ALL dots exactly as printed. Do not remove or shorten them.\\n\\nGoal output format: clean, readable Markdown that respects Arabic legal document formatting and hierarchy.\"\n", "\n", "\n", "# Supported image extensions\n", "image_extensions = {'.jpg', '.jpeg', '.png', '.bmp', '.tiff', '.webp'}\n", "\n", "# Get all image files from images2 folder\n", "image_files = []\n", "for ext in image_extensions:\n", " image_files.extend(Path(input_folder).glob(f'*{ext}'))\n", " image_files.extend(Path(input_folder).glob(f'*{ext.upper()}'))\n", "\n", "image_files = sorted(image_files)\n", "\n", "if not image_files:\n", " print(f\"No image files found in '{input_folder}' folder!\")\n", "else:\n", " print(f\"Found {len(image_files)} images to process\\n\")\n", " \n", " # Process each image\n", " for idx, image_path in enumerate(image_files, 1):\n", " print(f\"[{idx}/{len(image_files)}] Processing: {image_path.name}\")\n", " \n", " # Create output subfolder for this image\n", " image_output_path = os.path.join(output_folder, image_path.stem)\n", " \n", " try:\n", " # Run inference\n", " res = model.infer(\n", " tokenizer, \n", " prompt=prompt, \n", " image_file=str(image_path), \n", " output_path=image_output_path, \n", " base_size=1024, \n", " image_size=640, \n", " crop_mode=True, \n", " save_results=True, \n", " test_compress=True\n", " )\n", " print(f\" ✓ Completed: {image_path.name}\\n\")\n", " \n", " except Exception as e:\n", " print(f\" ✗ Error processing {image_path.name}: {str(e)}\\n\")\n", " continue\n", " \n", " print(f\"All done! Results saved to '{output_folder}' folder.\")" ] }, { "cell_type": "markdown", "id": "792563a8-d14b-4b68-91f9-309eb2ee1a0f", "metadata": {}, "source": [ "## test tables only " ] }, { "cell_type": "code", "execution_count": 3, "id": "c0c84de9-fcf5-4a91-bd24-a4e46996eebb", "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Found 20 images to process\n", "\n", "[1/20] Processing: 1.PNG\n", "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>table_caption<|/ref|><|det|>[[160, 16, 840, 40]]<|/det|>\n", "جدول توضيحي لمجموع الشكايات المتوصل بها من طرف المجلس ولجانه الجهوية والبيته الوطنيتين \n", "\n", "<|ref|>table<|/ref|><|det|>[[113, 65, 890, 970]]<|/det|>\n", "
النسبة المئوية (%)عدد الشكاياتالجهة
42,31 %1404مديرية الحماية
3,47%115اللجنة الجهوية لحقوق الإنسان بجهة الرباط-سلام-القنيطرة
7,93%263اللجنة الجهوية لحقوق الإنسان بجهة الدار البيضاء-سطات
7,05%234اللجنة الجهوية لحقوق الإنسان بجهة طنجة-تطوان-الحسيمة
4,91%163اللجنة الجهوية لحقوق الإنسان بجهة فاس-مكناس
4,01%133اللجنة الجهوية لحقوق الإنسان بجهة بجهة الشرق
8,32%276اللجنة الجهوية لحقوق الإنسان بجهة درعة-تافياللت
3,5%116اللجنة الجهوية لحقوق الإنسان بجهة مراكش-أسفي
3,83%127اللجنة الجهوية لحقوق الإنسان بجهة بني ملال-خنيفرة
2,29%76اللجنة الجهوية لحقوق الإنسان بجهة سوس-ماسة
5,19%172اللجنة الجهوية لحقوق الإنسان بجهة كلميم-واد نون
\n", "==================================================\n", "image size: (713, 840)\n", "valid image tokens: 617\n", "output texts tokens (valid): 450\n", "compression ratio: 0.73\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 2/2 [00:00<00:00, 54471.48it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 1.PNG\n", "\n", "[2/20] Processing: 1.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>table_caption<|/ref|><|det|>[[160, 16, 840, 40]]<|/det|>\n", "جدول توضيحي لمجموع الشكايات المتوصل بها من طرف المجلس ولجانه الجهوية والبيته الوطنيتين \n", "\n", "<|ref|>table<|/ref|><|det|>[[113, 65, 890, 970]]<|/det|>\n", "
النسبة المئوية (%)عدد الشكاياتالجهة
42,31 %1404مديرية الحماية
3,47%115اللجنة الجهوية لحقوق الإنسان بجهة الرباط-سلام-القنيطرة
7,93%263اللجنة الجهوية لحقوق الإنسان بجهة الدار البيضاء-سطات
7,05%234اللجنة الجهوية لحقوق الإنسان بجهة طنجة-تطوان-الحسيمة
4,91%163اللجنة الجهوية لحقوق الإنسان بجهة فاس-مكناس
4,01%133اللجنة الجهوية لحقوق الإنسان بجهة بجهة الشرق
8,32%276اللجنة الجهوية لحقوق الإنسان بجهة درعة-تافياللت
3,5%116اللجنة الجهوية لحقوق الإنسان بجهة مراكش-أسفي
3,83%127اللجنة الجهوية لحقوق الإنسان بجهة بني ملال-خنيفرة
2,29%76اللجنة الجهوية لحقوق الإنسان بجهة سوس-ماسة
5,19%172اللجنة الجهوية لحقوق الإنسان بجهة كلميم-واد نون
\n", "==================================================\n", "image size: (713, 840)\n", "valid image tokens: 617\n", "output texts tokens (valid): 450\n", "compression ratio: 0.73\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 2/2 [00:00<00:00, 28630.06it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 1.PNG\n", "\n", "[3/20] Processing: 10.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>table_caption<|/ref|><|det|>[[360, 4, 690, 30]]<|/det|>\n", "الجدول 4: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|>[[49, 35, 950, 420]]<|/det|>\n", "
مكيفات الهواء بأحادية القناةمكيفات الهواء مزودجة القناةمكيفات الهواء باستثناء مكيفات الهواء أحادية ومزودجة القناةSEER
COP ratedEER ratedCOP ratedEER ratedSCOP (موسم التدفئة «المتوسط»)
2.042.602.602.603.804.60إذا كان PRP لغاز التبريد أكثر من 150 بالنسبة للفترة إسمية أصغر من 6 كيلوواط
1.842.342.342.343.424.14إذا كان PRP لغاز التبريد أصغر أو يساوي 150 بالنسبة للفترة إسمية أصغر من 6 كيلوواط.
2.042.602.603.804.304.30إذا كان PRP لغاز التبريد أكثر من 150 بالنسبة للفترة أوساوي 6 كيلوواط وأصغر أو تساوي 12 كيلوواط
1.842.343.423.423.873.87إذا كان PRP لغاز التبريد أصغر أو يساوي 150 بالنسبة للفترة إسمية أكثر أو تساوي 6 كيلوواط وأصغر أو تساوي 12 كيلواط
\n", "\n", "<|ref|>text<|/ref|><|det|>[[40, 430, 954, 490]]<|/det|>\n", "4- يجب أن تحترم مكيفات الهواء أحادية ومزودجة القناة المستويات المذكورة في الجدول 4 والمستويات المشار إليها في الجدول 5 أدناه والتي يتم احتسابها وفقاً للمواصفة القياسية المغربية NM 14.2.302. \n", "\n", "<|ref|>table_caption<|/ref|><|det|>[[150, 500, 800, 554]]<|/det|>\n", "الجدول 5: المستويات المتعلقة بالحد الأقصى للاستهلاك الكهربائي في حالة «إيقاف التشغيل» وحالة «السكون» بالنسبة لمكيفات الهواء أحادية ومزودجة القناة \n", "\n", "<|ref|>table<|/ref|><|det|>[[49, 559, 950, 978]]<|/det|>\n", "
حالة «إيقاف التشغيل»يجب ألا يتجاوز الاستهلاك الكهربائي للجهاز في جميع الحالات الموافقة لحالة «إيقاف التشغيل» 0.50 واط.
حالة «السكون»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجد في حالة تتوفر فيها فقط وظيفة عرض معلومة أو حالة، أو فقط عرض معلومة أو حالة مرتبطة بوظيفة إعادة التشغيل 1.00 واط.
توفر حالة «السكون» و/أو «إيقاف التشغيل»يكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود. مزوداً بحالة «إيقاف التشغيل» و/أو «السكون» و/أو بحالة أخرى يتم فيها، عند توصيله بالتيار الكهربائي، احترام المطلبات المطبقة فيما يخص الاستهلاك الكهربائي في حالة «إيقاف التشغيل» و/أو «السكون».
تدبير الاستهلاكيكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود، مزوداً بوظيفة تدبير الاستهلاك، أو بوظيفة مماثلة، التي تقوم، إذا كان الجهاز لا يؤدي وظيفته الرئيسية، أو لا يوجد منتج آخر مسببات للطاقة يعتمد على وظائفه، بوضعه تلقائيًا، بعد أقصى وقت ممكن في توافق مع الاستعمال المقصود: - في حالة «السكون»، أو - في حالة «إيقاف التشغيل»، أو - في حالة أخرى تحترم المطلبات المطبقة فيما يخص استهلاك الطاقة في حالة «إيقاف التشغيل» و/أو حالة «السكون» عندما يكون موصولا بالتيار الكهربائي، ويتم تنشيط وظيفة تدبير الاستهلاك قبل التوزيع في المصنع.
\n", "==================================================\n", "image size: (693, 762)\n", "valid image tokens: 632\n", "output texts tokens (valid): 1101\n", "compression ratio: 1.74\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 5/5 [00:00<00:00, 141699.46it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 10.PNG\n", "\n", "[4/20] Processing: 10.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>table_caption<|/ref|><|det|>[[360, 4, 690, 30]]<|/det|>\n", "الجدول 4: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|>[[49, 35, 950, 420]]<|/det|>\n", "
مكيفات الهواء بأحادية القناةمكيفات الهواء مزودجة القناةمكيفات الهواء باستثناء مكيفات الهواء أحادية ومزودجة القناةSEER
COP ratedEER ratedCOP ratedEER ratedSCOP (موسم التدفئة «المتوسط»)
2.042.602.602.603.804.60إذا كان PRP لغاز التبريد أكثر من 150 بالنسبة للفترة إسمية أصغر من 6 كيلوواط
1.842.342.342.343.424.14إذا كان PRP لغاز التبريد أصغر أو يساوي 150 بالنسبة للفترة إسمية أصغر من 6 كيلوواط.
2.042.602.603.804.304.30إذا كان PRP لغاز التبريد أكثر من 150 بالنسبة للفترة أوساوي 6 كيلوواط وأصغر أو تساوي 12 كيلوواط
1.842.343.423.423.873.87إذا كان PRP لغاز التبريد أصغر أو يساوي 150 بالنسبة للفترة إسمية أكثر أو تساوي 6 كيلوواط وأصغر أو تساوي 12 كيلواط
\n", "\n", "<|ref|>text<|/ref|><|det|>[[40, 430, 954, 490]]<|/det|>\n", "4- يجب أن تحترم مكيفات الهواء أحادية ومزودجة القناة المستويات المذكورة في الجدول 4 والمستويات المشار إليها في الجدول 5 أدناه والتي يتم احتسابها وفقاً للمواصفة القياسية المغربية NM 14.2.302. \n", "\n", "<|ref|>table_caption<|/ref|><|det|>[[150, 500, 800, 554]]<|/det|>\n", "الجدول 5: المستويات المتعلقة بالحد الأقصى للاستهلاك الكهربائي في حالة «إيقاف التشغيل» وحالة «السكون» بالنسبة لمكيفات الهواء أحادية ومزودجة القناة \n", "\n", "<|ref|>table<|/ref|><|det|>[[49, 559, 950, 978]]<|/det|>\n", "
حالة «إيقاف التشغيل»يجب ألا يتجاوز الاستهلاك الكهربائي للجهاز في جميع الحالات الموافقة لحالة «إيقاف التشغيل» 0.50 واط.
حالة «السكون»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجد في حالة تتوفر فيها فقط وظيفة عرض معلومة أو حالة، أو فقط عرض معلومة أو حالة مرتبطة بوظيفة إعادة التشغيل 1.00 واط.
توفر حالة «السكون» و/أو «إيقاف التشغيل»يكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود. مزوداً بحالة «إيقاف التشغيل» و/أو «السكون» و/أو بحالة أخرى يتم فيها، عند توصيله بالتيار الكهربائي، احترام المطلبات المطبقة فيما يخص الاستهلاك الكهربائي في حالة «إيقاف التشغيل» و/أو «السكون».
تدبير الاستهلاكيكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود، مزوداً بوظيفة تدبير الاستهلاك، أو بوظيفة مماثلة، التي تقوم، إذا كان الجهاز لا يؤدي وظيفته الرئيسية، أو لا يوجد منتج آخر مسببات للطاقة يعتمد على وظائفه، بوضعه تلقائيًا، بعد أقصى وقت ممكن في توافق مع الاستعمال المقصود: - في حالة «السكون»، أو - في حالة «إيقاف التشغيل»، أو - في حالة أخرى تحترم المطلبات المطبقة فيما يخص استهلاك الطاقة في حالة «إيقاف التشغيل» و/أو حالة «السكون» عندما يكون موصولا بالتيار الكهربائي، ويتم تنشيط وظيفة تدبير الاستهلاك قبل التوزيع في المصنع.
\n", "==================================================\n", "image size: (693, 762)\n", "valid image tokens: 632\n", "output texts tokens (valid): 1101\n", "compression ratio: 1.74\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 5/5 [00:00<00:00, 136178.70it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 10.PNG\n", "\n", "[5/20] Processing: 2.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[85, 20, 925, 470]]<|/det|>\n", "
3,19%106اللجنة الجهوية لحقوق الإنسان بجهة العيون-الساقية الحمراء.
0,54%18اللجنة الجهوية لحقوق الإنسان بجهة الداخلة-وادي الذهب
2,5%83الآلية الوطنية للتظلم الخاصة بالأطفال ضحايا انتهاكات حقوق الطفل
0,96%32الآلية الوطنية الخاصة بحماية حقوق الأشخاص في وضعية إعاقة
% 1003318المجموع
\n", "\n", "<|ref|>image_caption<|/ref|><|det|>[[377, 575, 633, 600]]<|/det|>\n", "
رسم بياني حول الشكايات الواردة
\n", "==================================================\n", "image size: (798, 839)\n", "valid image tokens: 643\n", "output texts tokens (valid): 209\n", "compression ratio: 0.33\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 2/2 [00:00<00:00, 72315.59it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 2.PNG\n", "\n", "[6/20] Processing: 2.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[85, 20, 925, 470]]<|/det|>\n", "
3,19%106اللجنة الجهوية لحقوق الإنسان بجهة العيون-الساقية الحمراء.
0,54%18اللجنة الجهوية لحقوق الإنسان بجهة الداخلة-وادي الذهب
2,5%83الآلية الوطنية للتظلم الخاصة بالأطفال ضحايا انتهاكات حقوق الطفل
0,96%32الآلية الوطنية الخاصة بحماية حقوق الأشخاص في وضعية إعاقة
% 1003318المجموع
\n", "\n", "<|ref|>image_caption<|/ref|><|det|>[[377, 575, 633, 600]]<|/det|>\n", "
رسم بياني حول الشكايات الواردة
\n", "==================================================\n", "image size: (798, 839)\n", "valid image tokens: 643\n", "output texts tokens (valid): 209\n", "compression ratio: 0.33\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 2/2 [00:00<00:00, 72315.59it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 2.PNG\n", "\n", "[7/20] Processing: 3.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>table_caption<|/ref|><|det|>[[158, 42, 849, 66]]<|/det|>\n", "جدول توضيحي يوضح طريقة وضع الشكايات الواردة على المجلس ولجانه الجهوية وآليته الوطنية \n", "\n", "<|ref|>table<|/ref|><|det|>[[100, 65, 880, 444]]<|/det|>\n", "
النسبة المئوية (%)عددهاطريقة التوصل بالشكايات
44,79%1486الوضع المباشر
34,48%1144البريد
11,27%374البريد الإلكتروني
4,31%143الاستقبال (محاضر الاستماع)
1,87%62الهاتف
100%3318المجموع
\n", "\n", "<|ref|>image_caption<|/ref|><|det|>[[348, 483, 660, 508]]<|/det|>\n", "
رسم بياني يوضح طريقة التوصل بالشكايات
\n", "\n", "<|ref|>image<|/ref|><|det|>[[245, 510, 748, 884]]<|/det|>\n", "==================================================\n", "image size: (708, 752)\n", "valid image tokens: 641\n", "output texts tokens (valid): 268\n", "compression ratio: 0.42\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 100%|██████████| 1/1 [00:00<00:00, 26546.23it/s]\n", "other: 100%|██████████| 3/3 [00:00<00:00, 82241.25it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 3.PNG\n", "\n", "[8/20] Processing: 3.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>table_caption<|/ref|><|det|>[[158, 42, 849, 66]]<|/det|>\n", "جدول توضيحي يوضح طريقة وضع الشكايات الواردة على المجلس ولجانه الجهوية وآليته الوطنية \n", "\n", "<|ref|>table<|/ref|><|det|>[[100, 65, 880, 444]]<|/det|>\n", "
النسبة المئوية (%)عددهاطريقة التوصل بالشكايات
44,79%1486الوضع المباشر
34,48%1144البريد
11,27%374البريد الإلكتروني
4,31%143الاستقبال (محاضر الاستماع)
1,87%62الهاتف
100%3318المجموع
\n", "\n", "<|ref|>image_caption<|/ref|><|det|>[[348, 483, 660, 508]]<|/det|>\n", "
رسم بياني يوضح طريقة التوصل بالشكايات
\n", "\n", "<|ref|>image<|/ref|><|det|>[[245, 510, 748, 884]]<|/det|>\n", "==================================================\n", "image size: (708, 752)\n", "valid image tokens: 641\n", "output texts tokens (valid): 268\n", "compression ratio: 0.42\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 100%|██████████| 1/1 [00:00<00:00, 21620.12it/s]\n", "other: 100%|██████████| 3/3 [00:00<00:00, 86184.33it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 3.PNG\n", "\n", "[9/20] Processing: 4.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[52, 0, 940, 105]]<|/det|>\n", "ملحق بالقرار المشترك لوزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات والوزير المنتدب لدى وزيرة الاقتصاد والمالية المكلف بالميزانية رقم 2003.24 الصادر في 17 من محرم 1446 (23 يوليو 2024) بالترخيص لشركة «SAHARA MONITORING Sarl AU» بإنشاء واستغلال مزرعة لتربية الأحياء البحرية تسمى «Sahara Monitoring» وبشر مستخرج من الاتفاقية المتعلقة بها. \n", "\n", "<|ref|>text<|/ref|><|det|>[[120, 137, 896, 168]]<|/det|>\n", "مستخرج من اتفاقية إنشاء واستغلال مزرعة لتربية الأحياء البحرية تسمى «SaharA Monitoring» \n", "\n", "<|ref|>text<|/ref|><|det|>[[80, 170, 920, 230]]<|/det|>\n", "رقم 2003/6/GON/428 الموقعة بتاريخ 28 من جمادى الأولى 1445 (12 ديسمبر 2023) بين شركة «SAHARA Monitoring» ووزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات (المادة 9 من المرسوم رقم 2.08.562 الصادر في 13 من ذي الحجة 1429 (12 ديسمبر 2008)) \n", "\n", "<|ref|>text<|/ref|><|det|>[[187, 240, 940, 263]]<|/det|>\n", "اسم المستفيد: شركة «SAHARA MONITORING Sarl AU» الكائن مقرها برقم 27، عمارة 2، إقامة نجاح، حي السلام، أكادير. \n", "\n", "<|ref|>text<|/ref|><|det|>[[0, 0, 0, 0]]<|/det|>\n", "مدة الاتفاقية: 10 سنوات، قابلة للتجديد. \n", "\n", "<|ref|>text<|/ref|><|det|>[[0, 0, 0, 0]]<|/det|>\n", "==================================================\n", "image size: (676, 799)\n", "valid image tokens: 616\n", "output texts tokens (valid): 432\n", "compression ratio: 0.7\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 6/6 [00:00<00:00, 201326.59it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 4.PNG\n", "\n", "[10/20] Processing: 4.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[52, 0, 940, 105]]<|/det|>\n", "ملحق بالقرار المشترك لوزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات والوزير المنتدب لدى وزيرة الاقتصاد والمالية المكلف بالميزانية رقم 2003.24 الصادر في 17 من محرم 1446 (23 يوليو 2024) بالترخيص لشركة «SAHARA MONITORING Sarl AU» بإنشاء واستغلال مزرعة لتربية الأحياء البحرية تسمى «Sahara Monitoring» وبشر مستخرج من الاتفاقية المتعلقة بها. \n", "\n", "<|ref|>text<|/ref|><|det|>[[120, 137, 896, 168]]<|/det|>\n", "مستخرج من اتفاقية إنشاء واستغلال مزرعة لتربية الأحياء البحرية تسمى «SaharA Monitoring» \n", "\n", "<|ref|>text<|/ref|><|det|>[[80, 170, 920, 230]]<|/det|>\n", "رقم 2003/6/GON/428 الموقعة بتاريخ 28 من جمادى الأولى 1445 (12 ديسمبر 2023) بين شركة «SAHARA Monitoring» ووزير الفلاحة والصيد البحري والتنمية القروية والمياه والغابات (المادة 9 من المرسوم رقم 2.08.562 الصادر في 13 من ذي الحجة 1429 (12 ديسمبر 2008)) \n", "\n", "<|ref|>text<|/ref|><|det|>[[187, 240, 940, 263]]<|/det|>\n", "اسم المستفيد: شركة «SAHARA MONITORING Sarl AU» الكائن مقرها برقم 27، عمارة 2، إقامة نجاح، حي السلام، أكادير. \n", "\n", "<|ref|>text<|/ref|><|det|>[[0, 0, 0, 0]]<|/det|>\n", "مدة الاتفاقية: 10 سنوات، قابلة للتجديد. \n", "\n", "<|ref|>text<|/ref|><|det|>[[0, 0, 0, 0]]<|/det|>\n", "==================================================\n", "image size: (676, 799)\n", "valid image tokens: 616\n", "output texts tokens (valid): 432\n", "compression ratio: 0.7\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 6/6 [00:00<00:00, 153450.15it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 4.PNG\n", "\n", "[11/20] Processing: 5.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[20, 0, 960, 1005]]<|/det|>\n", "
أرقام القطع
الأرضية
مراجعها
العقارية
عناوين
الملاك
المساحةالملاحظات
سأهسأ1- مشروع نزع الملكية المقيد بتاريخ 25/10/2011
(سجل: 14 عدد: 994) لقطعة مساحتها9هكتار 53ار
54 سنتيار لنزع ملكية قطعة ارضية مساحتها 9هكتار
53ار 54س تقريبا لفائدة : المكتب الوطني للماء
الصالح للشرب
2- حجز تحفظي المقيد بتاريخ 06/06/2017 (سجل:
20 عدد: 330) ضمانا لدين قدره 290000 درهم
كافة الحقوق المشاعة احمد بلغرسي بن علي
لفائدة :
- محمد كرزازي
3- مشروع نزع الملكية المقيد بتاريخ 05/07/2017
(سجل: 20 عدد: 515) لفائدة المكتب الوطني
للكهربائي والماء الصالح للشرب
- قطاع الماء - لقطعتين ارضيتين الأولى مساحتها 72ار
46س والثانية مساحتها 90ار 24س.
4- الرهن الجبري المقيد بتاريخ 14/02/2020 (سجل:
39 عدد: 258) ، ضمانا لدين مبلغه خمسة وسبعون
الف ومائتين وأربعة درهم و تسعة وأربعون سنتيم
75204.49) درهم (كافة الحقوق العائدة للمدين
ضد.
ابراهيم بلغرسي بن علي (المذكورة) (اعلاء)
لفائدة:
- ادارة الضرائب تمارة ()
5- حجز تحفظي المقيد بتاريخ 03/10/2022 (سجل:
69 عدد: 989) ضمانا لدين قدره 69773.86 درهم
كافة الحقوق المشاعة
جملة
واد
الجمعة
002465
\n", "==================================================\n", "image size: (1004, 794)\n", "valid image tokens: 802\n", "output texts tokens (valid): 573\n", "compression ratio: 0.71\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 38836.15it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 5.PNG\n", "\n", "[12/20] Processing: 5.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[20, 0, 960, 1005]]<|/det|>\n", "
أرقام القطع
الأرضية
مراجعها
العقارية
عناوين
الملاك
المساحةالملاحظات
سأهسأ1- مشروع نزع الملكية المقيد بتاريخ 25/10/2011
(سجل: 14 عدد: 994) لقطعة مساحتها9هكتار 53ار
54 سنتيار لنزع ملكية قطعة ارضية مساحتها 9هكتار
53ار 54س تقريبا لفائدة : المكتب الوطني للماء
الصالح للشرب
2- حجز تحفظي المقيد بتاريخ 06/06/2017 (سجل:
20 عدد: 330) ضمانا لدين قدره 290000 درهم
كافة الحقوق المشاعة احمد بلغرسي بن علي
لفائدة :
- محمد كرزازي
3- مشروع نزع الملكية المقيد بتاريخ 05/07/2017
(سجل: 20 عدد: 515) لفائدة المكتب الوطني
للكهربائي والماء الصالح للشرب
- قطاع الماء - لقطعتين ارضيتين الأولى مساحتها 72ار
46س والثانية مساحتها 90ار 24س.
4- الرهن الجبري المقيد بتاريخ 14/02/2020 (سجل:
39 عدد: 258) ، ضمانا لدين مبلغه خمسة وسبعون
الف ومائتين وأربعة درهم و تسعة وأربعون سنتيم
75204.49) درهم (كافة الحقوق العائدة للمدين
ضد.
ابراهيم بلغرسي بن علي (المذكورة) (اعلاء)
لفائدة:
- ادارة الضرائب تمارة ()
5- حجز تحفظي المقيد بتاريخ 03/10/2022 (سجل:
69 عدد: 989) ضمانا لدين قدره 69773.86 درهم
كافة الحقوق المشاعة
جملة
واد
الجمعة
002465
\n", "==================================================\n", "image size: (1004, 794)\n", "valid image tokens: 802\n", "output texts tokens (valid): 573\n", "compression ratio: 0.71\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 31300.78it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 5.PNG\n", "\n", "[13/20] Processing: 6.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[10, 7, 980, 990]]<|/det|>\n", "
\n", "==================================================\n", "image size: (645, 817)\n", "valid image tokens: 802\n", "output texts tokens (valid): 72\n", "compression ratio: 0.09\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 34663.67it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 6.PNG\n", "\n", "[14/20] Processing: 6.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([6, 100, 1280])\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[10, 7, 980, 990]]<|/det|>\n", "
\n", "==================================================\n", "image size: (645, 817)\n", "valid image tokens: 802\n", "output texts tokens (valid): 72\n", "compression ratio: 0.09\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 40329.85it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 6.PNG\n", "\n", "[15/20] Processing: 7.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "NO PATCHES\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[20, 13, 960, 981]]<|/det|>\n", "
الاختصاص الترابيالمهامالمفوض إليهم
..................
جهة الشرق.الخازن الجهوي بوجدة.المصطفى الزهراوي، المتصرف من الدرجة الأولى.
..................
جهة بني ملال - خنيفرة.الخازن الجهوي بيني ملال.توفيق صديقي، المتصرف من الدرجة الأولى.
............
جهة سوس - ماسة ؛
جهة كلميم - واد نون ؛
جهة الداخلة - وادي الذهب ؛
جهة العيون - الساقية الحمراء.
الخازن الجهوي بأكادير.عبد العزيز الحواتي، المتصرف من الدرجة الأولى.
............
\n", "==================================================\n", "image size: (545, 403)\n", "valid image tokens: 189\n", "output texts tokens (valid): 262\n", "compression ratio: 1.39\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 38836.15it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 7.PNG\n", "\n", "[16/20] Processing: 7.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "NO PATCHES\n", "=====================\n", "<|ref|>table<|/ref|><|det|>[[20, 13, 960, 981]]<|/det|>\n", "
الاختصاص الترابيالمهامالمفوض إليهم
..................
جهة الشرق.الخازن الجهوي بوجدة.المصطفى الزهراوي، المتصرف من الدرجة الأولى.
..................
جهة بني ملال - خنيفرة.الخازن الجهوي بيني ملال.توفيق صديقي، المتصرف من الدرجة الأولى.
............
جهة سوس - ماسة ؛
جهة كلميم - واد نون ؛
جهة الداخلة - وادي الذهب ؛
جهة العيون - الساقية الحمراء.
الخازن الجهوي بأكادير.عبد العزيز الحواتي، المتصرف من الدرجة الأولى.
............
\n", "==================================================\n", "image size: (545, 403)\n", "valid image tokens: 189\n", "output texts tokens (valid): 262\n", "compression ratio: 1.39\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 1/1 [00:00<00:00, 28532.68it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 7.PNG\n", "\n", "[17/20] Processing: 8.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[0, 0, 999, 30]]<|/det|>\n", "الذي يمر بالنقط المعرفة بإحداثيات المبير التالية: \n", "\n", "<|ref|>table<|/ref|><|det|>[[28, 45, 950, 980]]<|/det|>\n", "
498174.00=Xالنقطة 2:499577.00=Xالنقطة 1:
366022.00=Y363983.00=Y
502667.00=Xالنقطة 4:498270.00=Xالنقطة 3:
369267.00=Y367921.00=Y
502904.00=Xالنقطة 6:502678.00=Xالنقطة 5:
369161.00=Y369182.00=Y
502905.00=Xالنقطة 8:502909.00=Xالنقطة 7:
369259.00=Y369230.00=Y
505972.00=Xالنقطة 10:502997.00=Xالنقطة 9:
370790.00=Y369252.00=Y
506186.00=Xالنقطة 12:506017.00=Xالنقطة 11:
371126.00=Y370985.00=Y
507172.00=Xالنقطة 14:506450.00=Xالنقطة 13:
370671.00=Y371012.00=Y
507157.00=Xالنقطة 16:508564.75=Xالنقطة 15:
367529.00=Y367803.74=Y
505498.00=Xالنقطة 18:505420.00=Xالنقطة 17:
366918.00=Y367209.00=Y
505055.00=Xالنقطة 20:505327.00=Xالنقطة 19:
366800.00=Y366737.00=Y
505422.00=Xالنقطة 22:505612.00=Xالنقطة 21:
365816.00=Y365939.00=Y
504606.00=Xالنقطة 24:505349.00=Xالنقطة 23:
365764.00=Y366014.00=Y
504289.00=Xالنقطة 26:504159.00=Xالنقطة 25:
364738.00=Y365372.00=Y
503134.00=Xالنقطة 28:503680.00=Xالنقطة 27:
364163.00=Y364567.00=Y
501159.00=Xالنقطة 30:503011.00=Xالنقطة 29:
362639.00=Y364251.00=Y
500825.00=Xالنقطة 32:501751.00=Xالنقطة 31:
361334.00=Y361910.00=Y
500506.00=Xالنقطة 34:500080.00=Xالنقطة 33:
363775.00=Y362014.00=Y
\n", "==================================================\n", "image size: (739, 775)\n", "valid image tokens: 644\n", "output texts tokens (valid): 1079\n", "compression ratio: 1.68\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 2/2 [00:00<00:00, 71089.90it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 8.PNG\n", "\n", "[18/20] Processing: 8.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[0, 0, 999, 30]]<|/det|>\n", "الذي يمر بالنقط المعرفة بإحداثيات المبير التالية: \n", "\n", "<|ref|>table<|/ref|><|det|>[[28, 45, 950, 980]]<|/det|>\n", "
498174.00=Xالنقطة 2:499577.00=Xالنقطة 1:
366022.00=Y363983.00=Y
502667.00=Xالنقطة 4:498270.00=Xالنقطة 3:
369267.00=Y367921.00=Y
502904.00=Xالنقطة 6:502678.00=Xالنقطة 5:
369161.00=Y369182.00=Y
502905.00=Xالنقطة 8:502909.00=Xالنقطة 7:
369259.00=Y369230.00=Y
505972.00=Xالنقطة 10:502997.00=Xالنقطة 9:
370790.00=Y369252.00=Y
506186.00=Xالنقطة 12:506017.00=Xالنقطة 11:
371126.00=Y370985.00=Y
507172.00=Xالنقطة 14:506450.00=Xالنقطة 13:
370671.00=Y371012.00=Y
507157.00=Xالنقطة 16:508564.75=Xالنقطة 15:
367529.00=Y367803.74=Y
505498.00=Xالنقطة 18:505420.00=Xالنقطة 17:
366918.00=Y367209.00=Y
505055.00=Xالنقطة 20:505327.00=Xالنقطة 19:
366800.00=Y366737.00=Y
505422.00=Xالنقطة 22:505612.00=Xالنقطة 21:
365816.00=Y365939.00=Y
504606.00=Xالنقطة 24:505349.00=Xالنقطة 23:
365764.00=Y366014.00=Y
504289.00=Xالنقطة 26:504159.00=Xالنقطة 25:
364738.00=Y365372.00=Y
503134.00=Xالنقطة 28:503680.00=Xالنقطة 27:
364163.00=Y364567.00=Y
501159.00=Xالنقطة 30:503011.00=Xالنقطة 29:
362639.00=Y364251.00=Y
500825.00=Xالنقطة 32:501751.00=Xالنقطة 31:
361334.00=Y361910.00=Y
500506.00=Xالنقطة 34:500080.00=Xالنقطة 33:
363775.00=Y362014.00=Y
\n", "==================================================\n", "image size: (739, 775)\n", "valid image tokens: 644\n", "output texts tokens (valid): 1079\n", "compression ratio: 1.68\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 2/2 [00:00<00:00, 66052.03it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 8.PNG\n", "\n", "[19/20] Processing: 9.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[285, 5, 685, 40]]<|/det|>\n", "الجدول 1: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|>[[71, 45, 900, 204]]<|/det|>\n", "
مكيفات الهواء مزدوجة القناةمكيفات الهواء أحادية القناة
COP rated *EER rated*COP rated*EER rated*
1.802.402.362.40
1.622.162.122.16
\n", "\n", "<|ref|>text<|/ref|><|det|>[[907, 210, 924, 228]]<|/det|>\n", "* \n", "\n", "<|ref|>text<|/ref|><|det|>[[207, 255, 922, 287]]<|/det|>\n", "(Coefficient d'efficacité énergétique nominal): المعامل الإسمي للنجاعة الطاقية EER rated • \n", "\n", "<|ref|>text<|/ref|><|det|>[[346, 298, 922, 328]]<|/det|>\n", "(Coefficient de performance nominal): معامل الأداء الإسمي COP rated • \n", "\n", "<|ref|>text<|/ref|><|det|>[[352, 340, 844, 369]]<|/det|>\n", "(Potentiel de réchauffement planétaire): احتمالية الاحترار العالمي PRP • \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[120, 384, 800, 450]]<|/det|>\n", "الجدول 2: المستويات المتعلقة بالحد الأقصى للاستهلاك الكهربائي في حالة «إيقاف التشغيل» وحالة «السكون» لمكيفات الهواء أحادية ومزدوجة القناة \n", "\n", "<|ref|>table<|/ref|><|det|>[[60, 456, 920, 690]]<|/det|>\n", "
حالة «إيقاف التشغيل»يجب ألا يتجاوز الاستهلاك الكهربائي للجهاز في جميع الحالات الموافقة لحالة «إيقاف التشغيل» 1.00 واط.
حالة «السكون»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجد في حالة تتوفر فيها وظيفة التنشيط فقط، أو وظيفة التنشيط فقط مرتبطة بمؤشر وحيد يدل على أن وظيفة التنشيط منفعلة. 1.00 واط.
حالة «السكون» و/أو حالة «إيقاف التشغيل»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجد في حالة تتوفر فيها وظيفة عرض معلومة أو حالة، أو فقط عرض معلومة أو حالة مرتبطة بوظيفة إعادة التنشيط. 2 واط.
حالة «السكون» و/أو حالة «الإيقاف التشغيل»يكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود، مزودًا بحالة «إيقاف التشغيل» و/أو «السكون» و/أو بحالة أخرى يتم فيها، عند توصيله بالتيار الكهربائي، احترام المتطلبات المطبقة فيما يخص الاستهلاك الكهربائي في حالة «إيقاف التشغيل» و/أو «السكون».
\n", "\n", "<|ref|>text<|/ref|><|det|>[[22, 696, 950, 757]]<|/det|>\n", "2- يجب أن تحترم مكيفات الهواء، باستثناء مكيفات الهواء أحادية ومزدوجة القناة، المستويات المتعلقة بالأداء الطاقي الأدنى كما هو مشار إليها في الجدول 3 أدناه والتي يتم احتسابها وفقًا للمواصفة القياسية المغربية NM 14.2.302. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[285, 770, 685, 800]]<|/det|>\n", "الجدول 3: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|> [[100, 805, 870, 950]]<|/det|>\n", "
SCOP*
(موسم التدفئة «المتوسط»)
SEER*
3.43.6
3.063.24
\n", "==================================================\n", "image size: (749, 685)\n", "valid image tokens: 634\n", "output texts tokens (valid): 960\n", "compression ratio: 1.51\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 11/11 [00:00<00:00, 214592.30it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 9.PNG\n", "\n", "[20/20] Processing: 9.PNG\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>sub_title<|/ref|><|det|>[[285, 5, 685, 40]]<|/det|>\n", "الجدول 1: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|>[[71, 45, 900, 204]]<|/det|>\n", "
مكيفات الهواء مزدوجة القناةمكيفات الهواء أحادية القناة
COP rated *EER rated*COP rated*EER rated*
1.802.402.362.40
1.622.162.122.16
\n", "\n", "<|ref|>text<|/ref|><|det|>[[907, 210, 924, 228]]<|/det|>\n", "* \n", "\n", "<|ref|>text<|/ref|><|det|>[[207, 255, 922, 287]]<|/det|>\n", "(Coefficient d'efficacité énergétique nominal): المعامل الإسمي للنجاعة الطاقية EER rated • \n", "\n", "<|ref|>text<|/ref|><|det|>[[346, 298, 922, 328]]<|/det|>\n", "(Coefficient de performance nominal): معامل الأداء الإسمي COP rated • \n", "\n", "<|ref|>text<|/ref|><|det|>[[352, 340, 844, 369]]<|/det|>\n", "(Potentiel de réchauffement planétaire): احتمالية الاحترار العالمي PRP • \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[120, 384, 800, 450]]<|/det|>\n", "الجدول 2: المستويات المتعلقة بالحد الأقصى للاستهلاك الكهربائي في حالة «إيقاف التشغيل» وحالة «السكون» لمكيفات الهواء أحادية ومزدوجة القناة \n", "\n", "<|ref|>table<|/ref|><|det|>[[60, 456, 920, 690]]<|/det|>\n", "
حالة «إيقاف التشغيل»يجب ألا يتجاوز الاستهلاك الكهربائي للجهاز في جميع الحالات الموافقة لحالة «إيقاف التشغيل» 1.00 واط.
حالة «السكون»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجد في حالة تتوفر فيها وظيفة التنشيط فقط، أو وظيفة التنشيط فقط مرتبطة بمؤشر وحيد يدل على أن وظيفة التنشيط منفعلة. 1.00 واط.
حالة «السكون» و/أو حالة «إيقاف التشغيل»لا يتجاوز الاستهلاك الكهربائي للجهاز الذي يوجد في حالة تتوفر فيها وظيفة عرض معلومة أو حالة، أو فقط عرض معلومة أو حالة مرتبطة بوظيفة إعادة التنشيط. 2 واط.
حالة «السكون» و/أو حالة «الإيقاف التشغيل»يكون الجهاز، بقدر ما يتوافق مع الاستعمال المقصود، مزودًا بحالة «إيقاف التشغيل» و/أو «السكون» و/أو بحالة أخرى يتم فيها، عند توصيله بالتيار الكهربائي، احترام المتطلبات المطبقة فيما يخص الاستهلاك الكهربائي في حالة «إيقاف التشغيل» و/أو «السكون».
\n", "\n", "<|ref|>text<|/ref|><|det|>[[22, 696, 950, 757]]<|/det|>\n", "2- يجب أن تحترم مكيفات الهواء، باستثناء مكيفات الهواء أحادية ومزدوجة القناة، المستويات المتعلقة بالأداء الطاقي الأدنى كما هو مشار إليها في الجدول 3 أدناه والتي يتم احتسابها وفقًا للمواصفة القياسية المغربية NM 14.2.302. \n", "\n", "<|ref|>sub_title<|/ref|><|det|>[[285, 770, 685, 800]]<|/det|>\n", "الجدول 3: المستويات المتعلقة بالأداء الطاقي الأدنى \n", "\n", "<|ref|>table<|/ref|><|det|> [[100, 805, 870, 950]]<|/det|>\n", "
SCOP*
(موسم التدفئة «المتوسط»)
SEER*
3.43.6
3.063.24
\n", "==================================================\n", "image size: (749, 685)\n", "valid image tokens: 634\n", "output texts tokens (valid): 960\n", "compression ratio: 1.51\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 11/11 [00:00<00:00, 220752.84it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ✓ Completed: 9.PNG\n", "\n", "All done! Results saved to './DS_tables_output' folder.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "# Setup directories\n", "input_folder = './table_images'\n", "output_folder = './DS_tables_output'\n", "\n", "# Create output folder if it doesn't exist\n", "os.makedirs(output_folder, exist_ok=True)\n", "\n", "# Define prompt\n", "prompt = \"\\n<|grounding|>Convert the document to markdown.respect the tables layout.\"\n", "\n", "\n", "# Supported image extensions\n", "image_extensions = {'.jpg', '.jpeg', '.PNG', '.bmp', '.tiff', '.webp'}\n", "\n", "# Get all image files from images2 folder\n", "image_files = []\n", "for ext in image_extensions:\n", " image_files.extend(Path(input_folder).glob(f'*{ext}'))\n", " image_files.extend(Path(input_folder).glob(f'*{ext.upper()}'))\n", "\n", "image_files = sorted(image_files)\n", "\n", "if not image_files:\n", " print(f\"No image files found in '{input_folder}' folder!\")\n", "else:\n", " print(f\"Found {len(image_files)} images to process\\n\")\n", " \n", " # Process each image\n", " for idx, image_path in enumerate(image_files, 1):\n", " print(f\"[{idx}/{len(image_files)}] Processing: {image_path.name}\")\n", " \n", " # Create output subfolder for this image\n", " image_output_path = os.path.join(output_folder, image_path.stem)\n", " \n", " try:\n", " # Run inference\n", " res = model.infer(\n", " tokenizer, \n", " prompt=prompt, \n", " image_file=str(image_path), \n", " output_path=image_output_path, \n", " base_size=1024, \n", " image_size=640, \n", " crop_mode=True, \n", " save_results=True, \n", " test_compress=True\n", " )\n", " print(f\" ✓ Completed: {image_path.name}\\n\")\n", " \n", " except Exception as e:\n", " print(f\" ✗ Error processing {image_path.name}: {str(e)}\\n\")\n", " continue\n", " \n", " print(f\"All done! Results saved to '{output_folder}' folder.\")" ] }, { "cell_type": "markdown", "id": "f99f31fb-f0cd-4963-8cfd-a35cc54b930e", "metadata": {}, "source": [ "## Runing chandra with endpoint using vllm" ] }, { "cell_type": "code", "execution_count": 1, "id": "a6c598b9-04b7-4f04-8126-75634f37316e", "metadata": {}, "outputs": [], "source": [ "import requests\n", "import json" ] }, { "cell_type": "code", "execution_count": 2, "id": "6180dc05-f3eb-44f4-a07d-8be96a444c30", "metadata": {}, "outputs": [], "source": [ "url = \"http://gpu08:9998/v1/chat/completions\"" ] }, { "cell_type": "code", "execution_count": 1, "id": "3c2aea1e-8e44-4d15-9b10-971bcc188547", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/skiredj.abderrahman/.conda/envs/khalil_vllm/lib/python3.10/site-packages/requests/__init__.py:113: RequestsDependencyWarning: urllib3 (2.5.0) or chardet (7.4.3)/charset_normalizer (3.4.4) doesn't match a supported version!\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "============================================================\n", "EXTRACTED TEXT:\n", "============================================================\n", "

الجريدة

6402


قرار ما يلي:

المادة الأولى

تقبل لمعادلة دبلوم مهندس دولة، الشهادة التالية في : Génie civil

– Titre d'ingénieur diplôme de l'Ecole nationale supérieure Mines-Télécom Lille Douai, de l'Institut Mines-Télécom, délivré en date du 10 janvier 2024 - France.

المادة الثانية

ينشر هذا القرار بالجريدة الرسمية.

وحرر بالرباط في 19 من محرم 1446 (25 يوليو 2024).

الإمضاء: عبد اللطيف ميراوي.


قرار لوزير التعليم العالي والبحث العلمي والابتكار رقم 2061.24 الصادر في 19 من محرم 1446 (25 يوليو 2024) بتحديد بعض المعادلات بين الشهادات.


وزير التعليم العالي والبحث العلمي والابتكار،

بناءً على المرسوم رقم 2.01.333 الصادر في 28 من ربيع الأول 1422 (21 يونيو 2001) المتعلقة بتحديد الشروط والمسطرة الخاصة بمنح معادلة شهادات التعليم العالي:

وعلى المرسوم رقم 2.04.89 الصادر في 18 من ربيع الآخر 1425 (7 يونيو 2004) بتحديد اختصاص المؤسسات الجامعية وأسلاك الدراسات العليا وكذا الشهادات الوطنية المطلوبة، كما وقع تغييره وتنميته:

وعلى المرسوم رقم 2.21.838 الصادر في 14 من ربيع الأول 1443 (21 أكتوبر 2021) المتعلقة باختصاصات وزير التعليم العالي والبحث العلمي والابتكار:

وبعد استشارة اللجنة القطاعية للعلوم والتقنيات والهندسة والهندسة المعمارية المنعقدة بتاريخ 4 يوليو 2024،

قرار ما يلي:

المادة الأولى

تقبل لمعادلة دبلوم مهندس دولة، الشهادة التالية في : Informatique

– Titre d'ingénieur de télécom Nancy de l'Université de Lorraine, délivré en date du 26 octobre 2023 - France.

\n", "============================================================\n" ] } ], "source": [ "import requests\n", "import base64\n", "\n", "# Read and encode image\n", "with open(\"journal_25_right.png\", \"rb\") as f:\n", " img_base64 = base64.b64encode(f.read()).decode('utf-8')\n", "\n", "url = \"http://gpu07:9996/v1/chat/completions\" # Note: chat/completions, not completions\n", "payload = {\n", " \"model\": \"/home/skiredj.abderrahman/khalil/chandra\",\n", " \"messages\": [\n", " {\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\n", " \"url\": f\"data:image/png;base64,{img_base64}\"\n", " }\n", " },\n", " {\n", " \"type\": \"text\",\n", " \"text\": \"Extract all text from this image. Provide only the text you see, nothing else.\"\n", " }\n", " ]\n", " }\n", " ]\n", "}\n", "\n", "response = requests.post(url, json=payload)\n", "result = response.json()\n", "\n", "# Extract and print just the text content\n", "if 'choices' in result:\n", " extracted_text = result['choices'][0]['message']['content']\n", " print(\"=\" * 60)\n", " print(\"EXTRACTED TEXT:\")\n", " print(\"=\" * 60)\n", " print(extracted_text)\n", " print(\"=\" * 60)\n", "else:\n", " print(\"Full response:\")\n", " print(json.dumps(result, indent=2))" ] }, { "cell_type": "markdown", "id": "b6e2301f-4b00-4e0a-9b46-087945397906", "metadata": {}, "source": [ "## testing fast api" ] }, { "cell_type": "code", "execution_count": 1, "id": "0e857bee-9683-4246-91b5-a9cd9faea4b1", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] } ], "source": [ "from fastapi import FastAPI, UploadFile, File, HTTPException\n", "from transformers import AutoModel, AutoTokenizer\n", "import torch\n", "from PIL import Image\n", "from io import BytesIO\n", "import tempfile\n", "import uvicorn" ] }, { "cell_type": "code", "execution_count": 3, "id": "55182e8a-822a-4f5b-a049-ed79c162d4e5", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "You are using a model of type deepseek_vl_v2 to instantiate a model of type DeepseekOCR. This is not supported for all configurations of models and can yield errors.\n", "You are attempting to use Flash Attention 2.0 without specifying a torch dtype. This might lead to unexpected behaviour\n", "You are attempting to use Flash Attention 2.0 with a model not initialized on GPU. Make sure to move the model to GPU after initializing it on CPU with `model.to('cuda')`.\n", "Some weights of DeepseekOCRForCausalLM were not initialized from the model checkpoint at /home/skiredj.abderrahman/khalil/DeepSeek-OCR and are newly initialized: ['model.vision_model.embeddings.position_ids']\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" ] }, { "ename": "RuntimeError", "evalue": "asyncio.run() cannot be called from a running event loop", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mRuntimeError\u001b[39m Traceback (most recent call last)", "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[3]\u001b[39m\u001b[32m, line 53\u001b[39m\n\u001b[32m 50\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m HTTPException(status_code=\u001b[32m500\u001b[39m, detail=\u001b[38;5;28mstr\u001b[39m(e))\n\u001b[32m 52\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[34m__name__\u001b[39m == \u001b[33m\"\u001b[39m\u001b[33m__main__\u001b[39m\u001b[33m\"\u001b[39m:\n\u001b[32m---> \u001b[39m\u001b[32m53\u001b[39m \u001b[43muvicorn\u001b[49m\u001b[43m.\u001b[49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[43mapp\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhost\u001b[49m\u001b[43m=\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43m0.0.0.0\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mport\u001b[49m\u001b[43m=\u001b[49m\u001b[32;43m8000\u001b[39;49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.local/lib/python3.12/site-packages/uvicorn/main.py:580\u001b[39m, in \u001b[36mrun\u001b[39m\u001b[34m(app, host, port, uds, fd, loop, http, ws, ws_max_size, ws_max_queue, ws_ping_interval, ws_ping_timeout, ws_per_message_deflate, lifespan, interface, reload, reload_dirs, reload_includes, reload_excludes, reload_delay, workers, env_file, log_config, log_level, access_log, proxy_headers, server_header, date_header, forwarded_allow_ips, root_path, limit_concurrency, backlog, limit_max_requests, timeout_keep_alive, timeout_graceful_shutdown, ssl_keyfile, ssl_certfile, ssl_keyfile_password, ssl_version, ssl_cert_reqs, ssl_ca_certs, ssl_ciphers, headers, use_colors, app_dir, factory, h11_max_incomplete_event_size)\u001b[39m\n\u001b[32m 578\u001b[39m Multiprocess(config, target=server.run, sockets=[sock]).run()\n\u001b[32m 579\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m--> \u001b[39m\u001b[32m580\u001b[39m \u001b[43mserver\u001b[49m\u001b[43m.\u001b[49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 581\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyboardInterrupt\u001b[39;00m:\n\u001b[32m 582\u001b[39m \u001b[38;5;28;01mpass\u001b[39;00m \u001b[38;5;66;03m# pragma: full coverage\u001b[39;00m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.local/lib/python3.12/site-packages/uvicorn/server.py:67\u001b[39m, in \u001b[36mServer.run\u001b[39m\u001b[34m(self, sockets)\u001b[39m\n\u001b[32m 65\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mrun\u001b[39m(\u001b[38;5;28mself\u001b[39m, sockets: \u001b[38;5;28mlist\u001b[39m[socket.socket] | \u001b[38;5;28;01mNone\u001b[39;00m = \u001b[38;5;28;01mNone\u001b[39;00m) -> \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 66\u001b[39m \u001b[38;5;28mself\u001b[39m.config.setup_event_loop()\n\u001b[32m---> \u001b[39m\u001b[32m67\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43masyncio\u001b[49m\u001b[43m.\u001b[49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mserve\u001b[49m\u001b[43m(\u001b[49m\u001b[43msockets\u001b[49m\u001b[43m=\u001b[49m\u001b[43msockets\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/asyncio/runners.py:191\u001b[39m, in \u001b[36mrun\u001b[39m\u001b[34m(main, debug, loop_factory)\u001b[39m\n\u001b[32m 161\u001b[39m \u001b[38;5;250m\u001b[39m\u001b[33;03m\"\"\"Execute the coroutine and return the result.\u001b[39;00m\n\u001b[32m 162\u001b[39m \n\u001b[32m 163\u001b[39m \u001b[33;03mThis function runs the passed coroutine, taking care of\u001b[39;00m\n\u001b[32m (...)\u001b[39m\u001b[32m 187\u001b[39m \u001b[33;03m asyncio.run(main())\u001b[39;00m\n\u001b[32m 188\u001b[39m \u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 189\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m events._get_running_loop() \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 190\u001b[39m \u001b[38;5;66;03m# fail fast with short traceback\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m191\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[32m 192\u001b[39m \u001b[33m\"\u001b[39m\u001b[33masyncio.run() cannot be called from a running event loop\u001b[39m\u001b[33m\"\u001b[39m)\n\u001b[32m 194\u001b[39m \u001b[38;5;28;01mwith\u001b[39;00m Runner(debug=debug, loop_factory=loop_factory) \u001b[38;5;28;01mas\u001b[39;00m runner:\n\u001b[32m 195\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m runner.run(main)\n", "\u001b[31mRuntimeError\u001b[39m: asyncio.run() cannot be called from a running event loop" ] } ], "source": [ "from fastapi import FastAPI, UploadFile, File, HTTPException\n", "from transformers import AutoModel, AutoTokenizer\n", "import torch\n", "from PIL import Image\n", "from io import BytesIO\n", "import tempfile\n", "import uvicorn\n", "\n", "app = FastAPI()\n", "model_name = \"/home/skiredj.abderrahman/khalil/DeepSeek-OCR\"\n", "\n", "# Load once at startup\n", "try:\n", " tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n", " model = AutoModel.from_pretrained(\n", " model_name,\n", " _attn_implementation=\"flash_attention_2\",\n", " trust_remote_code=True,\n", " use_safetensors=True,\n", " )\n", " if torch.cuda.is_available():\n", " model = model.eval().cuda().to(torch.bfloat16)\n", " else:\n", " model = model.eval()\n", "except Exception as e:\n", " raise RuntimeError(f\"Model load failed: {e}\")\n", "\n", "@app.post(\"/ocr\")\n", "async def ocr(image: UploadFile = File(...)):\n", " try:\n", " content = await image.read()\n", " img = Image.open(BytesIO(content)).convert(\"RGB\")\n", " # Write to a temp file because model.infer expects a path\n", " with tempfile.NamedTemporaryFile(suffix=\".png\", delete=True) as tmp:\n", " img.save(tmp.name)\n", " res = model.infer(\n", " tokenizer,\n", " prompt=\"n<|grounding|>Convert the document to markdown.\",\n", " image_file=tmp.name,\n", " output_path=\"out\",\n", " base_size=1024,\n", " image_size=640,\n", " crop_mode=True,\n", " save_results=False,\n", " test_compress=False,\n", " )\n", " text = res.get(\"text\", \"\")\n", " return {\"text\": text}\n", " except Exception as e:\n", " raise HTTPException(status_code=500, detail=str(e))\n", "\n", "if __name__ == \"__main__\":\n", " uvicorn.run(app, host=\"0.0.0.0\", port=8000)" ] }, { "cell_type": "code", "execution_count": 10, "id": "1fce48ef-8f8e-45f3-8810-adafcfd1030e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "HTTP error: 500 Server Error: Internal Server Error for url: http://gpu01:8000/ocr\n", "HTTP error: 500 Server Error: Internal Server Error for url: http://gpu01:8000/ocr\n", "HTTP error: 500 Server Error: Internal Server Error for url: http://gpu01:8000/ocr\n" ] } ], "source": [ "import os\n", "import time\n", "import requests\n", "\n", "url = os.getenv(\"OCR_URL\", \"http://gpu01:8000/ocr\")\n", "file_path = \"journal_25_right.png\"\n", "\n", "session = requests.Session()\n", "session.headers.update({\"Accept\": \"application/json\"})\n", "\n", "for attempt in range(3):\n", " try:\n", " with open(file_path, \"rb\") as f:\n", " files = {\"image\": (os.path.basename(file_path), f, \"image/png\")}\n", " resp = session.post(url, files=files, timeout=60)\n", " resp.raise_for_status()\n", " print(\"Extracted text (truncated):n\", resp.json()[\"text\"][:400])\n", " break\n", " except requests.HTTPError as e:\n", " print(\"HTTP error:\", e)\n", " if resp.status_code in (401, 403):\n", " print(\"Check auth headers or tokens if you added security.\")\n", " time.sleep(2)\n", " except requests.RequestException as e:\n", " print(\"Network error:\", e)\n", " time.sleep(2)" ] }, { "cell_type": "code", "execution_count": 5, "id": "4d27fb7e-8291-4434-864f-60bc10448206", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Fri Nov 7 00:03:40 2025 \n", "+-----------------------------------------------------------------------------------------+\n", "| NVIDIA-SMI 550.54.14 Driver Version: 550.54.14 CUDA Version: 12.4 |\n", "|-----------------------------------------+------------------------+----------------------+\n", "| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\n", "| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n", "| | | MIG M. |\n", "|=========================================+========================+======================|\n", "| 0 NVIDIA L40S Off | 00000000:01:00.0 Off | 0 |\n", "| N/A 34C P0 81W / 350W | 14922MiB / 46068MiB | 0% Default |\n", "| | | N/A |\n", "+-----------------------------------------+------------------------+----------------------+\n", " \n", "+-----------------------------------------------------------------------------------------+\n", "| Processes: |\n", "| GPU GI CI PID Type Process name GPU Memory |\n", "| ID ID Usage |\n", "|=========================================================================================|\n", "| 0 N/A N/A 30058 C python 14916MiB |\n", "+-----------------------------------------------------------------------------------------+\n", "Connection to gpu01 closed.\n" ] } ], "source": [ "!ssh -t gpu01 'nvidia-smi'" ] }, { "cell_type": "code", "execution_count": 13, "id": "c20f2c09-5ee7-43ce-8a2e-ab7af7ed0433", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Status: 500\n", "Error: {\"detail\":\"Model returned None and no output file found\"}\n" ] } ], "source": [ "import requests\n", "\n", "url = \"http://gpu01:8000/ocr\"\n", "file_path = \"journal_25_right.png\"\n", "\n", "with open(file_path, \"rb\") as f:\n", " files = {\"image\": (\"journal_25_right.png\", f, \"image/png\")}\n", " resp = requests.post(url, files=files, timeout=120)\n", "\n", "print(f\"Status: {resp.status_code}\")\n", "if resp.status_code == 200:\n", " result = resp.json()\n", " print(f\"Text: {result['text'][:500]}\")\n", "else:\n", " print(f\"Error: {resp.text}\")" ] }, { "cell_type": "markdown", "id": "7295ad54-e327-4c96-a1b3-e04739f77225", "metadata": {}, "source": [ "# docling" ] }, { "cell_type": "code", "execution_count": 1, "id": "acf2da94-06bd-4b6e-aefe-a7d2ddee792c", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/skiredj.abderrahman/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] } ], "source": [ "from docling.document_converter import DocumentConverter, PdfFormatOption\n", "from docling.datamodel.pipeline_options import PdfPipelineOptions, EasyOcrOptions\n", "from docling.datamodel.base_models import InputFormat" ] }, { "cell_type": "code", "execution_count": 2, "id": "65368580-134d-4409-920d-779f6f4d0b44", "metadata": {}, "outputs": [], "source": [ "# Configure EasyOCR\n", "pipeline_options = PdfPipelineOptions()\n", "pipeline_options.do_ocr = True\n", "pipeline_options.ocr_options = EasyOcrOptions(\n", " force_full_page_ocr=True,\n", " lang=[\"ar\"] # Specify languages\n", ")" ] }, { "cell_type": "code", "execution_count": 3, "id": "c2ff4eba-7dd3-4e8a-8fee-889785a0c150", "metadata": {}, "outputs": [], "source": [ "# Create converter with format options\n", "converter = DocumentConverter(\n", " format_options={\n", " InputFormat.PDF: PdfFormatOption(\n", " pipeline_options=pipeline_options\n", " )\n", " }\n", ")\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "903d54be-4dbc-45f4-8b8f-9bc89e1afce3", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2025-11-11 23:57:31,153 - INFO - detected formats: []\n", "2025-11-11 23:57:31,259 - INFO - Going to convert document batch...\n", "2025-11-11 23:57:31,259 - INFO - Initializing pipeline for StandardPdfPipeline with options hash 0453dff625a004bf38221845183f7c18\n", "2025-11-11 23:57:31,284 - INFO - Loading plugin 'docling_defaults'\n", "2025-11-11 23:57:31,288 - INFO - Registered picture descriptions: ['vlm', 'api']\n", "2025-11-11 23:57:31,300 - INFO - Loading plugin 'docling_defaults'\n", "2025-11-11 23:57:31,309 - INFO - Registered ocr engines: ['auto', 'easyocr', 'ocrmac', 'rapidocr', 'tesserocr', 'tesseract']\n", "2025-11-11 23:57:32,152 - INFO - Accelerator device: 'cuda:0'\n", "2025-11-11 23:57:32,158 - WARNING - Downloading detection model, please wait. This may take several minutes depending upon your network connection.\n" ] }, { "ename": "URLError", "evalue": "", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mgaierror\u001b[39m Traceback (most recent call last)", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/urllib/request.py:1344\u001b[39m, in \u001b[36mAbstractHTTPHandler.do_open\u001b[39m\u001b[34m(self, http_class, req, **http_conn_args)\u001b[39m\n\u001b[32m 1343\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m-> \u001b[39m\u001b[32m1344\u001b[39m \u001b[43mh\u001b[49m\u001b[43m.\u001b[49m\u001b[43mrequest\u001b[49m\u001b[43m(\u001b[49m\u001b[43mreq\u001b[49m\u001b[43m.\u001b[49m\u001b[43mget_method\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mreq\u001b[49m\u001b[43m.\u001b[49m\u001b[43mselector\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mreq\u001b[49m\u001b[43m.\u001b[49m\u001b[43mdata\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mheaders\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1345\u001b[39m \u001b[43m \u001b[49m\u001b[43mencode_chunked\u001b[49m\u001b[43m=\u001b[49m\u001b[43mreq\u001b[49m\u001b[43m.\u001b[49m\u001b[43mhas_header\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[33;43mTransfer-encoding\u001b[39;49m\u001b[33;43m'\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1346\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mOSError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err: \u001b[38;5;66;03m# timeout error\u001b[39;00m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/http/client.py:1338\u001b[39m, in \u001b[36mHTTPConnection.request\u001b[39m\u001b[34m(self, method, url, body, headers, encode_chunked)\u001b[39m\n\u001b[32m 1337\u001b[39m \u001b[38;5;250m\u001b[39m\u001b[33;03m\"\"\"Send a complete request to the server.\"\"\"\u001b[39;00m\n\u001b[32m-> \u001b[39m\u001b[32m1338\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_send_request\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmethod\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbody\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mheaders\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mencode_chunked\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/http/client.py:1384\u001b[39m, in \u001b[36mHTTPConnection._send_request\u001b[39m\u001b[34m(self, method, url, body, headers, encode_chunked)\u001b[39m\n\u001b[32m 1383\u001b[39m body = _encode(body, \u001b[33m'\u001b[39m\u001b[33mbody\u001b[39m\u001b[33m'\u001b[39m)\n\u001b[32m-> \u001b[39m\u001b[32m1384\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mendheaders\u001b[49m\u001b[43m(\u001b[49m\u001b[43mbody\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mencode_chunked\u001b[49m\u001b[43m=\u001b[49m\u001b[43mencode_chunked\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/http/client.py:1333\u001b[39m, in \u001b[36mHTTPConnection.endheaders\u001b[39m\u001b[34m(self, message_body, encode_chunked)\u001b[39m\n\u001b[32m 1332\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m CannotSendHeader()\n\u001b[32m-> \u001b[39m\u001b[32m1333\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_send_output\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmessage_body\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mencode_chunked\u001b[49m\u001b[43m=\u001b[49m\u001b[43mencode_chunked\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/http/client.py:1093\u001b[39m, in \u001b[36mHTTPConnection._send_output\u001b[39m\u001b[34m(self, message_body, encode_chunked)\u001b[39m\n\u001b[32m 1092\u001b[39m \u001b[38;5;28;01mdel\u001b[39;00m \u001b[38;5;28mself\u001b[39m._buffer[:]\n\u001b[32m-> \u001b[39m\u001b[32m1093\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43msend\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmsg\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1095\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m message_body \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 1096\u001b[39m \n\u001b[32m 1097\u001b[39m \u001b[38;5;66;03m# create a consistent interface to message_body\u001b[39;00m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/http/client.py:1037\u001b[39m, in \u001b[36mHTTPConnection.send\u001b[39m\u001b[34m(self, data)\u001b[39m\n\u001b[32m 1036\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m.auto_open:\n\u001b[32m-> \u001b[39m\u001b[32m1037\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mconnect\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1038\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/http/client.py:1472\u001b[39m, in \u001b[36mHTTPSConnection.connect\u001b[39m\u001b[34m(self)\u001b[39m\n\u001b[32m 1470\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mConnect to a host on a given (SSL) port.\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m-> \u001b[39m\u001b[32m1472\u001b[39m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m.\u001b[49m\u001b[43mconnect\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1474\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m._tunnel_host:\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/http/client.py:1003\u001b[39m, in \u001b[36mHTTPConnection.connect\u001b[39m\u001b[34m(self)\u001b[39m\n\u001b[32m 1002\u001b[39m sys.audit(\u001b[33m\"\u001b[39m\u001b[33mhttp.client.connect\u001b[39m\u001b[33m\"\u001b[39m, \u001b[38;5;28mself\u001b[39m, \u001b[38;5;28mself\u001b[39m.host, \u001b[38;5;28mself\u001b[39m.port)\n\u001b[32m-> \u001b[39m\u001b[32m1003\u001b[39m \u001b[38;5;28mself\u001b[39m.sock = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_create_connection\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 1004\u001b[39m \u001b[43m \u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mhost\u001b[49m\u001b[43m,\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mport\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43msource_address\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1005\u001b[39m \u001b[38;5;66;03m# Might fail in OSs that don't implement TCP_NODELAY\u001b[39;00m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/socket.py:841\u001b[39m, in \u001b[36mcreate_connection\u001b[39m\u001b[34m(address, timeout, source_address, all_errors)\u001b[39m\n\u001b[32m 840\u001b[39m exceptions = []\n\u001b[32m--> \u001b[39m\u001b[32m841\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m res \u001b[38;5;129;01min\u001b[39;00m \u001b[43mgetaddrinfo\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhost\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mport\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[32;43m0\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mSOCK_STREAM\u001b[49m\u001b[43m)\u001b[49m:\n\u001b[32m 842\u001b[39m af, socktype, proto, canonname, sa = res\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/socket.py:978\u001b[39m, in \u001b[36mgetaddrinfo\u001b[39m\u001b[34m(host, port, family, type, proto, flags)\u001b[39m\n\u001b[32m 977\u001b[39m addrlist = []\n\u001b[32m--> \u001b[39m\u001b[32m978\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m res \u001b[38;5;129;01min\u001b[39;00m \u001b[43m_socket\u001b[49m\u001b[43m.\u001b[49m\u001b[43mgetaddrinfo\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhost\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mport\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfamily\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mtype\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mproto\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mflags\u001b[49m\u001b[43m)\u001b[49m:\n\u001b[32m 979\u001b[39m af, socktype, proto, canonname, sa = res\n", "\u001b[31mgaierror\u001b[39m: [Errno -2] Name or service not known", "\nDuring handling of the above exception, another exception occurred:\n", "\u001b[31mURLError\u001b[39m Traceback (most recent call last)", "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[4]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# Convert your PNG image\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m result = \u001b[43mconverter\u001b[49m\u001b[43m.\u001b[49m\u001b[43mconvert\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43m./table.pdf\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[32m 4\u001b[39m \u001b[38;5;66;03m# Get the output\u001b[39;00m\n\u001b[32m 5\u001b[39m markdown_text = result.document.export_to_markdown()\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py:39\u001b[39m, in \u001b[36mupdate_wrapper_attributes..wrapper_function\u001b[39m\u001b[34m(*args, **kwargs)\u001b[39m\n\u001b[32m 37\u001b[39m \u001b[38;5;129m@functools\u001b[39m.wraps(wrapped)\n\u001b[32m 38\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mwrapper_function\u001b[39m(*args, **kwargs):\n\u001b[32m---> \u001b[39m\u001b[32m39\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mwrapper\u001b[49m\u001b[43m(\u001b[49m\u001b[43m*\u001b[49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py:136\u001b[39m, in \u001b[36mValidateCallWrapper.__call__\u001b[39m\u001b[34m(self, *args, **kwargs)\u001b[39m\n\u001b[32m 133\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m.__pydantic_complete__:\n\u001b[32m 134\u001b[39m \u001b[38;5;28mself\u001b[39m._create_validators()\n\u001b[32m--> \u001b[39m\u001b[32m136\u001b[39m res = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m__pydantic_validator__\u001b[49m\u001b[43m.\u001b[49m\u001b[43mvalidate_python\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpydantic_core\u001b[49m\u001b[43m.\u001b[49m\u001b[43mArgsKwargs\u001b[49m\u001b[43m(\u001b[49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 137\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m.__return_pydantic_validator__:\n\u001b[32m 138\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m.__return_pydantic_validator__(res)\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/document_converter.py:237\u001b[39m, in \u001b[36mDocumentConverter.convert\u001b[39m\u001b[34m(self, source, headers, raises_on_error, max_num_pages, max_file_size, page_range)\u001b[39m\n\u001b[32m 219\u001b[39m \u001b[38;5;129m@validate_call\u001b[39m(config=ConfigDict(strict=\u001b[38;5;28;01mTrue\u001b[39;00m))\n\u001b[32m 220\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mconvert\u001b[39m(\n\u001b[32m 221\u001b[39m \u001b[38;5;28mself\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 227\u001b[39m page_range: PageRange = DEFAULT_PAGE_RANGE,\n\u001b[32m 228\u001b[39m ) -> ConversionResult:\n\u001b[32m 229\u001b[39m all_res = \u001b[38;5;28mself\u001b[39m.convert_all(\n\u001b[32m 230\u001b[39m source=[source],\n\u001b[32m 231\u001b[39m raises_on_error=raises_on_error,\n\u001b[32m (...)\u001b[39m\u001b[32m 235\u001b[39m page_range=page_range,\n\u001b[32m 236\u001b[39m )\n\u001b[32m--> \u001b[39m\u001b[32m237\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mnext\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mall_res\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/document_converter.py:260\u001b[39m, in \u001b[36mDocumentConverter.convert_all\u001b[39m\u001b[34m(self, source, headers, raises_on_error, max_num_pages, max_file_size, page_range)\u001b[39m\n\u001b[32m 257\u001b[39m conv_res_iter = \u001b[38;5;28mself\u001b[39m._convert(conv_input, raises_on_error=raises_on_error)\n\u001b[32m 259\u001b[39m had_result = \u001b[38;5;28;01mFalse\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m260\u001b[39m \u001b[43m\u001b[49m\u001b[38;5;28;43;01mfor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mconv_res\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mconv_res_iter\u001b[49m\u001b[43m:\u001b[49m\n\u001b[32m 261\u001b[39m \u001b[43m \u001b[49m\u001b[43mhad_result\u001b[49m\u001b[43m \u001b[49m\u001b[43m=\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\n\u001b[32m 262\u001b[39m \u001b[43m \u001b[49m\u001b[38;5;28;43;01mif\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mraises_on_error\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mand\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mconv_res\u001b[49m\u001b[43m.\u001b[49m\u001b[43mstatus\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mnot\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43m{\u001b[49m\n\u001b[32m 263\u001b[39m \u001b[43m \u001b[49m\u001b[43mConversionStatus\u001b[49m\u001b[43m.\u001b[49m\u001b[43mSUCCESS\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 264\u001b[39m \u001b[43m \u001b[49m\u001b[43mConversionStatus\u001b[49m\u001b[43m.\u001b[49m\u001b[43mPARTIAL_SUCCESS\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 265\u001b[39m \u001b[43m \u001b[49m\u001b[43m}\u001b[49m\u001b[43m:\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/document_converter.py:332\u001b[39m, in \u001b[36mDocumentConverter._convert\u001b[39m\u001b[34m(self, conv_input, raises_on_error)\u001b[39m\n\u001b[32m 330\u001b[39m \u001b[38;5;28;01myield\u001b[39;00m item\n\u001b[32m 331\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m--> \u001b[39m\u001b[32m332\u001b[39m \u001b[43m \u001b[49m\u001b[38;5;28;43;01mfor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mitem\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43mmap\u001b[39;49m\u001b[43m(\u001b[49m\n\u001b[32m 333\u001b[39m \u001b[43m \u001b[49m\u001b[43mprocess_func\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 334\u001b[39m \u001b[43m \u001b[49m\u001b[43minput_batch\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 335\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m:\u001b[49m\n\u001b[32m 336\u001b[39m \u001b[43m \u001b[49m\u001b[43melapsed\u001b[49m\u001b[43m \u001b[49m\u001b[43m=\u001b[49m\u001b[43m \u001b[49m\u001b[43mtime\u001b[49m\u001b[43m.\u001b[49m\u001b[43mmonotonic\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m \u001b[49m\u001b[43m-\u001b[49m\u001b[43m \u001b[49m\u001b[43mstart_time\u001b[49m\n\u001b[32m 337\u001b[39m \u001b[43m \u001b[49m\u001b[43mstart_time\u001b[49m\u001b[43m \u001b[49m\u001b[43m=\u001b[49m\u001b[43m \u001b[49m\u001b[43mtime\u001b[49m\u001b[43m.\u001b[49m\u001b[43mmonotonic\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/document_converter.py:379\u001b[39m, in \u001b[36mDocumentConverter._process_document\u001b[39m\u001b[34m(self, in_doc, raises_on_error)\u001b[39m\n\u001b[32m 375\u001b[39m valid = (\n\u001b[32m 376\u001b[39m \u001b[38;5;28mself\u001b[39m.allowed_formats \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m in_doc.format \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m.allowed_formats\n\u001b[32m 377\u001b[39m )\n\u001b[32m 378\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m valid:\n\u001b[32m--> \u001b[39m\u001b[32m379\u001b[39m conv_res = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_execute_pipeline\u001b[49m\u001b[43m(\u001b[49m\u001b[43min_doc\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mraises_on_error\u001b[49m\u001b[43m=\u001b[49m\u001b[43mraises_on_error\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 380\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 381\u001b[39m error_message = \u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33mFile format not allowed: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00min_doc.file\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m\"\u001b[39m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/document_converter.py:400\u001b[39m, in \u001b[36mDocumentConverter._execute_pipeline\u001b[39m\u001b[34m(self, in_doc, raises_on_error)\u001b[39m\n\u001b[32m 396\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34m_execute_pipeline\u001b[39m(\n\u001b[32m 397\u001b[39m \u001b[38;5;28mself\u001b[39m, in_doc: InputDocument, raises_on_error: \u001b[38;5;28mbool\u001b[39m\n\u001b[32m 398\u001b[39m ) -> ConversionResult:\n\u001b[32m 399\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m in_doc.valid:\n\u001b[32m--> \u001b[39m\u001b[32m400\u001b[39m pipeline = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_get_pipeline\u001b[49m\u001b[43m(\u001b[49m\u001b[43min_doc\u001b[49m\u001b[43m.\u001b[49m\u001b[43mformat\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 401\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m pipeline \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 402\u001b[39m conv_res = pipeline.execute(in_doc, raises_on_error=raises_on_error)\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/document_converter.py:362\u001b[39m, in \u001b[36mDocumentConverter._get_pipeline\u001b[39m\u001b[34m(self, doc_format)\u001b[39m\n\u001b[32m 358\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m cache_key \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m.initialized_pipelines:\n\u001b[32m 359\u001b[39m _log.info(\n\u001b[32m 360\u001b[39m \u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33mInitializing pipeline for \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mpipeline_class.\u001b[34m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m with options hash \u001b[39m\u001b[38;5;132;01m{\u001b[39;00moptions_hash\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m\"\u001b[39m\n\u001b[32m 361\u001b[39m )\n\u001b[32m--> \u001b[39m\u001b[32m362\u001b[39m \u001b[38;5;28mself\u001b[39m.initialized_pipelines[cache_key] = \u001b[43mpipeline_class\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 363\u001b[39m \u001b[43m \u001b[49m\u001b[43mpipeline_options\u001b[49m\u001b[43m=\u001b[49m\u001b[43mpipeline_options\u001b[49m\n\u001b[32m 364\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 365\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 366\u001b[39m _log.debug(\n\u001b[32m 367\u001b[39m \u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33mReusing cached pipeline for \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mpipeline_class.\u001b[34m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m with options hash \u001b[39m\u001b[38;5;132;01m{\u001b[39;00moptions_hash\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m\"\u001b[39m\n\u001b[32m 368\u001b[39m )\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/pipeline/standard_pdf_pipeline.py:380\u001b[39m, in \u001b[36mStandardPdfPipeline.__init__\u001b[39m\u001b[34m(self, pipeline_options)\u001b[39m\n\u001b[32m 377\u001b[39m \u001b[38;5;28mself\u001b[39m._run_seq = itertools.count(\u001b[32m1\u001b[39m) \u001b[38;5;66;03m# deterministic, monotonic run ids\u001b[39;00m\n\u001b[32m 379\u001b[39m \u001b[38;5;66;03m# initialise heavy models once\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m380\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_init_models\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/pipeline/standard_pdf_pipeline.py:398\u001b[39m, in \u001b[36mStandardPdfPipeline._init_models\u001b[39m\u001b[34m(self)\u001b[39m\n\u001b[32m 388\u001b[39m \u001b[38;5;28mself\u001b[39m.keep_images = (\n\u001b[32m 389\u001b[39m \u001b[38;5;28mself\u001b[39m.pipeline_options.generate_page_images\n\u001b[32m 390\u001b[39m \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m.pipeline_options.generate_picture_images\n\u001b[32m 391\u001b[39m \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m.pipeline_options.generate_table_images\n\u001b[32m 392\u001b[39m )\n\u001b[32m 393\u001b[39m \u001b[38;5;28mself\u001b[39m.preprocessing_model = PagePreprocessingModel(\n\u001b[32m 394\u001b[39m options=PagePreprocessingOptions(\n\u001b[32m 395\u001b[39m images_scale=\u001b[38;5;28mself\u001b[39m.pipeline_options.images_scale\n\u001b[32m 396\u001b[39m )\n\u001b[32m 397\u001b[39m )\n\u001b[32m--> \u001b[39m\u001b[32m398\u001b[39m \u001b[38;5;28mself\u001b[39m.ocr_model = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_make_ocr_model\u001b[49m\u001b[43m(\u001b[49m\u001b[43mart_path\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 399\u001b[39m \u001b[38;5;28mself\u001b[39m.layout_model = LayoutModel(\n\u001b[32m 400\u001b[39m artifacts_path=art_path,\n\u001b[32m 401\u001b[39m accelerator_options=\u001b[38;5;28mself\u001b[39m.pipeline_options.accelerator_options,\n\u001b[32m 402\u001b[39m options=\u001b[38;5;28mself\u001b[39m.pipeline_options.layout_options,\n\u001b[32m 403\u001b[39m )\n\u001b[32m 404\u001b[39m \u001b[38;5;28mself\u001b[39m.table_model = TableStructureModel(\n\u001b[32m 405\u001b[39m enabled=\u001b[38;5;28mself\u001b[39m.pipeline_options.do_table_structure,\n\u001b[32m 406\u001b[39m artifacts_path=art_path,\n\u001b[32m 407\u001b[39m options=\u001b[38;5;28mself\u001b[39m.pipeline_options.table_structure_options,\n\u001b[32m 408\u001b[39m accelerator_options=\u001b[38;5;28mself\u001b[39m.pipeline_options.accelerator_options,\n\u001b[32m 409\u001b[39m )\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/pipeline/standard_pdf_pipeline.py:443\u001b[39m, in \u001b[36mStandardPdfPipeline._make_ocr_model\u001b[39m\u001b[34m(self, art_path)\u001b[39m\n\u001b[32m 439\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34m_make_ocr_model\u001b[39m(\u001b[38;5;28mself\u001b[39m, art_path: Optional[Path]) -> Any:\n\u001b[32m 440\u001b[39m factory = get_ocr_factory(\n\u001b[32m 441\u001b[39m allow_external_plugins=\u001b[38;5;28mself\u001b[39m.pipeline_options.allow_external_plugins\n\u001b[32m 442\u001b[39m )\n\u001b[32m--> \u001b[39m\u001b[32m443\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfactory\u001b[49m\u001b[43m.\u001b[49m\u001b[43mcreate_instance\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 444\u001b[39m \u001b[43m \u001b[49m\u001b[43moptions\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mpipeline_options\u001b[49m\u001b[43m.\u001b[49m\u001b[43mocr_options\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 445\u001b[39m \u001b[43m \u001b[49m\u001b[43menabled\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mpipeline_options\u001b[49m\u001b[43m.\u001b[49m\u001b[43mdo_ocr\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 446\u001b[39m \u001b[43m \u001b[49m\u001b[43martifacts_path\u001b[49m\u001b[43m=\u001b[49m\u001b[43mart_path\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 447\u001b[39m \u001b[43m \u001b[49m\u001b[43maccelerator_options\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mpipeline_options\u001b[49m\u001b[43m.\u001b[49m\u001b[43maccelerator_options\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 448\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/models/factories/base_factory.py:57\u001b[39m, in \u001b[36mBaseFactory.create_instance\u001b[39m\u001b[34m(self, options, **kwargs)\u001b[39m\n\u001b[32m 55\u001b[39m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[32m 56\u001b[39m _cls = \u001b[38;5;28mself\u001b[39m._classes[\u001b[38;5;28mtype\u001b[39m(options)]\n\u001b[32m---> \u001b[39m\u001b[32m57\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_cls\u001b[49m\u001b[43m(\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m=\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 58\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m:\n\u001b[32m 59\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\u001b[38;5;28mself\u001b[39m._err_msg_on_class_not_found(options.kind))\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/docling/models/easyocr_model.py:84\u001b[39m, in \u001b[36mEasyOcrModel.__init__\u001b[39m\u001b[34m(self, enabled, artifacts_path, options, accelerator_options)\u001b[39m\n\u001b[32m 82\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m.options.suppress_mps_warnings:\n\u001b[32m 83\u001b[39m warnings.filterwarnings(\u001b[33m\"\u001b[39m\u001b[33mignore\u001b[39m\u001b[33m\"\u001b[39m, message=\u001b[33m\"\u001b[39m\u001b[33m.*pin_memory.*MPS.*\u001b[39m\u001b[33m\"\u001b[39m)\n\u001b[32m---> \u001b[39m\u001b[32m84\u001b[39m \u001b[38;5;28mself\u001b[39m.reader = \u001b[43measyocr\u001b[49m\u001b[43m.\u001b[49m\u001b[43mReader\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 85\u001b[39m \u001b[43m \u001b[49m\u001b[43mlang_list\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mlang\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 86\u001b[39m \u001b[43m \u001b[49m\u001b[43mgpu\u001b[49m\u001b[43m=\u001b[49m\u001b[43muse_gpu\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 87\u001b[39m \u001b[43m \u001b[49m\u001b[43mmodel_storage_directory\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmodel_storage_directory\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 88\u001b[39m \u001b[43m \u001b[49m\u001b[43mrecog_network\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mrecog_network\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 89\u001b[39m \u001b[43m \u001b[49m\u001b[43mdownload_enabled\u001b[49m\u001b[43m=\u001b[49m\u001b[43mdownload_enabled\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 90\u001b[39m \u001b[43m \u001b[49m\u001b[43mverbose\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[32m 91\u001b[39m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/easyocr/easyocr.py:92\u001b[39m, in \u001b[36mReader.__init__\u001b[39m\u001b[34m(self, lang_list, gpu, model_storage_directory, user_network_directory, detect_network, recog_network, download_enabled, detector, recognizer, verbose, quantize, cudnn_benchmark)\u001b[39m\n\u001b[32m 90\u001b[39m \u001b[38;5;28mself\u001b[39m.cudnn_benchmark=cudnn_benchmark\n\u001b[32m 91\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m detector:\n\u001b[32m---> \u001b[39m\u001b[32m92\u001b[39m detector_path = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mgetDetectorPath\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdetect_network\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 94\u001b[39m \u001b[38;5;66;03m# recognition model\u001b[39;00m\n\u001b[32m 95\u001b[39m separator_list = {}\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/easyocr/easyocr.py:253\u001b[39m, in \u001b[36mReader.getDetectorPath\u001b[39m\u001b[34m(self, detect_network)\u001b[39m\n\u001b[32m 250\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mFileNotFoundError\u001b[39;00m(\u001b[33m\"\u001b[39m\u001b[33mMissing \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[33m and downloads disabled\u001b[39m\u001b[33m\"\u001b[39m % detector_path)\n\u001b[32m 251\u001b[39m LOGGER.warning(\u001b[33m'\u001b[39m\u001b[33mDownloading detection model, please wait. \u001b[39m\u001b[33m'\u001b[39m\n\u001b[32m 252\u001b[39m \u001b[33m'\u001b[39m\u001b[33mThis may take several minutes depending upon your network connection.\u001b[39m\u001b[33m'\u001b[39m)\n\u001b[32m--> \u001b[39m\u001b[32m253\u001b[39m \u001b[43mdownload_and_unzip\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mdetection_models\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mdetect_network\u001b[49m\u001b[43m]\u001b[49m\u001b[43m[\u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[33;43murl\u001b[39;49m\u001b[33;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mdetection_models\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mdetect_network\u001b[49m\u001b[43m]\u001b[49m\u001b[43m[\u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[33;43mfilename\u001b[39;49m\u001b[33;43m'\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mmodel_storage_directory\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mverbose\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 254\u001b[39m \u001b[38;5;28;01massert\u001b[39;00m calculate_md5(detector_path) == \u001b[38;5;28mself\u001b[39m.detection_models[\u001b[38;5;28mself\u001b[39m.detect_network][\u001b[33m'\u001b[39m\u001b[33mmd5sum\u001b[39m\u001b[33m'\u001b[39m], corrupt_msg\n\u001b[32m 255\u001b[39m LOGGER.info(\u001b[33m'\u001b[39m\u001b[33mDownload complete\u001b[39m\u001b[33m'\u001b[39m)\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/site-packages/easyocr/utils.py:628\u001b[39m, in \u001b[36mdownload_and_unzip\u001b[39m\u001b[34m(url, filename, model_storage_directory, verbose)\u001b[39m\n\u001b[32m 626\u001b[39m zip_path = os.path.join(model_storage_directory, \u001b[33m'\u001b[39m\u001b[33mtemp.zip\u001b[39m\u001b[33m'\u001b[39m)\n\u001b[32m 627\u001b[39m reporthook = printProgressBar(prefix=\u001b[33m'\u001b[39m\u001b[33mProgress:\u001b[39m\u001b[33m'\u001b[39m, suffix=\u001b[33m'\u001b[39m\u001b[33mComplete\u001b[39m\u001b[33m'\u001b[39m, length=\u001b[32m50\u001b[39m) \u001b[38;5;28;01mif\u001b[39;00m verbose \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m628\u001b[39m \u001b[43murlretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mzip_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mreporthook\u001b[49m\u001b[43m=\u001b[49m\u001b[43mreporthook\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 629\u001b[39m \u001b[38;5;28;01mwith\u001b[39;00m ZipFile(zip_path, \u001b[33m'\u001b[39m\u001b[33mr\u001b[39m\u001b[33m'\u001b[39m) \u001b[38;5;28;01mas\u001b[39;00m zipObj:\n\u001b[32m 630\u001b[39m zipObj.extract(filename, model_storage_directory)\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/urllib/request.py:240\u001b[39m, in \u001b[36murlretrieve\u001b[39m\u001b[34m(url, filename, reporthook, data)\u001b[39m\n\u001b[32m 223\u001b[39m \u001b[38;5;250m\u001b[39m\u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 224\u001b[39m \u001b[33;03mRetrieve a URL into a temporary location on disk.\u001b[39;00m\n\u001b[32m 225\u001b[39m \n\u001b[32m (...)\u001b[39m\u001b[32m 236\u001b[39m \u001b[33;03mdata file as well as the resulting HTTPMessage object.\u001b[39;00m\n\u001b[32m 237\u001b[39m \u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 238\u001b[39m url_type, path = _splittype(url)\n\u001b[32m--> \u001b[39m\u001b[32m240\u001b[39m \u001b[38;5;28;01mwith\u001b[39;00m contextlib.closing(\u001b[43murlopen\u001b[49m\u001b[43m(\u001b[49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdata\u001b[49m\u001b[43m)\u001b[49m) \u001b[38;5;28;01mas\u001b[39;00m fp:\n\u001b[32m 241\u001b[39m headers = fp.info()\n\u001b[32m 243\u001b[39m \u001b[38;5;66;03m# Just return the local path and the \"headers\" for file://\u001b[39;00m\n\u001b[32m 244\u001b[39m \u001b[38;5;66;03m# URLs. No sense in performing a copy unless requested.\u001b[39;00m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/urllib/request.py:215\u001b[39m, in \u001b[36murlopen\u001b[39m\u001b[34m(url, data, timeout, cafile, capath, cadefault, context)\u001b[39m\n\u001b[32m 213\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 214\u001b[39m opener = _opener\n\u001b[32m--> \u001b[39m\u001b[32m215\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mopener\u001b[49m\u001b[43m.\u001b[49m\u001b[43mopen\u001b[49m\u001b[43m(\u001b[49m\u001b[43murl\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdata\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/urllib/request.py:515\u001b[39m, in \u001b[36mOpenerDirector.open\u001b[39m\u001b[34m(self, fullurl, data, timeout)\u001b[39m\n\u001b[32m 512\u001b[39m req = meth(req)\n\u001b[32m 514\u001b[39m sys.audit(\u001b[33m'\u001b[39m\u001b[33murllib.Request\u001b[39m\u001b[33m'\u001b[39m, req.full_url, req.data, req.headers, req.get_method())\n\u001b[32m--> \u001b[39m\u001b[32m515\u001b[39m response = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_open\u001b[49m\u001b[43m(\u001b[49m\u001b[43mreq\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdata\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 517\u001b[39m \u001b[38;5;66;03m# post-process response\u001b[39;00m\n\u001b[32m 518\u001b[39m meth_name = protocol+\u001b[33m\"\u001b[39m\u001b[33m_response\u001b[39m\u001b[33m\"\u001b[39m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/urllib/request.py:532\u001b[39m, in \u001b[36mOpenerDirector._open\u001b[39m\u001b[34m(self, req, data)\u001b[39m\n\u001b[32m 529\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m result\n\u001b[32m 531\u001b[39m protocol = req.type\n\u001b[32m--> \u001b[39m\u001b[32m532\u001b[39m result = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_call_chain\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mhandle_open\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mprotocol\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mprotocol\u001b[49m\u001b[43m \u001b[49m\u001b[43m+\u001b[49m\n\u001b[32m 533\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m'\u001b[39;49m\u001b[33;43m_open\u001b[39;49m\u001b[33;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mreq\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 534\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m result:\n\u001b[32m 535\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m result\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/urllib/request.py:492\u001b[39m, in \u001b[36mOpenerDirector._call_chain\u001b[39m\u001b[34m(self, chain, kind, meth_name, *args)\u001b[39m\n\u001b[32m 490\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m handler \u001b[38;5;129;01min\u001b[39;00m handlers:\n\u001b[32m 491\u001b[39m func = \u001b[38;5;28mgetattr\u001b[39m(handler, meth_name)\n\u001b[32m--> \u001b[39m\u001b[32m492\u001b[39m result = \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[43m*\u001b[49m\u001b[43margs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 493\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m result \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 494\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m result\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/urllib/request.py:1392\u001b[39m, in \u001b[36mHTTPSHandler.https_open\u001b[39m\u001b[34m(self, req)\u001b[39m\n\u001b[32m 1391\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mhttps_open\u001b[39m(\u001b[38;5;28mself\u001b[39m, req):\n\u001b[32m-> \u001b[39m\u001b[32m1392\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mdo_open\u001b[49m\u001b[43m(\u001b[49m\u001b[43mhttp\u001b[49m\u001b[43m.\u001b[49m\u001b[43mclient\u001b[49m\u001b[43m.\u001b[49m\u001b[43mHTTPSConnection\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mreq\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1393\u001b[39m \u001b[43m \u001b[49m\u001b[43mcontext\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_context\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/.conda/envs/deepseek-ocr/lib/python3.12/urllib/request.py:1347\u001b[39m, in \u001b[36mAbstractHTTPHandler.do_open\u001b[39m\u001b[34m(self, http_class, req, **http_conn_args)\u001b[39m\n\u001b[32m 1344\u001b[39m h.request(req.get_method(), req.selector, req.data, headers,\n\u001b[32m 1345\u001b[39m encode_chunked=req.has_header(\u001b[33m'\u001b[39m\u001b[33mTransfer-encoding\u001b[39m\u001b[33m'\u001b[39m))\n\u001b[32m 1346\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mOSError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err: \u001b[38;5;66;03m# timeout error\u001b[39;00m\n\u001b[32m-> \u001b[39m\u001b[32m1347\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m URLError(err)\n\u001b[32m 1348\u001b[39m r = h.getresponse()\n\u001b[32m 1349\u001b[39m \u001b[38;5;28;01mexcept\u001b[39;00m:\n", "\u001b[31mURLError\u001b[39m: " ] } ], "source": [ "# Convert your PNG image\n", "result = converter.convert(\"./table.pdf\")\n", "\n", "# Get the output\n", "markdown_text = result.document.export_to_markdown()\n", "print(markdown_text)" ] }, { "cell_type": "code", "execution_count": 4, "id": "57f481c5-6bd8-4b89-a5c0-f17acac89bc0", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/skiredj.abderrahman/.conda/envs/deepseek_khalil/lib/python3.12/site-packages/transformers/generation/configuration_utils.py:590: UserWarning: `do_sample` is set to `False`. However, `temperature` is set to `0.0` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`.\n", " warnings.warn(\n", "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "Setting `pad_token_id` to `eos_token_id`:None for open-end generation.\n", "The attention mask is not set and cannot be inferred from input because pad token is same as eos token. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\n", "The `seen_tokens` attribute is deprecated and will be removed in v4.41. Use the `cache_position` model input instead.\n", "`get_max_cache()` is deprecated for all Cache classes. Use `get_max_cache_shape()` instead. Calling `get_max_cache()` will raise error from v4.48\n", "The attention layers in this model are transitioning from computing the RoPE embeddings internally through `position_ids` (2D tensor with the indexes of the tokens), to using externally computed `position_embeddings` (Tuple of tensors, containing cos and sin). In v4.46 `position_ids` will be removed and `position_embeddings` will be mandatory.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "=====================\n", "BASE: torch.Size([1, 256, 1280])\n", "PATCHES: torch.Size([4, 100, 1280])\n", "=====================\n", "<|ref|>text<|/ref|><|det|>[[20, 20, 999, 230]]<|/det|>\n", "ولا يفوتنا هنا أن نوجه ثنية إشادة وتفكير لكار الأجهزة الأمنية على تفتحها ويفتحتها في التصحر\n", "لمختلف المحاولات الإرهابية التي تطورا رئيسة المسر بالمنوذج المغربي، الكاريشهد العالم بتميزك. كما\n", "نؤكد أن انعكاس على أمس و استقرار البلك لا يسر معها المولة ومؤسساتها فقط، وإنما هو أيضا مر\n", "واجبات المواصر، في إصدار التعاون والتنسيق مع الأجهزة المختصة. \n", "\n", "<|ref|>text<|/ref|><|det|>[[20, 250, 999, 440]]<|/det|>\n", "وينبغي أن نذكر أيضا، أن مواجهة التصرف يجب أن تتم وفق مقاربة تشاركية تقوم على تعزيز قيم\n", "الافتتاح والتناسل، الترويوز بها المغاربة، ويتكامل فيها النهوض بالبعث الاجتماعي والتنموي مع الخور\n", "الخيري والتربوي، إضافة إلى الهيئات الأمني. \n", "\n", "<|ref|>text<|/ref|><|det|>[[885, 460, 999, 512]]<|/det|>\n", "شعب العزيز: \n", "\n", "<|ref|>text<|/ref|><|det|>[[20, 530, 999, 920]]<|/det|>\n", "إننا نعم الله تعالى عالميا وهبنا مر نعم عالمي المغربي الصبية. وفي مقدمنتها ما حضر به الشعب\n", "المغربي مر خضار الوفاء والتلك حم مر عرشه، والغيرة الصادقة على موحدة التهوية والترابية. فسواء\n", "تعلق الأمر بنجاح اليهوية، أو بالعكاس على المار والمستقرار، فإن القاسم المشترك، هو خدمة المواصر\n", "المغربي وهو أمانة ومسؤولية تاريخية، علينا جميعا النهوض بها، لمواصلة حصار مشاعر التورك المتجذبة\n", "للملذ والشعب، مر أجر المغربي الوحدة والتصار، والمار والمستقرار. وفي ذلك خير وفاء لأرواح بأصدار هذه\n", "الملحمة التاريخية، وفي مقدمنتها مجدنا المقدسر مجدنا الملذ صمم الكامر، وولاكنا المنعم مجدنا الملذ\n", "العسر الثانوي، أكرر الله متهواها، وكافة شفاء الوصر الأبار. \n", "\n", "<|ref|>text<|/ref|><|det|>[[592, 939, 999, 988]]<|/det|>\n", "والسلام عليكم ورمحة الله تعالى وبركاته\".\n", "==================================================\n", "image size: (937, 782)\n", "valid image tokens: 613\n", "output texts tokens (valid): 590\n", "compression ratio: 0.96\n", "==================================================\n", "===============save results:===============\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "image: 0it [00:00, ?it/s]\n", "other: 100%|██████████| 5/5 [00:00<00:00, 142663.40it/s]\n" ] } ], "source": [ "# prompt = \"\\nFree OCR. \"\n", "prompt = \"\\n<|grounding|>Convert the document to markdown.\"\n", "image_file = './meri.PNG'\n", "output_path = './output/deepseek_output'\n", "\n", "res = model.infer(tokenizer, prompt=prompt, image_file=image_file, output_path = output_path, base_size = 1024, image_size = 640, crop_mode=True, save_results = True, test_compress = True)" ] }, { "cell_type": "code", "execution_count": null, "id": "d96e9c8d-16a2-422f-a890-ffba72a4fb36", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.19" } }, "nbformat": 4, "nbformat_minor": 5 }