diff options
| author | sniklaus <simon.niklaus@outlook.com> | 2018-02-02 18:07:32 -0800 |
|---|---|---|
| committer | sniklaus <simon.niklaus@outlook.com> | 2018-02-02 18:07:32 -0800 |
| commit | 2dfafe809a5c800ae11b22eb4bc7de0ac3e549a3 (patch) | |
| tree | 3fe110f857c8c9b057c043f73fd8961330178cca | |
| parent | c95e95774af6473f6866237b3e6f16f0d7ad225e (diff) | |
no message
| -rw-r--r-- | run.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -170,8 +170,8 @@ moduleNetwork = Network().cuda() ########################################################## -tensorInputFirst = torch.FloatTensor(numpy.rollaxis(numpy.asarray(PIL.Image.open(arguments_strFirst))[:,:,::-1], 2, 0).astype(numpy.float32) / 255.0) -tensorInputSecond = torch.FloatTensor(numpy.rollaxis(numpy.asarray(PIL.Image.open(arguments_strSecond))[:,:,::-1], 2, 0).astype(numpy.float32) / 255.0) +tensorInputFirst = torch.FloatTensor(numpy.rollaxis(numpy.asarray(PIL.Image.open(arguments_strFirst))[:, :, ::-1], 2, 0).astype(numpy.float32) / 255.0) +tensorInputSecond = torch.FloatTensor(numpy.rollaxis(numpy.asarray(PIL.Image.open(arguments_strSecond))[:, :, ::-1], 2, 0).astype(numpy.float32) / 255.0) tensorOutput = torch.FloatTensor() assert(tensorInputFirst.size(1) == tensorInputSecond.size(1)) @@ -232,4 +232,4 @@ if True: tensorOutput = tensorOutput.cpu() # end -PIL.Image.fromarray((numpy.rollaxis(tensorOutput.clamp(0.0, 1.0).numpy(), 0, 3)[:,:,::-1] * 255.0).astype(numpy.uint8)).save(arguments_strOut)
\ No newline at end of file +PIL.Image.fromarray((numpy.rollaxis(tensorOutput.clamp(0.0, 1.0).numpy(), 0, 3)[:, :, ::-1] * 255.0).astype(numpy.uint8)).save(arguments_strOut)
\ No newline at end of file |
