Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the data out of bounds? #8

Open
opee007 opened this issue Jan 13, 2021 · 4 comments
Open

Is the data out of bounds? #8

opee007 opened this issue Jan 13, 2021 · 4 comments

Comments

@opee007
Copy link

opee007 commented Jan 13, 2021

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.

@speed8928
Copy link
Owner

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.

@opee007
Copy link
Author

opee007 commented Jan 14, 2021

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?

@speed8928
Copy link
Owner

speed8928 commented Jan 15, 2021

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

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

@Neroaway
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants