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
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