Metadata-Version: 2.1
Name: moveread-ocr
Version: 0.1.22
Summary: Moveread OCR model, in tensorflow
Author-email: Marcel Claramunt <marcel@moveread.com>
Project-URL: repo, https://github.com/moveread/moveread-ocr.git
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: tensorflow
Requires-Dist: keras
Requires-Dist: jaxtyping
Requires-Dist: haskellian
Requires-Dist: tf-ctc
Requires-Dist: demetric
Requires-Dist: checkptr
Requires-Dist: tensorflow-records
Requires-Dist: tf-tools
Provides-Extra: cli
Requires-Dist: typer ; extra == 'cli'
Requires-Dist: orjson ; extra == 'cli'
Requires-Dist: ocr-dataset ; extra == 'cli'
Requires-Dist: files-dataset ; extra == 'cli'

# Moveread OCR

## CLIs

### Data Exporting

```bash
ocr records boxes 'data/ocr-dataset/**/*' -vo path/to/tfrecords
ocr records samples 'data/ocr-dataset/**/*' -vo path/to/tfrecords
```

### Inference

```bash
ocr predict -v --weights model.weights.h5 --data path/to/tfrecords > top-preds.ndjson
```

### Finetuning

```bash
ocr finetune -vw model.weights.h5 --train path/to/tfrecords --val path/to/tfrecords \
  --epochs 20 --batch-size 32 --lr 0.001
```

### Evaluation

```bash
ocr evaluate -vw model.weights.h5 -d path/to/tfrecords
```

### Serving Export

```bash
ocr export -vw model.weights.h5 -o path/to/SavedModel
```
