Metadata-Version: 2.1
Name: kotoha
Version: 0.1.0a1
Summary: Image-processing utilities with geometry primitives, I/O helpers, visualization tools, and typed model outputs.
Keywords: image-processing
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: opencv-python
Requires-Dist: numpy
Requires-Dist: pyyaml
Requires-Dist: xmltodict
Requires-Dist: shapely>=2.1.2
Requires-Dist: requests
Requires-Dist: pillow
Requires-Dist: tqdm
Provides-Extra: model
Requires-Dist: onnx; extra == "model"
Requires-Dist: onnxruntime; extra == "model"

# kotoha

`kotoha` is a small image-processing toolbox built around a stable set of geometry types, file helpers, visualization utilities, and typed model outputs.

## What Lives Where

- `kotoha`: minimal public API for stable geometry and detection result types
- `kotoha.typing`: geometry primitives and typed detection data structures
- `kotoha.io`: file and annotation helpers
- `kotoha.geo`: small geometry utilities
- `kotoha.visual`: drawing and display helpers
- `kotoha.model`: typed model outputs and Ultralytics-style ONNX wrappers

## Installation

Install the core toolbox:

```bash
pip install kotoha
```

Install model-related extras as well:

```bash
pip install "kotoha[model]"
```

## Quick Examples

### Geometry Types

```python
from kotoha import Point2f, Polygon, Rect

rect = Rect.from_xyxy(10, 20, 30, 40)
polygon = rect.to_polygon()
rotated = polygon.rotate_deg(90)
```

### File Helpers

```python
from kotoha.io import read_json, save_yaml

data = read_json("sample.json")
save_yaml("sample.yaml", data)
```

### Typed Model Results

```python
from kotoha import Detection, Rect

detection = Detection(
    box=Rect.from_xyxy(10, 20, 30, 40),
    score=0.95,
    class_id=1,
    label="person",
)
```

## Public API Policy

The top-level `kotoha` namespace is intentionally minimal. Import utility functions from their submodules, for example:

- `from kotoha.io import imread`
- `from kotoha.geo import rotate_points`
- `from kotoha.visual import draw_bbox`

This keeps the stable API surface small and makes module boundaries explicit.
