[documentation] parameter "scale" for image input connector may be misleading
Bycob opened this issue · comments
Documentation
In backend torch, we use the parameter scale
to scale all the pixel values of the images, however, in documentation scale
is presented as follow:
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
scale | float | yes | 1.0 | whether to scale the size of an image |
Is the behavior in other backends (caffe for example) similar to torch ? If so, I can update the doc
scale
in the generic image input connector does resize the image, here: https://github.com/jolibrain/deepdetect/blob/master/src/imginputfileconn.h#L173
I don't see it used differently in torch, is it ?
It's used here in the torchinputconnector, and the behavior is the one I described before.
The generic image input connector seems to rescale the image according to _scale_min
and _scale_max
, and does not use the parameter _scale
Image scaling appears to mean resizing: https://en.wikipedia.org/wiki/Image_scaling
Now, it seems confusion is arising from scale_min
and scale_max
being used to resize images, and scale
being used to modify pixels by a constant factor. Maybe fixing the documentation at this stage is enough, and that'd be a good catch.
It actually doesn't make sense to use scale
as a single factor for image resizing since neural net inputs are fixed.
Also not that width
and height
are the most common options to force the size of an image, so scale_min
and scale_max
could possibly be removed ? They do not appear to be actually used by the torch backend.
I agree to remove scale_min
and scale_max
if they are not used, since neural nets generally require fixed input size (to my knowledge) width
and height
seem to be sufficient.
So we can keep scale
for multiplication of pixels values by a constant factor, and remove scale_min
& scale_max
if they are not used by dd?
_scale_min
and _scale_max
were added in this commit