Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

How to Improve Computer Vision with Geospatial Tools

1,282 views

Published on

Can computer vision mimic human vision? Maybe – but we need the right tools to process the high volume of data required by machine learning algorithms. Integration tools like FME can be used to harness the power of geospatial and machine learning for object detection.

In this webinar, you will learn how to:
- Use the ML libraries exposed in FME for object detection on photos or with remote sensing data (with an Open CV integration)
- How to improve the detection results with geospatial analysis
- Deliver results to stakeholders with quality outputs like maps, images, or info shared directly to a destination system

Published in: Software
  • Be the first to comment

  • Be the first to like this

How to Improve Computer Vision with Geospatial Tools

  1. 1. How to Improve Computer Vision with Geospatial Tools Dmitri Bagh, Safe Software
  2. 2. Dmitri Bagh Scenario Creation Analyst
  3. 3. Years of solving data challenges 25 Safe So ware WHO WE ARE 10,000 Organizations trusting us worldwide www.safe.com Partners supporting our network 150 128 Countries with FME customers
  4. 4. The Mystery of Balboa Park
  5. 5. The Mystery of Balboa Park The End
  6. 6. Computer Vision (CV) Uses: ● Medicine ● Surveillance ● Space Exploration ● Autonomous vehicles ● Military ● Manufacturing ● GEOSPATIAL!
  7. 7. Object Detection This is what we are going to talk about
  8. 8. Object Detection
  9. 9. Object Detection
  10. 10. Object Detection. Samples
  11. 11. Object Detection. Training
  12. 12. Object Detection. Detection
  13. 13. CV Tools
  14. 14. Connect Your Data Sources Transform Your Data Automate Your Workflows
  15. 15. CV tools available in FME Coming soon...
  16. 16. Five stages of the OD process 1. Data collection 2. Annotation 3. Training 4. Detection 5. Reporting/Result Delivery
  17. 17. Use online services ● Lots of specialists behind the service ● A LOT of computational power ● Huge training datasets ● Lots of known objects ● Collection and Training already done ● Only predefined objects ● Requires online connection ● Might get costly ● Surprisingly huge environmental impact ● You are the specialist ● Limited computational resources for training ● Small training datasets ● Collection needed ● You decide what to detect ● Works offline ● No cost for detection Train yourself
  18. 18. Data Collection
  19. 19. Training Data Collection Existing datasets (e.g. Stop signs) Field collection (photos, video) Digitizing (aerial imagery) Sample generator
  20. 20. Data Collection ● Collect lots of samples (hundreds or thousands) ● Collect even more negative samples. It’s good to have negatives from the same location ● Use annotations as clippers to create even more negatives
  21. 21. Data Collection
  22. 22. Annotation
  23. 23. Annotation ● opencv_annotation.exe ● Convert digitized rectangles to annotation file with FME Positive17.jpg 1 344 108 163 163 Positive19.JPG 1 419 58 91 92 Positive02.jpg 1 1948 294 890 824 Positive20.jpg 1 1590 138 306 332 Positive21.JPG 1 64 58 304 338 Positive22.png 2 368 164 31 35 37 129 33 31 Positive23.jpg 1 173 38 175 177 Positive24.jpg 1 517 124 40 40
  24. 24. Command line syntax for opencv_annotation.exe ● Don’t get frustrated - it must be precise down to a single slash ● If the path to the utility contains spaces, prefix the whole command with “& “ and then use quotation marks PS C:> C:appsFME2019.1pluginsopencvopencv_annotation.exe -a="c:tempannotations.txt" -i="C:usersdbaghDropbox (Safe Software Inc.)DmitriRasterRasterObjectDetectorHydrantsdataPositives" -m=1000 -r=4 Annotation
  25. 25. Demo 1 Let’s try to annotate a few photos
  26. 26. Demo 2 Let’s turn our positives 👍 into negatives 👎
  27. 27. GIS for annotation
  28. 28. Demo 3 Let’s make a workspace for creating annotations from GIS layers
  29. 29. Some lessons learned ● Make sure there are no zeros in the coordinates ● Remove lines with zero entries ● No annotation should go beyond the image extents ● Use relative path in annotation file ● Use both CR and LF at the end of each line Annotation
  30. 30. Training
  31. 31. Training. Step 1 RasterObjectDetectorSamplePreparer ● Remember your width and height. ● Use relative paths for input and outputs.
  32. 32. Training. Step 2 RasterObjectDetectionModelTrainer ● Use width and height from the previous step ● Use defaults - they are carefully chosen (unless you know what you do) ● Be prepared to wait LONG ● Expect a lot of resources taken by the process ● Re-use intermediate results after an error ● Clean the Temp folder to start over
  33. 33. Demo 4 Let’s prepare our samples for training
  34. 34. This is what KNOWLEDGE looks like
  35. 35. Detection
  36. 36. Detection
  37. 37. Demo 5 Let’s try to beat Amazon Rekognition by setting the best parameters in RasterObjectDetector
  38. 38. Detection. Gallery
  39. 39. Detection. Gallery
  40. 40. Detection. Gallery
  41. 41. Using spatial filters
  42. 42. Reporting
  43. 43. Reporting ● Simple vector rectangles depicting objects ● Images with MapnikRasterizer ● Detection Services Demos Stop signs, Fire Hydrants ● Interactive Web Maps
  44. 44. Demo 6 Make an image with MapnikRasterizer Make a mosaic of all images
  45. 45. Further reading and viewing ● FME Does Computer Vision ● How detection works, Vimeo ● How the Haar cascade object detection works ● What is LBP ● Cascade Classifier Training ● Environmental impact of AI ● “Teachable Machine”, a simple and fun game of machine learning
  46. 46. Q&A
  47. 47. Thank you! Get a free trial of FME or live chat at safe.com Email me at: dmitri@safe.com

×