edsr-x2-CoreAI / README.md
grabbou's picture
Add model card
abf97c6 verified
|
Raw History Blame Contribute Delete
1.36 kB
---
license: mit
pipeline_tag: image-to-image
library_name: coreai
tags:
- core-ai
- ios
- super-resolution
---
# EDSR x2 for Core AI
EDSR (`edsr_r16f64_x2`, 1.5M parameters) from [torchSR](https://github.com/Coloquinte/torchSR), exported to Apple Core AI with the [`apple/coreai-models`](https://github.com/apple/coreai-models/tree/main/models/edsr) recipe:
```sh
uv run models/edsr/export.py --dtype float16 --dynamic
```
| Folder | Contents | Size | Platforms |
| ----------------- | -------------------------------------------------------------- | ------ | ---------- |
| `edsr-x2.aimodel` | `main(x)`: `x` is `[batch, 3, height, width]` RGB in 0...1, float16, batch 1–64, height and width 8–256. Returns the image at twice the size | 2.6 MB | iOS, macOS |
Images larger than 256 pixels are upscaled in tiles.
## Use
With [`@react-native-ai/core-ai`](https://github.com/callstackincubator/ai/tree/main/packages/core-ai), download `edsr-x2.aimodel` into app storage, then call it with `CoreAI.runRawFunction`, or through `CoreAI.runTask('super-resolution', ...)`, which tiles and converts images for you.
## License
torchSR and its EDSR weights are MIT licensed ([EDSR paper](https://arxiv.org/abs/1707.02921)). This repository only converts them to Core AI format.