BookmarkSubscribeRSS Feed
ojaro
SAS Employee

Hi,

 

I am trying to use CAS action image.extractDetectedObjects, however it gives me the following error message:

 

"ERROR: There is an issue with the required columns: either _nObjects_ is missing or object detection columns. The maxObjects parameter would be more than the maximum number of objects detected too."

 

Any pointers to what might cause this error? I have a source table with the images and I have defined the column my images are in with the "image" parameter.

 

Best regards,

 

Olli

5 REPLIES 5
joeFurbee
Community Manager

Hi @ojaro. I am seeking someone internal at SAS to assist with your question. I will also try and replicate this issue. I'll let you know what I find out.


Join us for SAS Community Trivia
SAS Bowl XL, SAS Innovate 2024 Recap
Wednesday, May 15, 2024, at 10 a.m. ET | #SASBowl

ojaro
SAS Employee

Thanks Joe.

 

Just to clarify. I am using CAS directory through the REST API, if that makes any difference.

 

Regards,

 

Olli

joeFurbee
Community Manager

Hi Olli,

The API doc for extractDetectedObjects indicates that you need to pass the maxObjs parameter in the JSON body of you request. From the doc:

maxObjects=64-bit-integer

specifies the maximum number of detected objects to extract from the image data in the input table.

Default 10
Minimum value 0

 

This value should be set to more than the maximum number of objects in the CASTable, which is also an input parameter in the request. If further investigation is needed, can you provide a sample url that you are using and the JSON body for the POST?

 


Join us for SAS Community Trivia
SAS Bowl XL, SAS Innovate 2024 Recap
Wednesday, May 15, 2024, at 10 a.m. ET | #SASBowl

ojaro
SAS Employee

Hi Joe,

 

Thanks for the reply. I have added maxObjs to my request and it makes no difference. Also, my understanding of this parameter was that it would define the maximum number of objects extracted from a single image analysed.

 

I am sending a POST request to http://{{server_url}}:{{CAS_port}}/cas/sessions/{{CAS_session}}/actions/image.extractDetectedObjects and my request payload looks as below:

 

{
"table" : "IMAGES",
"casOut" : "IMAGES_EXTRACTED",
"extractType" : "HIGHLIGHT",
"image" : "_image_",
"coordType" : "YOLO",
"maxObjects": 5
}

 

I have previously loaded three images to CAS table IMAGES using URL http://{{server_url}}:{{CAS_port}}/cas/sessions/{{CAS_session}}/actions/image.loadImages and was hoping that the above action would allow me to extract objects from these images.

 

Regards,

 

Olli

 

 

joeFurbee
Community Manager

Hi Olli,

I was able to reproduce your error using both Python and REST. At this point, I'd recommend opening a ticket with SAS Technical Support


Join us for SAS Community Trivia
SAS Bowl XL, SAS Innovate 2024 Recap
Wednesday, May 15, 2024, at 10 a.m. ET | #SASBowl

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1201 views
  • 1 like
  • 2 in conversation