arcgis-python-api icon indicating copy to clipboard operation
arcgis-python-api copied to clipboard

oriented imagery sample notebook

Open 1297rohit opened this issue 3 years ago • 3 comments
trafficstars

Sample notebook for deep learning workflow with oriented imagery

Checklist

Please go through each entry in the below checklist and mark an 'X' if that condition has been met. Every entry should be marked with an 'X' to be get the Pull Request approved.

  • [ ] All imports are in the first cell?
    • [ ] First block of imports are standard libraries
    • [ ] Second block are 3rd party libraries
    • [ ] Third block are all arcgis imports? Note that in some cases, for samples, it is a good idea to keep the imports next to where they are used, particularly for uncommonly used features that we want to highlight.
  • [ ] All GIS object instantiations are one of the following?
    • gis = GIS()
    • gis = GIS('home') or gis = GIS('pro')
    • gis = GIS(profile="your_online_portal")
    • gis = GIS(profile="your_enterprise_portal")
  • [ ] If this notebook requires setup or teardown, did you add the appropriate code to ./misc/setup.py and/or ./misc/teardown.py?
  • [ ] If this notebook references any portal items that need to be staged on AGOL/Python API playground, did you coordinate with a Python API team member to stage the item the correct way with the api_data_owner user?
  • [ ] If the notebook requires working with local data (such as CSV, FGDB, SHP, Raster files), upload the files as items to the Geosaurus Online Org using api_data_owner account and change the notebook to first download and unpack the files.
  • [ ] Code simplified & split out across multiple cells, useful comments?
  • [ ] Consistent voice/tense/narrative style? Thoroughly checked for typos?
  • [ ] All images used like <img src="base64str_here"> instead of <img src="https://some.url">? All map widgets contain a static image preview? (Call mapview_inst.take_screenshot() to do so)
  • [ ] All file paths are constructed in an OS-agnostic fashion with os.path.join()? (Instead of r"\foo\bar", os.path.join(os.path.sep, "foo", "bar"), etc.)
  • [ ] Is your code formatted using Jupyter Black? You can use Jupyter Black to format your code in the notebook.
  • [ ] IF YOU WANT THIS SAMPLE TO BE DISPLAYED ON THE DEVELOPERS.ARCGIS.COM WEBSITE, ping @ mohi9282 so he can add it to the list for the next deploy

1297rohit avatar Mar 22 '22 06:03 1297rohit

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@1297rohit https://app.reviewnb.com/Esri/arcgis-python-api/blob/oriented_imagery_sample/samples%2F04_gis_analysts_data_scientists%2Ftraffic_light_detection_on_oriented_imagery.ipynb/discussion

sumanttyagi avatar Aug 11 '22 08:08 sumanttyagi

@1297rohit please incorporate the suggested changes

priyankatuteja avatar Aug 11 '22 09:08 priyankatuteja

View / edit / reply to this conversation on ReviewNB

jyaistMap commented on 2022-12-13T18:46:53Z ----------------------------------------------------------------

It seems to me that connecting to an online organization will not allow the user to then access the data below that is in the Python API playground. I logged into the online geosaurus org then ran the code below which returned None. If a user downloads this sample to run it locally they will not be able to get the data. Should the code be changed to provide public credentials to the Python API playground? Should the item below be shared in a way that anyone logged into an Online organization can access the data? Can a note be added to the notebook guiding users on how to get this data? If I'm not interpreting what would happen locally just let me know.

priyankatuteja commented on 2022-12-21T05:27:23Z ----------------------------------------------------------------

makes sense, please upload the data on geosaurus org and make it public. Please also note that: playground org is enterprise portal and not Online org.

makes sense, please upload the data on geosaurus org and make it public. Please also note that: playground org is enterprise portal and not Online org.


View entire conversation on ReviewNB

priyankatuteja avatar Dec 21 '22 05:12 priyankatuteja

View / edit / reply to this conversation on ReviewNB

priyankatuteja commented on 2022-12-21T05:35:44Z ----------------------------------------------------------------

change the title to:

Detect traffic lights in oriented imagery using ArcGIS Pretrained models


1297rohit commented on 2023-01-03T09:48:34Z ----------------------------------------------------------------

Done

View / edit / reply to this conversation on ReviewNB

priyankatuteja commented on 2022-12-21T05:35:45Z ----------------------------------------------------------------

keep the tense consistent, for example downloading and setting up or download and set up...

Introduction

Necessary imports

Download and setup data

Model training

  • Load model architecture

Model inferencing

Model applications

  • Estimate relative depth using predicted bounding boxes
  • Extract and visualize locations of traffic lights on map

Conclusion

References


View / edit / reply to this conversation on ReviewNB

priyankatuteja commented on 2022-12-21T05:35:46Z ----------------------------------------------------------------

We have generally applied object detection on images taken looking straight down at the ground, like traditional satellite imagery, predictions from which can be visualized on a map and incorporated into your GIS. Other imagery, however, is more difficult to visualize and incorporate into your GIS. Such non-nadir "oriented imagery" includes oblique, bubble, 360-degree, street-side, and inspection imagery, among others. Through this sample, we will demonstrate the utility of an object detection model for detecting objects in an oriented imagery using ArcGIS API for Python.

The arcgis.learn module supports number of object detection models such as SingleShotDetector, RetinaNet, FasterRCNN, YoloV3 and even more. In the notebook, we will be using YoloV3 model for detecting traffic lights in the oriented imagery. The biggest advantage of YOLOv3 in arcgis.learn is that it comes preloaded with weights pretrained on the COCO dataset. This makes it ready-to-use for the 80 common objects (car, truck, person, etc.) that are part of the COCO dataset.


View / edit / reply to this conversation on ReviewNB

priyankatuteja commented on 2022-12-21T05:35:47Z ----------------------------------------------------------------

import only what's used. using * imports everything and sometimes consumes more time.


View / edit / reply to this conversation on ReviewNB

priyankatuteja commented on 2022-12-21T05:35:47Z ----------------------------------------------------------------

remove hyphen from pre-trained throughout the notebook


View / edit / reply to this conversation on ReviewNB

priyankatuteja commented on 2022-12-21T05:35:49Z ----------------------------------------------------------------

also add reference page links: for example: https://doc.arcgis.com/en/imagery/workflows/resources/managing-and-visualizing-oriented-imagery.htm. include more such as yolov3 guide page.


View / edit / reply to this conversation on ReviewNB

priyankatuteja commented on 2022-12-21T05:35:49Z ----------------------------------------------------------------

In this notebook, we have performed object detection on imagery taken at any angle naming oriented imagery. We use YoloV3 model with pretrained weights for detecting traffic lights and located these on the gis map.


Done


View entire conversation on ReviewNB

1297rohit avatar Jan 03 '23 09:01 1297rohit