anuragranj / spynet

Spatial Pyramid Network for Optical Flow
Other
235 stars 48 forks source link

error in spynet.easycomputeflow #9

Closed rgp90 closed 6 years ago

rgp90 commented 7 years ago

Hi I tried to use this function for my image that type of them was torch.CudaTensor , but I faced error in imgs = image.scale(imgs, fineWidth, fineHeight) how can I solve this problem? Your answer is appreciated in advance.

anuragranj commented 7 years ago

image.scale uses torch's image library (https://github.com/torch/image) and works only on float tensors. You can convert your images to float using imgs:float() to make it work.

rgp90 commented 7 years ago

Thanks a lot. Can I also use cuimage (https://github.com/fartashf/cuimage.torch) ?

anuragranj commented 7 years ago

That's perfect. :+1:
You might have to change the image.scale functions to cuimage.scale appropriately for that.