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?