That image does not look like the original though, because it is resized with the "area-based" interpolation method.
(see here: https://cv.gluon.ai/_modules/gluoncv/data/transforms/image.html#resize_short_within)
With that method, values are outside of the 0-255 range and then, when astype('uint8') is applied, the image values over/underflow:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
When using the function
load_test()
ortransform_test()
there is a return valueorigs
: "a numpy ndarray as original un-normalized color image for display." (see here: https://cv.gluon.ai/_modules/gluoncv/data/transforms/presets/yolo.html)That image does not look like the original though, because it is resized with the "area-based" interpolation method. (see here: https://cv.gluon.ai/_modules/gluoncv/data/transforms/image.html#resize_short_within) With that method, values are outside of the 0-255 range and then, when
astype('uint8')
is applied, the image values over/underflow:When applying functions afterwards, like
gluoncv.utils.viz.plot_bbox()
, the image looks incorrect at some spots.