Supervised Classification with Sentinel 2 Satellite Images | Earth Engine | Machine Learning
Learn more: spatialelearning.com
Enroll in the full course: bit.ly/earth-engine-mega-course
Subscribe to our channel for more tutorials: / spatialelearning
In this tutorial, we will discuss how to apply supervised machine learning classification with Sentinel 2 images in Google Earth Engine.
In this tutorial, you will learn how to:
1. Import Sentinel 2 data from the Google Earth Engine data library
2. Create the best cloud-free image
3. Create land cover training data
4. Apply CART (Classification and Regression Tree) supervised classification algorithm
5. Calculate the confusion matrix and overall accuracy
6. Display and visualize classification result
7. Download the classification result
Blog: spatialelearning.com
Courses: courses.spatialelearning.com/
KZread: / spatialelearning
Facebook: / spatialelearning
Twitter: / spatialelearn
#earthengine #remotesensing #sentinel2
Пікірлер: 57
Visit our website to learn more: spatialelearning.com Hope this video was useful to you. What video topic would you like to see next?
@ishanweerakoon9838
3 жыл бұрын
Please do a video about Parallelepiped classifier
@harshelsuares3194
2 жыл бұрын
It's a wonderful recording. But I have a query related to ROI. So if I want the shapefile of British Columbia or Vancouver what will be the FeatureCollection code ?
@spatialelearning
Жыл бұрын
@@ishanweerakoon9838 Ok, will do.
@spatialelearning
Жыл бұрын
@@harshelsuares3194 You can upload a shape file to asset manager.
@asmaaalzahrani6387
Жыл бұрын
Please can you share the code link
Great work! So informative and detailed thank you so much for this!!!
Best tutorial so far with detailed working. Sometimes people hide some of the steps in the video, and that's create confusion when you try to implement the same thing. I have one question why you have choose band b4, b3, b2, b8 for classification? Is it true for all kindof classification using sentinel images. Which bands we can use in case of landsat8 data
@spatialelearning
Жыл бұрын
Thanks. I chose bands 4, 3, 2 and 8 since they are the highest resolution (10 meter). You can apply similar band combinations for Landsat 8.
awesome video. i got a question, i've got an preprocessed shape with possible areas of pine plantation in brazil, i just i'd like to run a classification to verify inside these polygons wethers it's pine or not. Is there a way to transform a shapefile in FeatureCollection for then use it as my ROI? thanks again
Gracias!! :)
Very nice video! I an having some query I want to extract only urban class but while creating the different classes the Urban class mixed with the Barren class.kindly help me for the same.
Great video sir, how to export confusion matrix?
Thank you again for wonderful tutorial. I have one question is it possible to get the satellite map in Google earth engine in historic period like google earth pro?
This is great!! Can you please share the code in the comments?
Hi dear admin, Please may I ask you: when I zoom the google earth engine interface imagery, the ground fearures look like pretty clear and visible, but when I use your algorithm to make true color composite imagery to download, but at that time the ground fearures could not clearly visible? What is this problem and how to solve it ? I will be thankful for your valuable guidance about it.
Hi, can someone please help me with this code error: Cannot read property 'sampleRegions' of undefined. 34th minute of the video. I tried exactly as it was given but its not working.
Hi dear Admin. When I run this code: //Overlay the point on the imagery to get trainingDataset var trainImage = imput.sampleRegion({ collcetion : training, properties: [lable], scale: 30 }); then this error appeared: "Line 90: imput is not defined" Please tell me how to handle this issue?
Could you please explain the reason for using only Band 2, 3, 4 and 8 for classification?. It's on line 22, under the comment //Creating Training Data.
@rajithanuwantha3313
Жыл бұрын
They are the ones having spatial resolution of 10m .. Using other bands may reduce the resolution..
WOULD YOU LIKE TO SHARE THE SCRIPT?
I CANT BELIEVE THAT THIS IS WORKKKKKKKK, CAN I ASK YOU QUESTION WHY YOU USE ONLY 4 BANDS, MEANWHILE MAYBE THER IS SOME CLASSIFICATION THAT THE OTHER BAND
@UlukbekBurganakov
4 ай бұрын
Hi! Can you share me with your codes
Why when i use "Sentinel-2: Cloud Probability" to mask the clouds, my overall accuracy went down from 0.7 to 0.578. 1) How to improve overall accuracy 2) How many Geometry Imports per class is need/best/sufficient
i try to do the same but i have this message ! (Jsloader error (code #1): Timeout reached for loading script /javascript/acorn.js) please can some one help me to fix this ?
Very good video. Congratulations! Just one doubt, I can't get the confusion matrix scrip to work, it doesn't give me any error, only that both the confusion matrix and the Overall Accuracy give me 0 value. What can it be?
@binyamhailu1771
2 жыл бұрын
I am having the same problem.
@sanabasheer7650
2 жыл бұрын
Hi... I'm having the same problem. have you find any solution related to that?
@sanabasheer7650
2 жыл бұрын
@@binyamhailu1771 Have you find any solution?
@rahelsintayehu9070
Жыл бұрын
@@sanabasheer7650 you edit the script actual: 'Class' then you will get the result
@rahelsintayehu9070
Жыл бұрын
@@binyamhailu1771 Hey edit the script actual: 'Class" then you will get the result
My classification is appearing very decent with 85% accuracy; However, the area is very large and while exporting, in task a multiple run options are appearing, can anyone help its urgent, Thanking you, I want to export in a single frame.
I can't get the confusion matrix scrip to work, it doesn't give me any error, only that both the confusion matrix and the Overall Accuracy give me 0 value. What can it be?
var trainImage = input.sampleRegions({ collection: training, properties: [label], scale:30 }); Why is it at the trainImage, the scale is selected to be 30 instead of 10?
@gaaty1954
Жыл бұрын
hmmm, when i adjust scale to 10, the water classification output seems a bit off, using 30 then. Using the scale of 30, also improved the overall accuracy from 0.7 to 0.75
Please can you help me, I followed all steps and worked. But Finally it shows ''Classification_CART: Layer error: Property 'class' of feature '1_1_1_1_1_0_0' is missing''. How can I fix this problem . I am binger
@Google_Earth_Engine
2 жыл бұрын
check featureCollection of your landcover
@atuldiwaker8597
Жыл бұрын
@@Google_Earth_Engine facing same problem, please help me out
is it possible to convert the result in shp?
@spatialelearning
Жыл бұрын
Yes. You can use raster to vector function.
Share this video code please...
I have an error: line 14, Map.addLayer(image.clip(roi), visParamsTrue, 'Sentinel 2020'); -> Error: image.clip is not a function Someone can help me? Thanks in advance
@spatialelearning
Жыл бұрын
Check the roi if it matches to image coverage.
@mattiabarsanti9336
Жыл бұрын
@@spatialelearning solved. thank you.
@frevaboy298
Жыл бұрын
@@mattiabarsanti9336 sorry can you share to me the code you Used
Please share code of this video.
Please anyone answer my query. Why this person has only used 4 bands? Can we use all the 20 m bands along with these 4 bands?
@batconservationpakistan4645
Жыл бұрын
He is only using blue, green, red and NIR because of higher spatial resolution of these bands (10m). Using 20m bands is of no use.
Error: Image.clipToBoundsAndScale, argument 'input': Invalid type. Expected type: Image. Actual type: ImageCollection. (Error code: 3) This is the error that occured to me
ERROR - I got this error right at the end (heartbreaking!)😭 can anyone help?????? "Layer error: Property 'Class' of feature '2_0_0': Invalid type. Expected type: Float. Actual type: String. Actual value: C"
@spatialelearning
Жыл бұрын
Can you share the ee code link?
Why confusion matrix showing zero. And also accuracy assessment showing zero Could you tell me how to solve it?pls😑
Hello please i got this error : " Unexpected token (3:63) "when i ran the code by following step by step the tutorial i want to know what happened?
@leonardoscarpa8784
2 жыл бұрын
try reloading the page, it happened to me but I had left it unused from one day to the next. Maybe it is a protocol... Good luck!
This is great!! Can you please share the code in the comments?