Add README
Browse files
README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: bsd-3-clause
|
| 3 |
+
tags:
|
| 4 |
+
- coreml
|
| 5 |
+
- super-resolution
|
| 6 |
+
- real-esrgan
|
| 7 |
+
- image-upscaling
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Real-ESRGAN CoreML
|
| 11 |
+
|
| 12 |
+
CoreML conversion of [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) (RealESRGAN_x4plus) for use in macOS/iOS apps.
|
| 13 |
+
|
| 14 |
+
## Model
|
| 15 |
+
|
| 16 |
+
- **Architecture**: RRDBNet (23 RRDB blocks, 64 features, 32 growth channels)
|
| 17 |
+
- **Scale**: 4x upscaling
|
| 18 |
+
- **Precision**: Float16
|
| 19 |
+
- **Input**: `(1, 3, 256, 256)` — RGB normalized [0, 1]
|
| 20 |
+
- **Output**: `(1, 3, 1024, 1024)` — RGB [0, 1]
|
| 21 |
+
- **Size**: ~33 MB (mlpackage), ~30 MB (zip)
|
| 22 |
+
- **Target**: macOS 15+
|
| 23 |
+
|
| 24 |
+
## Usage
|
| 25 |
+
|
| 26 |
+
Download `RealESRGAN-x4plus.mlpackage.zip`, unzip, then compile:
|
| 27 |
+
|
| 28 |
+
```swift
|
| 29 |
+
let compiledURL = try MLModel.compileModel(at: mlpackageURL)
|
| 30 |
+
let model = try MLModel(contentsOf: compiledURL)
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
For images larger than 256x256, use tile-based processing with overlap padding.
|
| 34 |
+
|
| 35 |
+
## License
|
| 36 |
+
|
| 37 |
+
BSD-3-Clause (same as original Real-ESRGAN)
|
| 38 |
+
|
| 39 |
+
## Credits
|
| 40 |
+
|
| 41 |
+
- Original model: [xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN)
|
| 42 |
+
- Converted for [Fluxforge Studio](https://fluxforge.app)
|