Upload image postprocess ONNX models
Browse files- .gitattributes +2 -0
- README.md +27 -0
- RealESR_Gx4_fp16.onnx +3 -0
- RestoreFormer_PP.onnx +3 -0
- face_detection_yunet_2023mar.onnx +3 -0
- metadata.json +56 -0
- real_esrgan_general_x4v3.data +3 -0
- real_esrgan_general_x4v3.onnx +3 -0
- real_esrgan_x4plus.data +3 -0
- real_esrgan_x4plus.onnx +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
real_esrgan_general_x4v3.data filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
real_esrgan_x4plus.data filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: onnxruntime
|
| 3 |
+
tags:
|
| 4 |
+
- onnx
|
| 5 |
+
- onnxruntime
|
| 6 |
+
- image-restoration
|
| 7 |
+
- image-upscaling
|
| 8 |
+
- face-restoration
|
| 9 |
+
- laria
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Image postprocess ONNX models
|
| 13 |
+
|
| 14 |
+
ONNX post-processing models used by Laria/image generation tooling.
|
| 15 |
+
|
| 16 |
+
## Files
|
| 17 |
+
|
| 18 |
+
- `RestoreFormer_PP.onnx`: face restoration model.
|
| 19 |
+
- `face_detection_yunet_2023mar.onnx`: YuNet face detector used before restoration/alignment.
|
| 20 |
+
- `RealESR_Gx4_fp16.onnx`: lightweight Real-ESRGAN x4 upscaler variant used by the current scripts.
|
| 21 |
+
- `real_esrgan_general_x4v3.onnx` + `real_esrgan_general_x4v3.data`: quantized Real-ESRGAN general x4v3 package.
|
| 22 |
+
- `real_esrgan_x4plus.onnx` + `real_esrgan_x4plus.data`: Real-ESRGAN x4plus package.
|
| 23 |
+
- `metadata.json`: source/runtime metadata for `real_esrgan_general_x4v3`.
|
| 24 |
+
|
| 25 |
+
## Expected pipeline
|
| 26 |
+
|
| 27 |
+
For generated images, run face restoration first at generation resolution, then upscale the restored image. This keeps the face restoration localized and lets the upscaler harmonize the restored face with the rest of the image.
|
RealESR_Gx4_fp16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b55a4d0ce37e1812d5306911890cd0b1f174a4adcb7bdd4ed6a6f6318b14be1
|
| 3 |
+
size 2445042
|
RestoreFormer_PP.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4db5a89902b6a2d452446f5721245a6f7185f699b6aec7b77285adb4d504337
|
| 3 |
+
size 294264812
|
face_detection_yunet_2023mar.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f2383e4dd3cfbb4553ea8718107fc0423210dc964f9f4280604804ed2552fa4
|
| 3 |
+
size 232589
|
metadata.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_id": "real_esrgan_general_x4v3",
|
| 3 |
+
"model_name": "Real-ESRGAN-General-x4v3",
|
| 4 |
+
"runtime": "onnx",
|
| 5 |
+
"precision": "w8a8",
|
| 6 |
+
"tool_versions": {
|
| 7 |
+
"qairt": "2.42.0.251225135753_193295",
|
| 8 |
+
"onnx_runtime": "1.24.3"
|
| 9 |
+
},
|
| 10 |
+
"model_files": {
|
| 11 |
+
"real_esrgan_general_x4v3.onnx": {
|
| 12 |
+
"inputs": {
|
| 13 |
+
"image": {
|
| 14 |
+
"shape": [
|
| 15 |
+
1,
|
| 16 |
+
3,
|
| 17 |
+
128,
|
| 18 |
+
128
|
| 19 |
+
],
|
| 20 |
+
"dtype": "uint8",
|
| 21 |
+
"quantization_parameters": {
|
| 22 |
+
"scale": 0.003921568859368563,
|
| 23 |
+
"zero_point": 0
|
| 24 |
+
},
|
| 25 |
+
"io_type": "image",
|
| 26 |
+
"image_metadata": {},
|
| 27 |
+
"value_range": [
|
| 28 |
+
0.0,
|
| 29 |
+
1.0
|
| 30 |
+
]
|
| 31 |
+
}
|
| 32 |
+
},
|
| 33 |
+
"outputs": {
|
| 34 |
+
"upscaled_image": {
|
| 35 |
+
"shape": [
|
| 36 |
+
1,
|
| 37 |
+
3,
|
| 38 |
+
512,
|
| 39 |
+
512
|
| 40 |
+
],
|
| 41 |
+
"dtype": "uint8",
|
| 42 |
+
"quantization_parameters": {
|
| 43 |
+
"scale": 0.004972138907760382,
|
| 44 |
+
"zero_point": 25
|
| 45 |
+
},
|
| 46 |
+
"io_type": "image",
|
| 47 |
+
"image_metadata": {},
|
| 48 |
+
"value_range": [
|
| 49 |
+
0.0,
|
| 50 |
+
1.0
|
| 51 |
+
]
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
}
|
real_esrgan_general_x4v3.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f182ee514b1c848f99ffc09587be672b069c88791c7bf4616fc9071420550e0d
|
| 3 |
+
size 4836096
|
real_esrgan_general_x4v3.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7deb98de7beac5387977aa44135ad4428d3f9509b82f4175cad1d3f1ec5bdcbe
|
| 3 |
+
size 121393
|
real_esrgan_x4plus.data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:46c0039288eb2e4dbb6fd78dd51215159a035fa3b2363866dc3bfc2997fd77e5
|
| 3 |
+
size 66737664
|
real_esrgan_x4plus.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:554781458dcf10bc6ba256d362096e4633d3883fe82d30ff92e7fc0e398b6ca4
|
| 3 |
+
size 1473168
|