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

Classifier sand color option #176

Open
KatKonst opened this issue Feb 4, 2021 · 7 comments
Open

Classifier sand color option #176

KatKonst opened this issue Feb 4, 2021 · 7 comments
Labels
question Further information is requested

Comments

@KatKonst
Copy link

KatKonst commented Feb 4, 2021

Hi Kilian,
I am testing different classifier models and am curious as to how you created the classifier models for the different sand colour options. I am guessing the "default" options is the one derived directly from training the classifier as described in your papers, but I'm not quite sure how the other two models were derived.

This is a low priority question but it would be great if you found the time to get it...

Cheers
Kat

@kvos
Copy link
Owner

kvos commented Feb 6, 2021

hi kat,
I trained the classifier with different training datasets, for example the 'bright' sand, I digitsed pixels on beaches with extremely white sand. You can create training data and re-train de classifier following the instructions here https://github.com/kvos/CoastSat/blob/master/doc/train_new_classifier.md

@KatKonst
Copy link
Author

KatKonst commented Feb 6, 2021 via email

@KatKonst
Copy link
Author

KatKonst commented Feb 6, 2021

@kvos
Copy link
Owner

kvos commented Feb 9, 2021

hi Kat,

  1. The training data used for the default classifier, both L8 and S2 is contained in the github repo in these pickle files https://github.com/kvos/CoastSat/tree/master/classification/training_data. I think it's the same as the zenodo data but the format may have changed so better to use the files from the repo as they are the most updated.
  2. There's no reason for not creating different classifiers for S2 other than not having enough time ahaha
  3. So Landsat sensors were designed to be inter-comparable and suitable for time-series analysis, so when they are calibrated to Top-Of-Atmosphere, the reflectance values from L5, L7 or L8 for the same object should match. That was my initial reasoning for only training on L8 (easier to digitise pixels) and using the same classifier for the other two satellite. Having said that, I have noticed some inconsistencies, especially with the 'water' class on Landsat 7 images, and I think it could be caused by the fact that pansharpened bands are given as input for the classifier and L8 and L7 have a different panchromatic band. Let me know if you need more info on this.
  4. It looks like it's an issue with the shoreline detection, which is included in the evaluation function. You can go into the code of the evaluate_classifier() function and comment out all the lines that do the shoreline detection (577-598 & 615-616) as you only want to see the output of the classification (mapping the shorelines was just an extra). My guess from the error message is that the contours_mwi variable may be empty for some reason.

thanks, also it would be great if you could have a look at this #177 and maybe provide some of your observations as well

@KatKonst
Copy link
Author

Hi Kilian,
Thank you for your reply.

  1. Thanks, I'll check it out.
  2. Not enough time: tell me about it!
  3. I thought so. L8 B08 (panchromatic) is much narrower compared to L7 and does not include the NIR (L8: 0.5 - 0.68 μm; L7: 0.51 - 0.9μm). So I think that would explain discrepancies, especially over water. YES, I would like a bit more on that if possible.
  4. Thanks.
  5. I hope my comments to Wet/dry sand limit instead of the water/sand limit #177 are useful. It is a problem inherent to this type of beach environment that also baffled me for some time.

-Kat

@kvos kvos added the question Further information is requested label Feb 16, 2021
@kvos
Copy link
Owner

kvos commented Feb 17, 2021

  1. Yes that's probably the main issue with reusing the same classifier for L7 and L8. Currently, in the CoastSat pre-processing steps, the pan band is used to pansharpen B-G-R on L8 images and G-R-NIR on L7 images, as these are the bands that are covered by the respective pan bands. Now I don't know if that is actually the state of the art in terms of pansharpening L7 and L8 collections for time-series analysis. I will ask my colleague Tino as he told me once that he saw some artefacts in the intensities of the pansharpened water pixels for L7.

@kvos kvos mentioned this issue Mar 12, 2021
@kvos
Copy link
Owner

kvos commented Mar 12, 2021

problem 4. (evaluating the classifier) is fixed in the latest update #192

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

No branches or pull requests

2 participants