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 XLIII, The New SAS Developer Portal
Wednesday, August 14, 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 XLIII, The New SAS Developer Portal
Wednesday, August 14, 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 XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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