IMELE icon indicating copy to clipboard operation
IMELE copied to clipboard

Is the data out of bounds?

Open opee007 opened this issue 4 years ago • 4 comments

Hello, thanks for your nice work. The code ("depth = (depth*1000).astype(np.uint16)") is applied in the loaddata.py. As far as I know, the upper bound of uint16 is 65535, but some of the values of DSM multiplied by 1000 are greater than 65535 on the two ISPRS datasets, which I am confused about.

opee007 avatar Jan 13 '21 02:01 opee007

Hi opee Have a peep in nyu_transform.py the line:294

depth = self.to_tensor(depth)/100000 When images converted to tensor I divided into 100000. If you want to try to train your own dataset please modify it to fit your purpose as not all DSM are in meter.

speed8928 avatar Jan 13 '21 13:01 speed8928

Hi, thank you a lot for your reply, the values of DSM on the Vaihingen dataset are about 200~300. For instance, the values output by the code below are incorrect. a = np.array(250*1000).astype(np.uint16) / 100000 print("a:", a)

a: 0.53392

In fact, a should be 2.5. Do you preprocess the original DSM, such as subtract a certain value from the original DSM on the Vaihingen dataset?

opee007 avatar Jan 14 '21 03:01 opee007

Try a = np.array(250*1000).astype(np.uint16) a = a / 100000

yes, you need to normalize the DSM by subtracting DTM.

speed8928 avatar Jan 15 '21 23:01 speed8928

Do you directly use DSM Normalisation data in the ISPRS dataset for training? How do you convert this data unit into meters?

Neroaway avatar May 11 '22 03:05 Neroaway