You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-4-preview/configuration/options.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,12 +259,12 @@ Autoquality requires the image to be saved several times. Use it only when you p
259
259
*[`IMGPROXY_AUTOQUALITY_FORMAT_MIN`]: ((pro)) the minimal quality imgproxy can use per format, comma divided. Example: `jpeg=70,avif=40,webp=60`. When value for the resulting format is not set, `IMGPROXY_AUTOQUALITY_MIN` value is used. Default: `avif=60`
260
260
*[`IMGPROXY_AUTOQUALITY_MAX`]: ((pro)) the maximum quality imgproxy can use. Default: 80
261
261
*[`IMGPROXY_AUTOQUALITY_FORMAT_MAX`]: ((pro)) the maximum quality imgproxy can use per format, comma divided. Example: `jpeg=70,avif=40,webp=60`. When a value for the resulting format is not set, the `IMGPROXY_AUTOQUALITY_MAX` value is used. Default: `avif=65`
262
-
*[`IMGPROXY_AUTOQUALITY_ALLOWED_ERROR`]: ((pro)) the allowed `IMGPROXY_AUTOQUALITY_TARGET` error. Applicable only to `dssim` and `ml` methods. Default: 0.001
262
+
*[`IMGPROXY_AUTOQUALITY_ALLOWED_ERROR`]: ((pro)) the allowed `IMGPROXY_AUTOQUALITY_TARGET` error. Applicable only to `dssim` and `ml` methods. Default: 0.002
263
263
*[`IMGPROXY_AUTOQUALITY_MAX_RESOLUTION`]: ((pro)) when this value is greater then zero and the resultant resolution exceeds the value, autoquality won't be used. Default: 0
264
-
*[`IMGPROXY_AUTOQUALITY_JPEG_NET`]: ((pro)) the path to the neural network for JPEG.
265
-
*[`IMGPROXY_AUTOQUALITY_WEBP_NET`]: ((pro)) the path to the neural network for WebP.
266
-
*[`IMGPROXY_AUTOQUALITY_AVIF_NET`]: ((pro)) the path to the neural network for AVIF.
267
-
*[`IMGPROXY_AUTOQUALITY_JXL_NET`]: ((pro)) the path to the neural network for JPEG XL.
264
+
*[`IMGPROXY_AUTOQUALITY_JPEG_NET`]: ((pro)) the path to the neural network model for JPEG.
265
+
*[`IMGPROXY_AUTOQUALITY_WEBP_NET`]: ((pro)) the path to the neural network model for WebP.
266
+
*[`IMGPROXY_AUTOQUALITY_AVIF_NET`]: ((pro)) the path to the neural network model for AVIF.
267
+
*[`IMGPROXY_AUTOQUALITY_JXL_NET`]: ((pro)) the path to the neural network model for JPEG XL.
268
268
269
269
## SVG processing
270
270
*[`IMGPROXY_ALWAYS_RASTERIZE_SVG`]: when `true`, imgproxy will always rasterize SVG images unless SVG processing is not [skipped](#skip-processing). Default: `false`
This method is almost the same as autoquality with [DSSIM](#autoquality-by-dssim) but imgproxy will try to predict the initial quality using neural networks. This requires neural networks to be configured (see the config examlpe or the config documentation). If a neural network for the resulting format is not provided, the [DSSIM](#autoquality-by-dssim) method will be used instead.
91
+
This method is almost the same as autoquality with [DSSIM](#autoquality-by-dssim), but imgproxy will try to predict the initial quality using neural network models. This requires configuring neural network models (see the config example or the config documentation). If a model for the resulting format is not provided, the [DSSIM](#autoquality-by-dssim) method will be used instead.
92
+
93
+
:::tip
94
+
You don't need to configure autoquality neural network models if you're using an imgproxy Pro Docker image with a tag suffixed with `-ml`. Such images already have the models for JPEG, WebP, AVIF, and JPEG XL included and configured.
95
+
:::
92
96
93
97
:::info
94
98
When this method is used, imgproxy will save JPEG images with the most optimal [advanced JPEG compression](../configuration/options.mdx#advanced-jpeg-compression) settings, ignoring config and processing options.
@@ -111,15 +115,15 @@ IMGPROXY_AUTOQUALITY_MAX=80
111
115
# Quality 63 for AVIF is pretty the same as 80 for JPEG
112
116
IMGPROXY_AUTOQUALITY_FORMAT_MIN="avif=60"
113
117
IMGPROXY_AUTOQUALITY_FORMAT_MAX="avif=65"
114
-
# Neural networks paths for JPEG, WebP, AVIF, and JPEG XL
If you trust your neural network's autoquality, you may want to set `IMGPROXY_AUTOQUALITY_ALLOWED_ERROR` to 1 (the maximum possible DSSIM value). In this case, imgproxy will always use the quality predicted by the neural network.
126
+
If you trust your neural network model's autoquality, you may want to set `IMGPROXY_AUTOQUALITY_ALLOWED_ERROR` to 1 (the maximum possible DSSIM value). In this case, imgproxy will always use the quality predicted by the neural network model.
123
127
:::
124
128
125
129
### Processing options example
@@ -128,12 +132,11 @@ If you trust your neural network's autoquality, you may want to set `IMGPROXY_AU
128
132
.../autoquality:ml:0.02:70:80:0.001/...
129
133
```
130
134
131
-
## Neural networks format
135
+
## Neural network models format
132
136
133
-
Neural networks should fit the following requirements:
134
-
* Tensorflow frozen graph format
135
-
* Input layer size is 416x416
136
-
* Output layer size is 1x100
137
-
* Output layer values are logits of quality probabilities
137
+
Neural network models should fit the following requirements:
138
+
* ONNX format
139
+
* Input layer size is 256x256x3 (RGB pixels normalized to [0..1])
140
+
* Output layer size is 1 (the predicted quality value in the [0..1] range)
138
141
139
-
If you're an imgproxy Pro user and you want to train your own network but you don't know how, feel free to contact the imgproxy team for instructions.
142
+
If you're an imgproxy Pro user and you want to train your own model but you don't know how, feel free to contact the imgproxy team for instructions.
0 commit comments