ArcGIS Pro: Digitize Training Data

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right so this city series of videos we're going to look at the process of doing a supervised classification in arcgis um so the process basically is to generate some training data generate a model and then apply that model to new data okay so what we're going to do in this video specifically is generate our training data okay so first thing you want to do is make sure you're clicked on the image that you're wanting to classify so i'm going to make sure i'm clicked on this full extent and then if we go to imagery then we should be able to go to classification tools and start generating training data so we want to do specifically is do trainings go to training sample manager and then we're going to build basically our training samples here so by default it comes up with a scheme that's um from the national land cover data set but we can't really differentiate all those classes here so we're going to go through and delete some of these uh we will use water we use developed we'll leave baron in forest has subcategories we really can't differentiate that here so i'm going to remove these subcategories and we don't need shrub let me get rid of that and um and then if we'll just well these are kind of hard to differentiate i'm just going to get rid of we'll just leave this as herbaceous and we'll get rid of wetland so we're gonna just try to shoot for these five categories all right so once we have that set up we can actually start digitizing training data so the way this is designed is really to do the the data as polygons there are ways to do it as points which i think sometimes is more preferable but um we're just going to do with polygon for now okay so first thing i'm going to do i'm going to use the circle tool because it's easy and i'm just going to start digitizing so you want to be clicked on the class that you're interested in so i'm clicked on water and i can start gathering water samples you can either do this using you know like drawing a polygon or drawing rectangle or freehand drawing or whatever the key thing here is you want to make sure that all of the pixels that occur in your examples within the extent of your examples are actually the class of interest so you don't want it to like overlap or overshoot into another another category another key characteristic here is to make sure that you capture a wide variety of examples so you can really characterize the full like spectral variability in your classes like water generally is pretty um it's generally pretty um differentiable so maybe we don't need a lot but i've generally found the best thing you can the best thing you can do to really get a decent classification is to um yeah sorry is to uh make sure you really get a lot of good quality training data spread over your image so this is gonna take me a while so i'm not gonna do i'm not gonna you know keep the video on the whole time so what i want to do is just maybe show you some examples for different data diff for each category and then um i'll show the video off and then we'll come back when we're ready to start the training process okay um so that would those are some examples of water again i'll go through and grab some more examples out here um probably should try to grab at least a few in the streams even though they're kind of narrow um okay so let's look at developed now another thing you may want to do while you're working through this process is to um um change the band combinations you may find it's it's easier to differentiate certain features or or see certain things in different band combinations so here i'm just in the city here and i'm just trying to grab some examples bear um developed areas tend to be kind of hard because they tend to be a mix of things you know if you zoom into a residential area you're going to have like know yards and roads and houses and some maybe some impervious surface so generally it's not going to be like a it's going to be very heterogeneous but that's just how it goes so again those are some examples of the develop class again you want to try to spread them out as much as possible so i'm going to zoom into a couple different towns here and make sure that i get examples from from each town or not every town that would be kind of time consuming but you know at least spread them out okay um let's do force next so here i'm in the forest class another thing you got to be careful is make sure you're clicked on the right category right you don't want to accidentally you know put forest examples in like the developed class or something that's a common mistake if you're just not paying attention if you worry about that you can always like go back through and just look at each of your examples and make sure that they're actually representative of what you're interested in in this area there's definitely some like topographic gradients we've got some pretty steep mountains um so lots of elevation change so that's another reason but you want to make sure that you spread your samples around as much as possible again you only have to do circles it's just i thought for this example that would make sense um but you can you know free hand draw or draw polygons or whatever there's some examples of forest um let's zoom in to herbaceous now so these are primarily going to be these types of features so these uh vegetated fields this would be like crop or pasture it's kind of hard to tell again this is um this is in sweden i don't really have any local knowledge in this area sometimes local knowledge can be very very helpful things might look a little different in different landscapes and different societies that have different you know land use practices and whatnot yeah so there's a ton of agricultural fields um don't we're not going to be able to draw in all these obviously so again you're just trying to get a nice representative sample um across the image and then the other one we haven't done that is baron so grab that i'm going to clear like any bare field so these red look and feels are probably bare if you're not really sure again maybe going to appearance and swapping out um to a different yes you can kind of see those are like bare agricultural fields so you might want to again play around with different band combinations it can be helpful to try to differentiate these things okay so i'm going to leave this video here for now if you're doing something similar trying to follow along with this you want to take some time and draw samples i'm going to probably spend at least a half an hour on this um and then whenever i'm ready and i have my training samples we'll come back and we'll start looking at um actually doing the training and classification process all right so we're back after spending about an hour collecting some training data you can see the data now kind of spread across the map extent i go back to the image classification window you can see all the examples in there so anyway we have some training data they're probably not perfect but i think it's good enough at least for for this demonstration all right so first off before you want to save your training data if you click save here it'll save them i've had issues where i have trouble finding them afterwards and i'm not sure why so another option is you can do a save as so basically i did a save as and saved it into my folder um as the zurich training set here so those should be all the samples so if we open this up you can see that i digitized 1200 samples and you can see the different categories there in the class name so the class name is the actual name and the class value is the stand and code for that category okay so we have our training data i also thought it might be good to incorporate some additional data layers into the classification to potentially improve their results um so i'm going to turn on the image here too there we go um so i calculated some some additional layers i calculated ndvi which we looked at in a prior video i calculated this moisture index which does a pretty good job of highlighting the water there and like moisture and whatnot i calculated a burnt up or sorry a buildup index and then i brought i calculated the first four principal components and brought those in and then um that's the last one and then lastly i calculated a uh a spatial filter to try to highlight edges a bit using like a convolution method okay so those are all of the data layers so we should be ready now to actually perform our training so note that you can do this from the if you go to imagery you can do it from the classification tool wizard or settings there i'm just going to grab it from the geoprocessing window so all this is in the image analyst toolbox and then in the segmentation and classification sub toolbox and what we want to do now is train an algorithm so what we're going to do specifically is train a random force algorithm which is a type of like machine learning algorithm okay so i'm going to click on that tool train random free classifier the input raster is going to be our image the input training samples is going to be our training data and then we're going to use the class value field that's going to be our unique identifier and this is going to save out a a classifier definition file or a dot ecd file um i'm going to move this to another location just so i know where it is so i'm going to move it to here and we'll just call it rf model and then e dot e cd save so that's our model and then note here you can add in additional raster so we're going to try to do that and see if it it'll work so we're going to add into ndvi oh i guess you can only add in one additional rasters um yeah i guess let's see i guess we can only pick one so i'm going to grab we'll just do we'll just use the ndvi so we're going to try to grab some additions for their information from that layer a couple other things we have here we have max number of trees max tree depth max number of samples per class so those are all like hyper parameters that you can set that may impact the algorithm um unfortunately the only thing that we can can so unfortunately there's no real way to know the best settings other than to play around with that or do some type of hyper parameter optimization which i don't think is available in arc so we'll just leave it set to the defaults you can also incorporate information from um image segments um if you're going to use a segment based classification um so we're not going to do that in this component okay so that should be everything that we need and if we hit run this should generate that classification file note that at this point it's not actually generating an like a classified image it's just generating a model that's going to be used later to actually classify an image okay so set it completed so that's that while we're at it let's just make another model so we're going to do this with a train support vector machine classifier so this is just a different machine learning algorithm so we're going to do the same thing we're going to feed it our image our training samples class value field we'll change this to svm model dot ecd and we'll also give it the ndvi i actually thought you could give it more than one variable so um anyway that's why i did that's why i created all those which is apparently pointless so um anyway we can this is a hyper parameter we can leave that and we're not going to send any segmentation output or inputs okay so that should do it so let's run this and again this is just training a model it's not actually we're not using it to predict out to an image yet okay i think we'll just end the video here and then in the next video once our models are produced we're going to go in and actually classify the images
Info
Channel: Aaron Maxwell
Views: 213
Rating: undefined out of 5
Keywords: WV View, AmericaView, Remote Sensing, ArcGIS Pro, Supervised Classification, Training Data, Digitizing
Id: iGRMCgzJoDY
Channel Id: undefined
Length: 15min 32sec (932 seconds)
Published: Sat Dec 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.