PngTorch++: A CMake based integration of the libpng / png++ libraries with Libtorch C++

Hello,
I wrote a small library for C++ users who want to avoid using OpenCV.
The integration allows one to easily read images and convert them into PyTorch C++ front-end tensors and vice versa.

Hope it is useful to others,
Best,

1 Like

Thanks for sharing it! :slight_smile:
Does the current solution allow to read the images only or could you transform them as well (using another lib)?

1 Like

Both reading and writing PNG’s, finished testing it fully yesterday. There was a problem with saving tensors that returned from models. Now it’s done, works for RGB and RGBA.

Using in in my other project:(https://github.com/QuantScientist/Siv3DTorch)
inference007

Best,