/ Модель

Характеристики

Контекст
32 768 токенов
Лицензия
Apache 2.0
Архитектура
qwen2_vl · dense
Базовая модель
Qwen2-VL-2B-Instruct
Опубликована
15 мар 2026

Baseer-OCR-V1.0

Описание изображенийИзображение → текст4 профессии

Baseer OCR V1.0 — дообученная на базе Qwen2-VL модель для распознавания и структурированного извлечения текста из арабских юридических документов.

285скачиваний за 30 дней0лайковвеса обновлены19 мар 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Распознавание текста» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Baseer OCR V1.0 — модель Абдельрахмана Тарека для распознавания арабских юридических документов. Она основана на Qwen2-VL-2B-Instruct и дообучена методом LoRA для извлечения текста из изображений договоров, судебных документов и официальных бумаг со сложной версткой.

Модель обрабатывает печатный и рукописный арабский текст, многостолбцовые страницы, таблицы, печати и пометки. Результат может включать извлеченный текст, ключевые слова и сведения о теме документа в структурированном JSON; поддерживаются инструкции для настройки извлечения. Для обучения использовался пользовательский набор арабских юридических документов, изображения предварительно масштабировались до 512×512 пикселей.

Модель доступна под лицензией Apache-2.0. README заявляет высокую точность на печатном арабском тексте, но не приводит численных результатов оценки; рекомендуемые требования к GPU — от 16 ГБ видеопамяти, хотя сообщается, что модель проверялась примерно на 8 ГБ.

Сценарии применения

  • распознавание текста в арабских договорах
  • извлечение текста из судебных документов
  • обработка многостолбцовых арабских страниц
  • извлечение таблиц, печатей и пометок из документов
  • выделение ключевых слов и темы арабского юридического документа

Ограничения

Численные результаты оценки качества не приведены; заявленная высокая точность относится к печатному арабскому тексту. В README указаны рекомендуемые 16 ГБ видеопамяти, хотя модель тестировалась примерно на 8 ГБ.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Baseer OCR V1.0 - Arabic Document OCR Model

Baseer OCR V1.0 is a fine-tuned version of Qwen/Qwen2-VL-2B-Instruct specifically designed for Optical Character Recognition (OCR) on complex Arabic legal documents.

🎯 Model Overview

AttributeValue
Base ModelQwen2-VL-2B-Instruct
Fine-tuning MethodLoRA (Rank: 48)
Training FrameworkLlamaFactory
Model TypeVision-Language Model (VLM)
LicenseApache 2.0
Release DateMarch 2025

📋 Model Description

Baseer OCR (بصير - meaning "reader" in Arabic) is specialized for extracting text from Arabic legal documents with complex layouts. This model builds upon Qwen2-VL's strong vision-language capabilities and is fine-tuned to handle:

  • 📜 Arabic Legal Documents - Contracts, court documents, official papers
  • 🔤 Complex Arabic Typography - Various fonts, sizes, and styles
  • 📄 Multi-column Layouts - Documents with complex structuring
  • 🖼️ Mixed Content - Documents with tables, stamps, and annotations
  • 🔍 Handwritten & Printed Text - Both typed and handwritten Arabic

Key Features

  • JSON Structured Output - Returns extracted text in structured JSON format
  • Arabic Language Support - Optimized for Arabic script recognition
  • Vision-Language Understanding - Combines visual understanding with language generation
  • Instruction Following - Responds to detailed extraction prompts

🚀 Quick Start

from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info
from PIL import Image

# Load the model
model = Qwen2VLForConditionalGeneration.from_pretrained(
    "AbdoTarek/Baseer-OCR-V1.0",
    torch_dtype="auto",
    device_map="auto"
).eval()

processor = AutoProcessor.from_pretrained("AbdoTarek/Baseer-OCR-V1.0")

# Prepare the image
image_path = "path_to_your_arabic_document.jpg"
image = Image.open(image_path)

# Create the prompt
prompt = """Extract ALL visible text from the document image.

Return the result strictly as JSON with this structure:

{
 "subject": "",
 "keywords": [],
 "full_text": ""
}

Rules:
- Do not repeat lines.
- Preserve original order of text.
- Do not add explanations."""

# Prepare messages
messages = [
    {
        "role": "system",
        "content": [{"type": "text", "text": "You are a helpful assistant."}]
    },
    {
        "role": "user",
        "content": [
            {"type": "image", "image": image},
            {"type": "text", "text": prompt}
        ]
    }
]

# Process and generate
text = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
image_inputs, _ = process_vision_info(messages)

inputs = processor(
    text=[text],
    images=image_inputs,
    padding=True,
    return_tensors="pt"
).to(model.device)

with torch.inference_mode():
    output_ids = model.generate(**inputs, max_new_tokens=1024)
    output_text = processor.batch_decode(
        output_ids[:, inputs.input_ids.shape[1]:],
        skip_special_tokens=True
    )[0]

print(output_text)

📊 Training Details

Dataset

  • Training Samples: Custom Arabic legal documents dataset
  • Data Format: ShareGPT format with image paths and OCR annotations
  • Preprocessing: Images resized to 512x512 pixels

Training Configuration

ParameterValue
StageSFT (Supervised Fine-tuning)
Fine-tuning TypeLoRA
LoRA Rank48
LoRA Dropout0.05
LoRA Targetall
Learning Rate1e-4
Epochs8
Batch Size1
Gradient Accumulation32
Warmup Ratio0.1
SchedulerCosine
PrecisionBF16

Hardware Requirements

  • GPU: Recommended 16GB+ VRAM (tested with ~8GB)
  • RAM: 16GB+ system RAM
  • Storage: 5GB+ for model files

💻 Usage Examples

Example 1: Extracting Text from Legal Contract

# Input: Image of Arabic legal contract
# Output: Structured JSON with subject, keywords, and full text

Example 2: Batch Processing

# Process multiple document images in a directory
import os
from glob import glob

image_files = glob("documents/*.jpg")
for img_path in image_files:
    # Process each image...

🔬 Model Performance

The model is optimized for Arabic legal document OCR and provides:

  • High accuracy on printed Arabic text
  • Structured JSON output for easy integration
  • Keyword extraction for document classification
  • Subject identification for document categorization

📝 Prompt Templates

The model responds well to detailed prompts. Recommended prompt structure:

Extract ALL visible text from the document image.

Return the result strictly as JSON with this structure:

{
 "subject": "",
 "keywords": [],
 "full_text": ""
}

Rules:
- Do not repeat lines.
- Preserve original order of text.
- Do not add explanations.

📚 Related Models

📄 License

This model is released under the Apache 2.0 license.

🙏 Acknowledgments

  • Qwen Team for the base Qwen2-VL model
  • LlamaFactory for the fine-tuning framework
  • Hugging Face for the model hub infrastructure

📧 Contact


Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen2VLForConditionalGeneration
Ревизия весов
511458b

0 моделей