{"id":120880,"date":"2025-03-08T22:15:33","date_gmt":"2025-03-08T22:15:33","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/building-a-medical-prescription-scanner-using-paligemma-2-mix\/"},"modified":"2025-03-08T22:15:33","modified_gmt":"2025-03-08T22:15:33","slug":"building-a-medical-prescription-scanner-using-paligemma-2-mix","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=120880","title":{"rendered":"Building a Medical Prescription Scanner Using PaliGemma 2 Mix"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"article-start\">\n<p>In today\u2019s fast-paced business world, leveraging cutting-edge technology like <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2023\/04\/what-is-generative-ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">Generative AI <\/a>can significantly elevate operations of a business. Vision-language models, such as PaliGemma 2 Mix, offer businesses a powerful way to bridge the gap between visual and textual data. By combining the advanced SigLIP vision model and Gemma 2 <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2023\/03\/an-introduction-to-large-language-models-llms\/\" target=\"_blank\" rel=\"noreferrer noopener\">language models<\/a>, PaliGemma 2 Mix excels at tasks like image captioning, visual question answering, OCR, object detection, and segmentation, all with exceptional accuracy. What sets PaliGemma 2 Mix apart is its plug-and-play capability. Unlike previous models that required extensive fine-tuning, this tool is ready for immediate application across various tasks. Available in multiple configurations (3B, 10B, and 28B parameters) and resolutions (224\u00d7224 and 448\u00d7448), it gives us the flexibility to align computational power with specific business needs.\u00a0\u00a0<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-learning-objectives\">Learning Objectives<\/h3>\n<ul class=\"wp-block-list\">\n<li>Understand the architecture and key components of the PaliGemma 2 Mix model.<\/li>\n<li>Explore the differences between <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2024\/12\/paligemma-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">PaliGemma 2<\/a> and <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2024\/10\/googles-siglip\/\" target=\"_blank\" rel=\"noreferrer noopener\">SigLIP<\/a> in <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2024\/09\/vision-language-models-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">vision-language processing<\/a>.<\/li>\n<li>Learn about the training datasets that power PaliGemma 2 Mix for multimodal tasks.<\/li>\n<li>Discover the capabilities of PaliGemma 2 Mix in tasks like OCR, object detection, and image captioning.<\/li>\n<li>Build a medical prescription scanner using PaliGemma 2 Mix in a hands-on Python tutorial.<\/li>\n<\/ul>\n<p><em><strong>This article was published as a part of the\u00a0<\/strong><\/em><a href=\"https:\/\/www.analyticsvidhya.com\/datahack\/blogathon\" target=\"_blank\" rel=\"noreferrer noopener\"><em><strong>Data Science Blogathon.<\/strong><\/em><\/a><\/p>\n<h2 class=\"wp-block-heading\" id=\"h-understanding-paligemma-2-and-its-architecture\">Understanding PaliGemma 2 and Its Architecture<\/h2>\n<p>PaliGemma 2, released by Google in December 2024, was an iteration of the\u00a0<a href=\"https:\/\/huggingface.co\/blog\/paligemma\" target=\"_blank\" rel=\"nofollow noopener\">PaliGemma vision language model<\/a>. PaliGemma 2 connects the powerful SigLIP image encoder with the\u00a0<a href=\"https:\/\/huggingface.co\/blog\/gemma2\" target=\"_blank\" rel=\"nofollow noopener\">Gemma 2<\/a>\u00a0language model.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-key-components-of-paligemma-2\">Key Components of PaliGemma 2<\/h3>\n<p>Let us understand the key components of PaliGemma 2:<\/p>\n<ul class=\"wp-block-list\">\n<li><b>Image Encoder From SigLIP<\/b>: The image encoder from <a href=\"https:\/\/huggingface.co\/docs\/transformers\/en\/model_doc\/siglip\" target=\"_blank\" rel=\"nofollow noopener\">SigLIP<\/a> is used for processing images in PaliGemma 2. The image encoder is pretrained on image-text pairs using contrastive learning based on the SigLIP procedure, which involves both a text and image encoder. The text encoder is <a href=\"https:\/\/arxiv.org\/pdf\/2310.09199\" target=\"_blank\" rel=\"nofollow noopener\">discarded<\/a> when integrating the image encoder into PaLI.\u00a0\u00a0<\/li>\n<li><b>Mapping Image Embeddings<\/b>: The output embeddings from the visual encoder are mapped to the Gemma 2 input space using a linear projection.\u00a0\u00a0<\/li>\n<li><b>Merge Image Embeddings with Text Embeddings<\/b>: The system combines visual embeddings with a text prompt and feeds them into the Gemma 2 language model, which then generates predictions by autoregressively sampling from the model.<\/li>\n<li><b>Fine Tuning on Multimodal Tasks:<\/b> In subsequent training stages, researchers train the model on various multimodal tasks, including captioning, visual question answering, and OCR at different resolutions (224px\u00b2, 448px\u00b2, and 896px\u00b2).<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-how-is-paligemma-2-different-from-siglip\">How is PaliGemma 2 Different from SigLIP?<\/h2>\n<p>SigLIP is a vision encoder that processes visual data, such as images or videos, by breaking them down into analyzable features. It extracts visual tokens from images and uses them for tasks like image classification, object detection, and OCR.  SigLIP has evolved into SigLIP 2, which offers improved performance and new variants for dynamic resolution.<\/p>\n<p>PaliGemma 2 is a vision-language model (VLM) that integrates the SigLIP vision encoder with the Gemma 2 language model. It combines visual and textual data to perform tasks such as image captioning, visual question answering, and OCR, leveraging both the SigLIP encoder for visual analysis and the Gemma 2 model for text understanding.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-training-data-for-paligemma-2\">Training Data For PaliGemma 2<\/h3>\n<p>PaliGemma 2 has been trained on a wide range of datasets to support its diverse capabilities. These include WebLI, a multilingual image-text dataset for tasks like visual semantics and object localization; CC3M-35L, which features image-alt-text pairs in multiple languages; and VQ\u00b2A-CC3M-35L, a subset with question-answer pairs related to images. Additionally, it uses OpenImages for detection tasks and object-aware Q&amp;A pairs, and WIT, a dataset derived from Wikipedia with images and corresponding text. Together, these datasets equip PaliGemma 2 for tasks such as image understanding and multilingual text interpretation.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-paligemma-2-mix-and-its-key-differentiating-features-nbsp\">PaliGemma 2 Mix and Its Key Differentiating Features\u00a0<\/h2>\n<p>Let us now explore PaliGemma 2 Mix below:<\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"441\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Finetuned-Pali-Gemma-2.webp\" alt=\"Finetuned Pali Gemma 2\" class=\"wp-image-224821\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Finetuned-Pali-Gemma-2.webp 769w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Finetuned-Pali-Gemma-2-300x172.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Finetuned-Pali-Gemma-2-150x86.webp 150w\" sizes=\"auto, (max-width: 769px) 100vw, 769px\"\/><\/figure>\n<p>While both models, PaliGemma 2 and PaliGemma 2 Mix, share a similar architecture, PaliGemma 2 Mix optimizes performance for immediate use across multiple tasks without requiring fine-tuning. This makes it more convenient for developers to quickly integrate vision-language capabilities into their applications.<\/p>\n<p>PaliGemma 2 Mix is available in several variants, each differing in model size and input resolution. These variations allow users to choose the best model for their specific needs based on computational resources and task complexity.<\/p>\n<p><b>Model Sizes:<\/b><\/p>\n<ul class=\"wp-block-list\">\n<li><b>3B Parameters:<\/b> Compact and resource-efficient, ideal for constrained environments.<\/li>\n<li><b>10B Parameters:<\/b> A balanced option for mid-tier computational setups.<\/li>\n<li><b>28B Parameters<\/b>: Designed for high-performance tasks with no latency constraints.<\/li>\n<\/ul>\n<p><strong>Resolutions:<\/strong><\/p>\n<ul class=\"wp-block-list\">\n<li><b>224\u00d7224:<\/b> Suitable for tasks requiring less detailed visual analysis.<\/li>\n<li><b>448\u00d7448:<\/b> Offers higher resolution for tasks needing more precise image processing.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-range-of-tasks-with-paligemma-2-mix\">Range of Tasks With PaliGemma 2 Mix<\/h2>\n<p>The PaliGemma 2 mix models are capable of handling a wide range of tasks. These tasks can be grouped into the following categories based on their subtasks:<\/p>\n<ul class=\"wp-block-list\">\n<li><b>Vision-language tasks: <\/b>Answering questions about images, referencing visual content<\/li>\n<li><b>Document comprehension:<\/b> Answering questions about infographics, charts, and understanding diagrams<\/li>\n<li><b>Text extraction from images:<\/b> Detecting text, captioning images with embedded text, answering questions related to images containing text<\/li>\n<li><b>Localization tasks:<\/b> Detecting objects, performing image segmentation<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-building-a-medical-prescription-scanner-using-paligemma-2-mix\">Building a Medical Prescription Scanner using PaliGemma 2 Mix<\/h2>\n<p>In the following tutorial, we will create a query system to extract information from medical prescriptions using PaliGemma 2 Mix model. We will see how it performs on extracting information from different scanned doctor\u2019s prescriptions. We can run the following code on Google colab with T4 GPU (free tier). The whole code is given in this <a href=\"https:\/\/colab.research.google.com\/drive\/1_yW1cz418Gn_Dcx9rE5dLRlEbXBf5jEl?usp=sharing\" target=\"_blank\" rel=\"nofollow noopener\">Colab Notebook.\u00a0<\/a><\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step1-install-necessary-libraries\">Step1: Install Necessary Libraries<\/h3>\n<p>Let us install necessary libraries first.<\/p>\n<pre class=\"wp-block-code\"><code>!pip install -U bitsandbytes -U transformers -q<\/code><\/pre>\n<p>The code installs or updates two Python libraries, bitsandbytes and transformers. Bitsandbytes is a library that optimizes memory usage for machine learning models, especially for quantization tasks. The transformers model will be used for fetching the models\u00a0from Hugging Face.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step2-import-necessary-libraries\">Step2:  Import Necessary Libraries<\/h3>\n<p>Next step is to import all required libraries;<\/p>\n<pre class=\"wp-block-code\"><code>import torch\nimport pandas as pd\nfrom transformers import PaliGemmaForConditionalGeneration, PaliGemmaProcessor, BitsAndBytesConfig\nfrom transformers import BitsAndBytesConfig\nfrom PIL import Image\nfrom transformers.image_utils import load_image\nimport requests\nfrom io import BytesIO<\/code><\/pre>\n<p>We import all the libraries needed to run the next blocks of code here.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step3-setting-hugging-face-api-token\">Step3: Setting Hugging Face API Token<\/h3>\n<p>Since this model is in a gated repo on Hugging Face, we need to create a fine grained access token on Hugging Face and setting the \u201cRead access to contents of all public gated repos you can access\u201d.<\/p>\n<pre class=\"wp-block-code\"><code>import os\nos.environ[\"HF_TOKEN\"]=\"\"<\/code><\/pre>\n<p>We can define this API token in the above code before running the next steps.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step5-loading-the-model\">Step5: Loading the Model<\/h3>\n<p>\u00a0We load the model <a href=\"https:\/\/huggingface.co\/google\/paligemma2-10b-mix-448\" target=\"_blank\" rel=\"nofollow noopener\">google\/paligemma2-10b-mix-448<\/a> here which was fine-tuned on a mixture of academic tasks using 448\u00d7448 input images.\u00a0\u00a0<\/p>\n<pre class=\"wp-block-code\"><code>model_id = \"google\/paligemma2-10b-mix-448\" \nbnb_config = BitsAndBytesConfig(\n    load_in_8bit=True,  # Change to load_in_4bit=True for even lower memory usage\n    llm_int8_threshold=6.0,\n)\n\n# Load model with quantization\nmodel = PaliGemmaForConditionalGeneration.from_pretrained(\n    model_id, quantization_config=bnb_config\n).eval()\nprocessor = PaliGemmaProcessor.from_pretrained(model_id)\n\n#Set the following for avoiding an error on \" Dynamic control flow is not supported at the moment\"\n\nmodel.forward = torch.compile(model.forward, mode=\"reduce-overhead\", fullgraph=False)\n<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step6-loading-the-image\">Step6: Loading the Image<\/h3>\n<p>We fetch a sample scanned document from a URL, convert it to RGB format if needed, and display it for processing.<\/p>\n<pre class=\"wp-block-code\"><code># URL of the image\nurl = \"https:\/\/assets.isu.pub\/document-structure\/230725104448-236aeacced7d7abcdafb3f9f2caf21c3\/v1\/a61879b5c46195fd5526fe6fe4e15fc8.jpeg\"\n\n# Send a GET request to the URL\nresponse = requests.get(url)\n\n# Check if the request was successful\nif response.status_code == 200:\n    # Load the image from the response content\n    img = Image.open(BytesIO(response.content))\n    img.show()\nelse:\n    print(\"Failed to retrieve the image.\")\n\n\ndef ensure_rgb(image: Image.Image) -&gt; Image.Image:\n    if image.mode != \"RGB\":\n        image = image.convert(\"RGB\")\n    return image<\/code><\/pre>\n<p>We load this scanned document, which is a sample masked Aadhar document. Then we will try to extract the name from this document using the model.<\/p>\n<figure class=\"wp-block-image size-full figure  mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"359\" height=\"305\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inputimage.webp\" alt=\"inputimage;  PaliGemma 2 Mix\" class=\"wp-image-224823\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inputimage.webp 359w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inputimage-300x255.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inputimage-150x127.webp 150w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\"\/><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/assets.isu.pub\/document-structure\/230725104448-236aeacced7d7abcdafb3f9f2caf21c3\/v1\/a61879b5c46195fd5526fe6fe4e15fc8.jpeg\" target=\"_blank\" rel=\"nofollow noopener\">Link of Input Image<\/a><\/figcaption><\/figure>\n<h3 class=\"wp-block-heading\" id=\"h-step7-querying-from-scanned-document-nbsp\">Step7: Querying from Scanned Document\u00a0<\/h3>\n<p>We create a text prompt, process the input image and text, and generate a response using the model to extract prescription details.<\/p>\n<pre class=\"wp-block-code\"><code>prompt = \"Answer en Which medicines are recommended in the prescription\"\nmodel_inputs = processor(text=prompt, images=ensure_rgb(img), return_tensors=\"pt\").to(torch.bfloat16).to(model.device)\ninput_len = model_inputs[\"input_ids\"].shape[-1]\n\nwith torch.inference_mode():\n    generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False)\n    generation = generation[0][input_len:]\n    decoded = processor.decode(generation, skip_special_tokens=True)\n    print(decoded)<\/code><\/pre>\n<p>The above code processes an input prompt and an image, then feeds them into the model to generate a response. It first processes the text prompt along with the image, inputs them into the model, and generates a response based on the given context. Finally, it decodes the output and prints it as a readable text answer.<\/p>\n<p><b>Output<\/b><\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"276\" height=\"54\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-6.webp\" alt=\"output\" class=\"wp-image-224824\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-6.webp 276w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-6-150x29.webp 150w\" sizes=\"auto, (max-width: 276px) 100vw, 276px\"\/><\/figure>\n<p>As we can see from the output above, the medicine name has been extracted correctly from the document<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-testing-on-other-queries\">Testing on other Queries<\/h3>\n<p><b>Query 2<\/b><\/p>\n<pre class=\"wp-block-code\"><code># URL of the image\nurl = \"https:\/\/ars.els-cdn.com\/content\/image\/1-s2.0-S2468502X21000334-gr6.jpg\"\n\n# Send a GET request to the URL\nresponse = requests.get(url)\n\n# Check if the request was successful\nif response.status_code == 200:\n    # Load the image from the response content\n    img = Image.open(BytesIO(response.content))\n    img.show()\nelse:\n    print(\"Failed to retrieve the image.\")\n    \nprompt = \"Answer en Which diseases are mentioned in the prescription\"\nmodel_inputs = processor(text=prompt, images=ensure_rgb(img), return_tensors=\"pt\").to(torch.bfloat16).to(model.device)\ninput_len = model_inputs[\"input_ids\"].shape[-1]\n\nwith torch.inference_mode():\n    generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False)\n    generation = generation[0][input_len:]\n    decoded = processor.decode(generation, skip_special_tokens=True)\n    print(decoded)<\/code><\/pre>\n<p><b>Input Image<\/b><\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"262\" height=\"300\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query2.webp\" alt=\"query2:  PaliGemma 2 Mix\" class=\"wp-image-224825\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query2.webp 262w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query2-150x172.webp 150w\" sizes=\"auto, (max-width: 262px) 100vw, 262px\"\/><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/ars.els-cdn.com\/content\/image\/1-s2.0-S2468502X21000334-gr6.jpg\" target=\"_blank\" rel=\"nofollow noopener\">Link of Input Image<\/a><\/figcaption><\/figure>\n<p><b>Output<\/b><\/p>\n<figure class=\"wp-block-image size-full is-resized figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"364\" height=\"46\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/image_0wJwlEw.webp\" alt=\"output of query2\" class=\"wp-image-224826\" style=\"width:364px;height:auto\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/image_0wJwlEw.webp 364w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/image_0wJwlEw-300x38.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/image_0wJwlEw-150x19.webp 150w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\"\/><\/figure>\n<p>The output above shows that the model correctly extracted two diseases, Diabetes and Hypertension, from the document. However, it failed to extract \u201ccholesterol\u201d accurately.<\/p>\n<p><b>Query 3<\/b><\/p>\n<pre class=\"wp-block-code\"><code># URL of the image\nurl = \"https:\/\/www.madeformedical.com\/wp-content\/uploads\/2018\/07\/vio-4.jpg\"\n\n# Send a GET request to the URL\nresponse = requests.get(url)\n\n# Check if the request was successful\nif response.status_code == 200:\n    # Load the image from the response content\n    img = Image.open(BytesIO(response.content))\n    img.show()\nelse:\n    print(\"Failed to retrieve the image.\")\n    \nprompt = \"Answer en Which medicines are mentioned in the prescription\"\nmodel_inputs = processor(text=prompt, images=ensure_rgb(img), return_tensors=\"pt\").to(torch.bfloat16).to(model.device)\ninput_len = model_inputs[\"input_ids\"].shape[-1]\n\nwith torch.inference_mode():\n    generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False)\n    generation = generation[0][input_len:]\n    decoded = processor.decode(generation, skip_special_tokens=True)\n    print(decoded)<\/code><\/pre>\n<p><b>Input Image<\/b><\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"292\" height=\"300\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query3.webp\" alt=\"query3; PaliGemma 2 Mix\" class=\"wp-image-224828\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query3.webp 292w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query3-150x154.webp 150w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\"\/><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/www.madeformedical.com\/wp-content\/uploads\/2018\/07\/vio-4.jpg\" target=\"_blank\" rel=\"nofollow noopener\">Link of Input Image<\/a><\/figcaption><\/figure>\n<p><b>Output<\/b><\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"297\" height=\"28\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-query3.webp\" alt=\"output query3\" class=\"wp-image-224829\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-query3.webp 297w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-query3-150x14.webp 150w\" sizes=\"auto, (max-width: 297px) 100vw, 297px\"\/><\/figure>\n<p>The output above shows that the model extracted the medicine name from the document, but it misspelled \u201cAscorbic Acid\u201d due to the way it was written in the prescription.<\/p>\n<p><b>Query 4<\/b><\/p>\n<pre class=\"wp-block-code\"><code># URL of the image\nurl = \"https:\/\/img.apmcdn.org\/7c0de3f557f29ea3ed7c6cc0a469f1a4c6a05e77\/uncropped\/a9e1ca-20061128-oldprescrip.jpg\"\n\n# Send a GET request to the URL\nresponse = requests.get(url)\n\n# Check if the request was successful\nif response.status_code == 200:\n    # Load the image from the response content\n    img = Image.open(BytesIO(response.content))\n    img.show()\nelse:\n    print(\"Failed to retrieve the image.\")\n    \nprompt = \"Answer en Which medicines are mentioned in the prescription\"\nmodel_inputs = processor(text=prompt, images=ensure_rgb(img), return_tensors=\"pt\").to(torch.bfloat16).to(model.device)\ninput_len = model_inputs[\"input_ids\"].shape[-1]\n\nwith torch.inference_mode():\n    generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False)\n    generation = generation[0][input_len:]\n    decoded = processor.decode(generation, skip_special_tokens=True)\n    print(decoded)<\/code><\/pre>\n<p><b>Input Image<\/b><\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"723\" height=\"478\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query4.webp\" alt=\"query4;  PaliGemma 2 Mix\" class=\"wp-image-224830\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query4.webp 723w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query4-300x198.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/query4-150x99.webp 150w\" sizes=\"auto, (max-width: 723px) 100vw, 723px\"\/><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/img.apmcdn.org\/7c0de3f557f29ea3ed7c6cc0a469f1a4c6a05e77\/uncropped\/a9e1ca-20061128-oldprescrip.jpg\" target=\"_blank\" rel=\"nofollow noopener\">Link of Input Image<\/a><\/figcaption><\/figure>\n<p><b>Output<\/b><\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"265\" height=\"49\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-query4.webp\" alt=\"output query4\" class=\"wp-image-224831\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-query4.webp 265w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-query4-150x28.webp 150w\" sizes=\"auto, (max-width: 265px) 100vw, 265px\"\/><\/figure>\n<p>The output above shows that the model did not extract the medicine name correctly from the document. The prescription mentions \u201cAten-D Tablet,\u201d but the unclear handwriting may have prevented the model from detecting it accurately.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n<p>In conclusion, Medical Prescription Scanner using PaliGemma 2 Mix offers businesses an advanced and versatile solution for bridging visual and textual data through its seamless integration of the SigLIP vision encoder and Gemma 2 language model. Its plug-and-play functionality eliminates the need for extensive fine-tuning, making it ideal for immediate deployment across a wide range of tasks, including image captioning, OCR, and object detection. With flexible configurations and resolutions, businesses can tailor Medical Prescription Scanner using PaliGemma 2 Mix to meet their specific needs, enhancing operational efficiency and enabling powerful multimodal applications.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-key-takeaways\">Key Takeaways<\/h3>\n<ul class=\"wp-block-list\">\n<li>PaliGemma 2 is a vision-language model (VLM) that integrates the SigLIP vision encoder with the Gemma 2 language model.<\/li>\n<li>The model excels at various tasks like image captioning, OCR, visual question answering, object detection, and segmentation, offering exceptional accuracy with seamless integration.<\/li>\n<li>Unlike previous models, PaliGemma 2 Mix doesn\u2019t require fine-tuning, making it ready for immediate application in multiple tasks, saving time and effort for businesses.<\/li>\n<li>PaliGemma 2 Mix is available in different model sizes (3B, 10B, and 28B parameters) and resolutions (224\u00d7224 and 448\u00d7448), allowing businesses to choose the best configuration for their specific needs.<\/li>\n<li>The model can handle a wide range of tasks, from vision-language applications to document comprehension and text extraction, making it ideal for diverse industries like healthcare and automation.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-frequently-asked-questions\">Frequently Asked Questions<\/h2>\n<div class=\"schema-faq wp-block-yoast-faq-block\">\n<div class=\"schema-faq-section\" id=\"faq-question-1741161627954\"><strong class=\"schema-faq-question\">Q1. <b>What is PaliGemma2 ?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. PaliGemma 2 is an advanced vision-language model that integrates the SigLIP vision encoder with the Gemma 2 language model. It handles tasks like image captioning, visual question answering, OCR, object detection, and segmentation with exceptional accuracy, without requiring fine-tuning.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1741161643801\"><strong class=\"schema-faq-question\">Q2. <b>How does PaliGemma 2 Mix differ from previous models?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. Unlike previous models that required extensive fine-tuning, PaliGemma 2 Mix is a plug-and-play solution, ready for immediate use across various tasks. This makes it faster and more convenient for businesses to implement.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1741161657371\"><strong class=\"schema-faq-question\">Q3. <b>What are the different configurations of PaliGemma 2 Mix?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. PaliGemma 2 Mix comes in multiple configurations, including model sizes with 3B, 10B, and 28B parameters, and resolutions of 224\u00d7224 and 448\u00d7448. This allows businesses to choose the best setup based on computational resources and specific task complexity.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1741161672278\"><strong class=\"schema-faq-question\">Q4. <b>What types of tasks can PaliGemma 2 Mix handle?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. PaliGemma 2 Mix is capable of handling a wide range of tasks, including vision-language tasks (like answering questions about images), document comprehension, text extraction from images, and localization tasks like object detection and image segmentation.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><strong>The media shown in this article is not owned by Analytics Vidhya and is used at the Author\u2019s discretion.<\/strong><\/p>\n<div class=\"border-top py-3 author-info my-4\">\n<div class=\"author-card d-flex align-items-center\">\n<div class=\"flex-shrink-0 overflow-hidden\">\n                                    <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/author\/mimi6\/\" class=\"text-decoration-none active-avatar\"><br \/>\n                                                                       <img decoding=\"async\" src=\"https:\/\/av-eks-lekhak.s3.amazonaws.com\/media\/lekhak-profile-images\/converted_image_ZkJo4gb.webp\" width=\"48\" height=\"48\" alt=\"Nibedita Dutta\" loading=\"lazy\" class=\"rounded-circle\"\/><\/p>\n<p>                                <\/a>\n                                <\/div>\n<\/p><\/div>\n<p>Nibedita completed her master\u2019s in Chemical Engineering from IIT Kharagpur in 2014 and is currently working as a Senior Data Scientist. In her current capacity, she works on building intelligent ML-based solutions to improve business processes.               <\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><h4 class=\"fs-24 text-dark\">Login to continue reading and enjoy expert-curated content.<\/h4>\n<p>                        <button class=\"btn btn-primary mx-auto d-table\" data-bs-toggle=\"modal\" data-bs-target=\"#loginModal\" id=\"readMoreBtn\">Keep Reading for Free<\/button>\n                    <\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s fast-paced business world, leveraging cutting-edge technology like Generative AI can significantly elevate operations of a business. Vision-language models, such as PaliGemma 2 Mix, offer businesses a powerful way to bridge the gap between visual and textual data. By combining the advanced SigLIP vision model and Gemma 2 language models, PaliGemma 2 Mix excels [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":120881,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[5815,2539,4560,3628,53334,53333,12951],"dealstore":[],"offerexpiration":[],"class_list":["post-120880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-blogathon","tag-building","tag-medical","tag-mix","tag-paligemma","tag-prescription","tag-scanner"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Building a Medical Prescription Scanner Using PaliGemma 2 Mix - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=120880\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a Medical Prescription Scanner Using PaliGemma 2 Mix - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"In today\u2019s fast-paced business world, leveraging cutting-edge technology like Generative AI can significantly elevate operations of a business. Vision-language models, such as PaliGemma 2 Mix, offer businesses a powerful way to bridge the gap between visual and textual data. By combining the advanced SigLIP vision model and Gemma 2 language models, PaliGemma 2 Mix excels [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=120880\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-08T22:15:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"872\" \/>\n\t<meta property=\"og:image:height\" content=\"473\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=120880#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=120880\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Building a Medical Prescription Scanner Using PaliGemma 2 Mix\",\"datePublished\":\"2025-03-08T22:15:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=120880\"},\"wordCount\":1761,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=120880#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp\",\"keywords\":[\"Blogathon\",\"Building\",\"Medical\",\"Mix\",\"PaliGemma\",\"Prescription\",\"scanner\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=120880#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=120880\",\"url\":\"https:\/\/fivemor.com\/?p=120880\",\"name\":\"Building a Medical Prescription Scanner Using PaliGemma 2 Mix - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=120880#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=120880#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp\",\"datePublished\":\"2025-03-08T22:15:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=120880#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=120880\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=120880#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp\",\"width\":872,\"height\":473},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=120880#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a Medical Prescription Scanner Using PaliGemma 2 Mix\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a Medical Prescription Scanner Using PaliGemma 2 Mix - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=120880","og_locale":"en_US","og_type":"article","og_title":"Building a Medical Prescription Scanner Using PaliGemma 2 Mix - Som2ny Network","og_description":"In today\u2019s fast-paced business world, leveraging cutting-edge technology like Generative AI can significantly elevate operations of a business. Vision-language models, such as PaliGemma 2 Mix, offer businesses a powerful way to bridge the gap between visual and textual data. By combining the advanced SigLIP vision model and Gemma 2 language models, PaliGemma 2 Mix excels [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=120880","og_site_name":"Som2ny Network","article_published_time":"2025-03-08T22:15:33+00:00","og_image":[{"width":872,"height":473,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=120880#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=120880"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Building a Medical Prescription Scanner Using PaliGemma 2 Mix","datePublished":"2025-03-08T22:15:33+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=120880"},"wordCount":1761,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=120880#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp","keywords":["Blogathon","Building","Medical","Mix","PaliGemma","Prescription","scanner"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=120880#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=120880","url":"https:\/\/fivemor.com\/?p=120880","name":"Building a Medical Prescription Scanner Using PaliGemma 2 Mix - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=120880#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=120880#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp","datePublished":"2025-03-08T22:15:33+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=120880#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=120880"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=120880#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Building-a-Medical-Prescription-Scanner-using-PaliGemma-2-Mix-.webp.webp","width":872,"height":473},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=120880#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Building a Medical Prescription Scanner Using PaliGemma 2 Mix"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/120880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=120880"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/120880\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/120881"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=120880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=120880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=120880"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=120880"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=120880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}