Skip to content

Commit b639600

Browse files
committed
Add IMGPROXY_OBJECT_DETECTION_SWAP_RB config docs
1 parent a102ec4 commit b639600

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

docs/configuration/options.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ imgproxy can detect objects on the image and use them to perform smart cropping,
360360
* [`IMGPROXY_OBJECT_DETECTION_NET_SIZE`]: ((pro)) the size of the neural network input. The width and the heights of the inputs should be the same, so this config value should be a single number. Default: 416
361361
* [`IMGPROXY_OBJECT_DETECTION_CONFIDENCE_THRESHOLD`]: ((pro)) detections with confidences below this value will be discarded. Default: 0.2
362362
* [`IMGPROXY_OBJECT_DETECTION_NMS_THRESHOLD`]: ((pro)) non-max supression threshold. Don't change this if you don't know what you're doing. Default: 0.4
363+
* [`IMGPROXY_OBJECT_DETECTION_SWAP_RB`]: when set to `true`, imgproxy will swap the R and B channels in the input image. Some models are trained on BGR images and perform incorrectly with RGB inputs. This option allows you to fix this issue. Default: `false`
363364
* [`IMGPROXY_OBJECT_DETECTION_FALLBACK_TO_SMART_CROP`]: ((pro)) defines imgproxy's behavior when object-oriented crop gravity is used but no objects are detected. When set to `true`, imgproxy will fallback to smart crop. When set to `false`, imgproxy will fallback to the center gravity. Default: `true`
364365

365366
Read the [Object Detection guide](../features/object_detection.mdx) for more info.

docs/features/object_detection.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ You need to define the following config variables to enable object detection wit
229229
* [`IMGPROXY_OBJECT_DETECTION_NET_SIZE`]: the size of the neural network input. The inputs' width and heights should be the same, so this config value should be a single number. Default: 416
230230
* [`IMGPROXY_OBJECT_DETECTION_CONFIDENCE_THRESHOLD`]: detections with confidence below this value will be discarded. Default: 0.2
231231
* [`IMGPROXY_OBJECT_DETECTION_NMS_THRESHOLD`]: non-max supression threshold. Don't change this if you don't know what you're doing. Default: 0.4
232+
* [`IMGPROXY_OBJECT_DETECTION_SWAP_RB`]: when set to `true`, imgproxy will swap the R and B channels in the input image. Some models are trained on BGR images and perform incorrectly with RGB inputs. This option allows you to fix this issue. Default: `false`
232233
* [`IMGPROXY_OBJECT_DETECTION_FALLBACK_TO_SMART_CROP`]: ((pro)) defines imgproxy's behavior when object-oriented crop gravity is used but no objects are detected. When set to `true`, imgproxy will fallback to smart crop. When set to `false`, imgproxy will fallback to the center gravity. Default: `true`
233234

234235
### Class names file

0 commit comments

Comments
 (0)