Vandermode / QRNN3D

3D Quasi-Recurrent Neural Network for Hyperspectral Image Denoising (TNNLS 2020)
66 stars 19 forks source link

Denoising Hyperspectral Image from Satellite #1

Closed harshdeep2088 closed 3 years ago

harshdeep2088 commented 4 years ago

Hello Kaixuan Wei,

I was using your code to denoise a 17 band Hyperspectral/Multispectral Satellite image of dimensions (229,334,17) which is really noisy. I had downloaded your Pretrained models for gaussian and mixed noise removal.

  1. I am facing issue on how to Input my image to your network and use your Pretrained Models so that it can give me denoised image.
  2. Is there any preprocessing required to input my Hyperspectral image to your network.

Can you please guide me on how to use your code to input my image. I am attaching my image as well for better understanding IMAGE.zip

Vandermode commented 4 years ago

Hi, we have updated the code. Now you can use python hsi_test.py -a qrnn3d -p gauss -r -rp checkpoints/qrnn3d/gauss/model_epoch_50_118454.pth to test your Satellite data (note we have incorporated it as a demo data in this code repo)

puneetarora2000 commented 4 years ago

Dear Vandermode

I m sending these parameters but, I m getting an error

(arch='qrnn3d', batchSize=16, chop=False, clip=1000000.0, dataroot='My Drive/data/Satellite/IMAGE.mat', gpu_ids=[0], init='kn', loss='l2', lr=0.001, no_cuda=False, no_log=False, no_ropt=False, prefix='gauss', resume=False, resumePath='/checkpoints/qrnn3d/gauss/model_epoch_50_118454.pth', seed=2018, threads=8, wd=0)

RuntimeError: Expected tensor for argument #1 'input' to have the same type as tensor for argument #2 'weight'; but type torch.cuda.DoubleTensor does not equal torch.cuda.FloatTensor (while checking arguments for cudnn_batch_norm)

How do I resolve this issue

Vandermode commented 4 years ago

Hi, before feeding your data into the network, you need to change its type from double64 to float32, otherwise the error type torch.cuda.DoubleTensor does not equal torch.cuda.FloatTensor would occur