Hi, I've been trying to teach myself the workflow of using the deep learning tools in ArcPro 2.8. I have installed the deep learning libraries for 2.8 as instructed on the GitHub site here. My set up is ArcPro 2.8.1 and my PC is a modern i7, 32gb computer with an nvidia 3070 RTX graphics cards.
I decided the best way to learn was to replicate a task I had done recently but using the deep learning tools. I have a Sentinel 2 image and I want deep learning to identify bare/ploughed fields in a small area of the UK. Originally I thought this was object detection and followed the workflows described in the ArcPro help file. ArcPro was crashing and reporting errors so I almost gave up. But having read this page I realised object detection was about putting those rectangles around what it thinks it has found. I want the actual boundary of the field identified and have realised it is pixel classification I need to be doing.
Either the process inconsistently fails with an error (something about a bad token) or it simply creates a blank raster when I run the Classify pixels using Deep learning tool. I typically accept all the default settings as I don't know any better! I find setting the tools to use a GPU runs longer\errors\crashes than if I set it to CPU. This thread hints to the fact that these deep learning libraries are not compatible with an RTX 3070 GPU?
So let me talk you through my steps, may be you will spot the many "school boy errors" I am making? I'm a complete novice to this branch of image analysis and fully accept I'm doing something daft!
I run the train deep learning tool with the environment settings set to CPU and 100% parallel processing. The main dialog interface is left as is:
The message dialog reports this (I will be honest, this is all meaningless to me as I don't yet fully understand all the nuisances of the tool). But I'm OK with that as I am just trying to learn and get anything out of it!
Start Time: 21 July 2021 12:12:34
So I think I'm doing the right sequence Prepare raster> create training samples > export > train > detect and I think I'm using the correct type of classification (pixel classification not object detection) but as you can see nothing works!
If anyone has any advice I am desperate to hear from you, even if I have done a dumb thing that any hardened deep learner would intuitively know.
Hi,
I was quite excited by your additional bit of information but when I include it in the parameter list during the train model part of my notebook code as shown below:
unet = UnetClassifier(data, backbone='resnet34', ignore_classes=[0])
I get this response...
--------------------------------------------------------------------------- Exception Traceback (most recent call last) In [4]: Line 1: unet = UnetClassifier(data, backbone='resnet34', ignore_classes=[0]) File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\learn\models\_unet.py, in __init__: Line 124: raise Exception(f"`ignore_classes` parameter can only be used when the dataset has more than 2 classes.") Exception: `ignore_classes` parameter can only be used when the dataset has more than 2 classes. ---------------------------------------------------------------------------
So I'm guessing your sparse data actually had more than one class?
mybad, for that parameter to be useful you need to have more than 1 class.
@samaloysius4 your input made me think maybe I'm not doing things as they should for a pixel classification so I decided to add a few more classes (rivers, green fields and woods) , then include your idea of ignore_classes=[0] and amazingly I finally created something! It's not working particularly great as it merged woods and green fields into one class but it is actually identifying other bare fields. I understand now I need to tweak the input parameters to improve it.
But here is an output, kind of works...
So @Tim_McGinnes & @samaloysius4 thank you for your time, I feel I have a lot more understanding of the workflow of how to use these tools.