How to read tiff images with lua torch -
i'm working tiff images, using torch train neural network , need load tiff images , there library in lua can read images tiff???
one possibility use torch opencv bindings (see blog post more details):
local cv = require 'cv' require 'cv.imgcodecs' local img = cv.imread{'myimage.tiff', cv.imread_color} -- note layout hxwxd -- can permute(3,1,2) work dxhxw
another possibility use graphicsmagick binding:
local gm = require 'graphicsmagick' local img = gm.image('myimage.tiff'):totensor('byte', 'rgb', 'dhw')