semvec/pypi-packages huggingface dataset:
layout-visualizer 1.0.1
Easily draw layout BBoxes
License: MIT
Requires Python: <4.0,>=3.8

# layout-visualizer

[![PyPI version](https://badge.fury.io/py/layout-visualizer.svg)](https://badge.fury.io/py/layout-visualizer) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)

Easily draw layout BBoxes



## Features

- Easily draw labeled BBoxes
  - Draw labels without overlap
- Low dependency
  - Only depends on `Pillow` and `Pydantic`



## Installation

```bash
pip install layout-visualizer
```



## Getting started

See [example notebook](./example.ipynb) for more details

```python
from layout_visualizer import draw_label_bboxes

image = ...  # Load PIL Image
label_bboxes = [
    ("Background Color", (0, 0, 1080, 1080)),
    ("BG Color", (0, 0, 1080, 1080)),
    ("Shadow", (0, 0, 1080, 1080)),
    ("Object 1", (138, 426, 942, 870)),
]
draw_label_bboxes(image, label_bboxes, font_size=20, line_width=5)
```

<img src="https://github.com/shunyooo/layout-visualizer/assets/17490886/6d79b894-405b-48fe-9661-5c672b2b5690" height=512/>

<sub>(Using psd from <a href="https://jp.freepik.com/free-psd/ramadan-mubarak-islamic-greetings-social-media-post-template_126726406.htm#&position=25&from_view=popular&uuid=7b635cda-4b7e-49a3-ba99-bc9537795d6f">Author: xvector</a> / Dictionary: Freepik)</sub>
sparv-sbx-ocr-correction-viklofg-sweocr 0.5.1
A sparv plugin for computing suggested OCR improvements.
License: MIT
Requires Python: >=3.9

# sparv-sbx-ocr-correction

[![PyPI version](https://badge.fury.io/py/sparv-sbx-ocr-correction-viklofg-sweocr.svg)](https://pypi.org/project/sparv-sbx-ocr-correction-viklofg-sweocr)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sparv-sbx-ocr-correction-viklofg-sweocr)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/sparv-sbx-ocr-correction-viklofg-sweocr)](https://pypi.org/project/sparv-sbx-ocr-correction-viklofg-sweocr/)

[![Maturity badge - level 2](https://img.shields.io/badge/Maturity-Level%202%20--%20First%20Release-yellowgreen.svg)](https://github.com/spraakbanken/getting-started/blob/main/scorecard.md)
[![Stage](https://img.shields.io/pypi/status/sparv-sbx-ocr-correction-viklofg-sweocr)](https://pypi.org/project/sparv-sbx-ocr-correction-viklofg-sweocr)

[![CI(release)](https://github.com/spraakbanken/sparv-sbx-ocr-correction/actions/workflows/release-viklofg-sweocr.yml/badge.svg)](https://github.com/spraakbanken/sparv-sbx-ocr-correction/actions/workflows/release-viklofg-sweocr.yml)

Sparv plugin to annotate corrections to OCR:ed documents.

## Install

> [!NOTE] You might need to prepend `export CFLAGS="-Wno-error=incompatible-pointer-types" ; export CXXFLAGS="-Wno-error=incompatible-pointer-types" ;` to the `pip install` call.


In a virtual environment:

```bash
pip install sparv-sbx-ocr-correction-viklofg-sweocr
```

or if you have `sparv` installed with `pipx`:

```bash
pipx inject sparv-pipeline sparv-sbx-ocr-correction-viklofg-sweocr
```

## Metadata

### Model

Type | HuggingFace Model | Revision
--- | --- | ---
Model | [`viklofg/swedish-ocr-correction`](https://huggingface.co/viklofg/swedish-ocr-correction) | 84b138048992271be7617ccb11056bbcb9b72262
Tokenizer | [`google/byt5-small`](https://huggingface.co/google/byt5-small) | 68377bdc18a2ffec8a0533fef03b1c513a4dd49d

## Supported Python versions

This library thrives to support a Python version to End-Of-Life, and will at
least bump the minor version when support for a Python version is dropped.

The following versions of this library supports these Python versions:

- v0.4: Python 3.9
- v0.3: Python 3.8

## Changelog

This project keeps a [changelog](./CHANGELOG.md).