• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v5 Water detection observations and UE's

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I'll see if I can reproduce this one as well. Seems to come from the machine learning algorithm while training, I haven't seen that before.
 
Messages
1,521
Country
unitedstates
I got the crash again twice with your pop up window to send in an error report. I did that twice, hopefully you got them. I can say I used the same script that I posted in the previous post. The only changes I made was in the K-Means step I changed the Cluster from 32 to 8. Tried two times and it crashed two times. I then changed the cluster to 16 and the script ran with no error (also at 32). Hope that helps.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Nope, I did not get any error reports. There are only two report from MCX in the last day. Let me check if something is broken with the error reporting.

Guess I need to vary the number of clusters as well then when trying to reproduce this issue.
 
Messages
1,521
Country
unitedstates
Mmmmm.... the pop-up shows my correct email and I click on 'Send Report'. Is there anything I can grab and post here should the pop-up shows again? Doing lot's of dedicated water detection over the next couple of weeks.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
If you can post the full stack trace, as you often do in the txt files, it helps me to debug.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

I have downloaded your data now and had a quick first look.

I can see what you mean with the NDWI instead of NDVI giving less good results (although I still get water detection). It seems NDWI alone has more difficulty differentiating water and shadows.

I haven't had any crashes yet, but I'll do some more testing later when I have more time.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
You might have seen that there are also USI and UWI steps available. These calculate an urban water index and urban shadow index. Two additional indices that I found in scientific papers. I did a quick test yesterday to see if adding them on top of NDWI and NDVI improves the detection. I would have to dig-up the papers in which I found those again to see how they are applied there.

But first I would like to see if I can reproduce the crashes that you reported.
 
Messages
1,521
Country
unitedstates
Well, so you won't get bored... another UE! :p

Was just trying different values in the K-Means to see results. FYI - just tested the same but changed The Cluster Center to UseInitialLabels and that too creashed.

UE5-water.jpg
 

Attachments

  • UE5-water.txt
    26 KB · Views: 56
Last edited:
Messages
1,521
Country
unitedstates
Ok, I just switch to 8 Clusters and got the Error Handling pop-up window.

"If you can post the full stack trace, as you often do in the txt files, it helps me to debug."

When this type error occurs I do not get the UE window to copy the stack trace. Is there someplace I can copy from an scenProc error log or something as I seem to be able to create this error every time.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
What value did you enter for the Scale parameter in the StdObject step? It seems to be that step that gives the overflow.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I found out that using UseInitialLabels for the center type in the KMeans step results in crashes, so I have removed that value from the choices now.

I'll continue tomorrow to see if I can find more crashes.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I have made some more small changes to make the steps more robust and hopefully reduce the crashes. A new build will be online in about 1 hour.

I also did some testing with water detection with the filter shown below. As you can see I added more indices. I have also changed the SVM kernel type as in my experience Rbf often gives better results. But it remains quite hard to separate the water and the shadows. The results are still not very stable. I think more sample points are needed to make it more stable.

1679126392464.png
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I came across this information:


I am checking now if such machine learning can be used for water detection in scenProc as well. This project using 6-band images, so it does not work directly on the 4-band images we have. But maybe I can retrain it for 4-band data as well. Would be interesting to figure out.
 
Messages
1,521
Country
unitedstates
ooooh, that looks promising. That's better results in picking up the white-water. And the canal water looks better too. I see the water below the bridge is still missing... that was an area I was having issues too. Sometimes, I find that can look pretty good not covering fully the whit-water at altitude.

Thx for posting your script as I will test that out on Monday. Curious as to how long the detection process took? When I run my script with the K-means cluster set at 32 it takes 23 minutes to run. At 16 clusters it cuts the time down to 13 minutes and not much difference better or worse. It takes me on average 3 hours to process 25 images (like the sample I sent ya). Which if it can produce near perfect detection would be worth it.

"What value did you enter for the Scale parameter in the StdObject step? It seems to be that step that gives the overflow"

If you are talking about the Std Deviation (object), the Scale is 1. I did not change that.

Curious, what are the other two bands for a 6-band image?
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I only tested in the TFE, so i did not do a real performance test for a full image.

I also reduce number of clusters to 10 and number of attempts to 5 in the KMeans speed to speed it up a bit.

The other two bands in the satellite imagery are two short wave Infrared frequencies.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I came across this information:


I am checking now if such machine learning can be used for water detection in scenProc as well. This project using 6-band images, so it does not work directly on the 4-band images we have. But maybe I can retrain it for 4-band data as well. Would be interesting to figure out.
I have not forgotten this topic. I am in the process of trying to understand the method used by deepwatermap and see if I can apply it to 4 band images as well (it uses 6-band LandSat images now). I guess it will take a while before I got some final results, but I will keep you posted.
 
Messages
1,521
Country
unitedstates
Great to hear. Presently working heavily in vector data, as you know. Probably getting back to water in about 3-4 weeks so the timing looks good to test more then.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Just a small update, I am not there yet but making progress. I have modified the DeepWaterMap script that I mentioned above so that it can work on 4 band imagery (RGB + NIR), the original script was designed for 6 band satelite imagery that includes three different types of infrared data.

Next I have made a training dataset based on imagery and reference water data that was available for the Netherlands (I found good vector data of water there, that I can use to train the algorithm on the images).

Training of the deep learning takes quite some time, so it is still running. But below are some intermediate results that do not look too bad to me. It is mainly the smaller streams that are not detected that well at the moment. The images show some results with Netherlands data, but also with US data that you mentioned before in this thread.

NL_in.png

NL_out.png


US_in.png

US_out.png
 
Messages
1,521
Country
unitedstates
That is definitely a step in the right direction. I like how where water was detected the bodies of water are fully covered. Not "speckled" with water and water holes. They look solidly covered in water. Especially at shorelines with trees at the shoreline or overhanging. Also, in your results I not seeing the little bits of water that are created in building/house shadows... that is huge.

I plan to get back into water in about a month so I will be ready to test. Should you need any additional difficult water imagery... let me know. I seem to be good at finding those, ha!
 
Top