Cheers, yes that's a good question.  I'm applying 2d motion vectors to some
convnet activations, which towards the deeper layers of a network tend to
be very small (but also many of them).

My 2d motion vectors are from Renderman and are 1080p.  Thinking about it,
it would probably make more sense to just resize these down to the tiny
size, as these images are not really "images" in the usual sense but really
just floating point filter activations.

oiio has been a blessing for my deep learning research btw, most of the
image libraries used in the context of Pytorch treat images as some limited
visualisation of data, rather than *the data* like exrs do.  I'd be really
stumped without it, so thanks!

cheers,
Dan

On Fri, 30 Jul 2021 at 12:07, Larry Gritz <l...@larrygritz.com> wrote:

> Have you tried all the choices of specifying which filter you'd like
> resize to use?
>
>     buf = oiio.ImageBufAlgo.resize(buf, roi=roi, filtername="blah")
>
> That's a pretty extreme resizing of low-res data, almost 18x, of data with
> high-contrast edges. I'm wondering what you hope for it to look like under
> even the best of circumstances?
>
> PS. `oiiotool --help` will, somewhere near the bottom, tell you the name
> of all the filters supported.
>
>
> On Jul 29, 2021, at 5:25 PM, Daniel Flood <daniel.flood...@gmail.com>
> wrote:
>
> Hi folks,
>
> I'm resizing an unusually small image (some convnet filter activations)
> from 72x40 to 1280x720.  When I do, I get an excessive dilation or
> softening, which I suspect is from the default filter being applied.
>
> What options are there in terms of filter names?  From digging around the
> api docs I haven't been able to find them.
>
> left image: the 72x40 pixel image
> right image: rescaled to 720p in oiio
>
> <image.png>
>
>     buf = ImageBuf(ImageSpec(y, x, 1, oiio.FLOAT))
>     buf.set_pixels(ROI(), npAarray)
>     roi = ROI(0, 1280, 0, 720, 0, 1, 0, 3)
>     buf = oiio.ImageBufAlgo.resize(buf, roi=roi)
>
> cheers
> _______________________________________________
> Oiio-dev mailing list
> Oiio-dev@lists.openimageio.org
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
>
> --
> Larry Gritz
> l...@larrygritz.com
>
>
>
>
> _______________________________________________
> Oiio-dev mailing list
> Oiio-dev@lists.openimageio.org
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to