Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

detect_objects_using_deep_learning() got an unexpected keyword argument 'process_all_raster_items'

See original GitHub issue

Describe the bug The bug appeared when I used the detect_objects_using_deep_learning method. .

To Reproduce Steps to reproduce the behavior:

from arcgis.gis import GIS
from arcgis.learn import Model,detect_objects
model = Model()
im = GIS('my_gis').layers[0]


TypeError                                 Traceback (most recent call last)
<ipython-input-23-5f272dd2c670> in <module>()
----> 1 arcgis.learn.detect_objects(input_raster=im,model=model)

~/anaconda3/envs/pytorch/lib/python3.6/site-packages/arcgis/learn/ in detect_objects(input_raster, model, model_arguments, output_name, run_nms, confidence_score_field, class_value_field, max_overlap_ratio, context, process_all_raster_items, gis, future, **kwargs)
    245                                                                         process_all_raster_items=process_all_raster_items,
    246                                                                         future=future,
--> 247                                                                         **kwargs)
    249     """

~/anaconda3/envs/pytorch/lib/python3.6/site-packages/arcgis/_impl/ in detect_objects_using_deep_learning(self, input_raster, model, output_objects, model_arguments, run_nms, confidence_score_field, class_value_field, max_overlap_ratio, process_all_raster_items, context, future, **kwargs)
   6200                                                                  context=context,
   6201                                                                  gis=self._gis,
-> 6202                                                                  future=True)
   6203         else:
   6204             gpjob = self._tbx.detect_objects_using_deep_learning(input_raster=input_raster,

TypeError: detect_objects_using_deep_learning() got an unexpected keyword argument 'process_all_raster_items'

Screenshots image

Expected behavior A clear and concise description of what you expected to happen.

Platform (please complete the following information):

  • OS: Linux
  • Browser [chrome]
  • Python API Version [1.7.0]

Additional context Add any other context about the problem here, attachments etc.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

rhea-jcommented, Dec 19, 2019

@LinoSun Can you kindly try passing values for model_arguments parameter.

divyanshj16commented, Dec 19, 2019

Here is an example.

context = {'cellSize': '1',    ## Change it with the cell size you trained your model on
           'processorType':'GPU',  ## If you have GPU, you can set this
           'extent':{'xmin': -11392183,  ## Set the extent you want to inference on
                     'ymin': 3764168,
                     'xmax': -11385824,
                     'ymax': 3766079, 'spatialReference': {'latestWkid': 3857, 'wkid': 102100}}}

model_arguments = {
    'padding': '56',   ## this should be 1/4 of the image size you trained on.
    'threshold': '0.5',  ## Confidence above with objects will be detected.
    'nms_overlap':'0.1', ## Non maximum suppression 
    'batch_size': '16',  ## reduce this if you have memory issues on your server 
    'exclude_pad_detections': 'True' ## You can pass false and see if results improve.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to execute the Detect Objects Using Deep Learning ...
When working with deep learning models in ArcGIS Pro, attempting to run the Detect Objects Using Deep Learning tool fails and returns the ......
Read more >
Detect Objects Using Deep Learning (Image Analyst)
ArcGIS geoprocessing tool that runs a trained deep learning model on an input raster to produce a feature class containing the objects it...
Read more >
SelectLayerByAttribute() got an unexpected keyword argument
# Process: Select Municipal arcpy.SelectLayerByAttribute_management(FClass, "NEW_SELECTION", "FieldName = 'M'").
Read more >
Django : __init__() got an unexpected keyword argument 'user'
Django : __init__() got an unexpected keyword argument 'user' [ Beautify Your Computer : ] Django ...
Read more >
How to fix Django TypeError got an unexpected keyword ...
Django TypeError when passing arguments via URLDjango view got an unexpected keyword argumentException Type: TypeErrorException Value: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found