EscVM / RAMS

Official TensorFlow code for paper "Multi-Image Super Resolution of Remotely Sensed Images Using Residual Attention Deep Neural Networks".
https://www.mdpi.com/2072-4292/12/14/2207
Apache License 2.0
81 stars 19 forks source link

Issue with register_dataset #16

Open yunseok624 opened 5 months ago

yunseok624 commented 5 months ago

Hi, When I launch the X_RED_train, X_RED_train_masks = register_dataset(X_RED_train, X_RED_train,masks) I get this issue:

RuntimeError Traceback (most recent call last) Cell In[6], line 2 1 # train registration ----> 2 X_RED_train, X_RED_train_masks = register_dataset(X_RED_train, X_RED_train_masks) 3 X_NIR_train, X_NIR_train_masks = register_dataset(X_NIR_train, X_NIR_train_masks)

File c:\Users\Юнсок\Desktop\Research\MISR_research\preprocessing.py:129, in register_dataset(X, masks) 126 masks_reg = [] 128 for i in tqdm(range(len(X))): --> 129 img_reg,m_reg = register_imgset(X[i], masks[i]) 130 X_reg.append(img_reg) 131 masks_reg.append(m_reg)

File c:\Users\Юнсок\Desktop\Research\MISR_research\preprocessing.py:155, in register_imgset(imgset, mask) 153 x = imgset[...,i]; m = mask[...,i] 154 s = phase_cross_correlation(ref, x, reference_mask = m) --> 155 x = shift(x, s, mode='reflect') 156 m = shift(m, s, mode='constant', cval=0) 157 imgset_reg[...,i] = x

File c:\Users\Юнсок\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\ndimage_interpolation.py:684, in shift(input, shift, output, order, mode, cval, prefilter) 682 filtered = input 683 mode = _ni_support._extend_mode_to_code(mode) --> 684 shift = _ni_support._normalize_sequence(shift, input.ndim) ... ---> 67 raise RuntimeError(err) 68 else: 69 normalized = [input] * rank

RuntimeError: sequence argument must have length equal to input rank

Anyone accounted such a problem?

Maxibugg commented 3 months ago

yes, me too. And i have no clue to resolve it

Maxibugg commented 2 months ago

looking closely to it, it's seem like a problem of librairie version causing trouble the the subfonction imgset.shape inside the programme preprocessing.py. However, i 'm not able to guarantee this analyze .

I still haven't a clue to what kind of remplacement can work and solve the problem, or wich version can solve the problem