({{, (RefLink[ImageContents, paclet:ref/ImageContents])[image] 
gives a dataset of identified entities in image.}, {, (RefLink[ImageContents, paclet:ref/ImageContents])[image,category]
gives a dataset that only contains entities in the specified category.}, {, (RefLink[ImageContents, paclet:ref/ImageContents])[image,category,prop]
includes the properties prop for each identified object.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[ImageContents, paclet:ref/ImageContents]) attempts to identify entities present in an image and returns a (RefLink[Dataset, paclet:ref/Dataset]) object with various identification properties such as the name, bounding box and probability.

Possible forms for category include:

The property prop can be any of the following:

The following options can be given:

When no content is found at an acceptable threshold, (RefLink[Missing, paclet:ref/Missing])["Unidentified"] is returned.

(RefLink[ImageContents, paclet:ref/ImageContents]) uses machine learning, and its training set and methods may change in different versions of the Wolfram Language, yielding different results.

(RefLink[ImageContents, paclet:ref/ImageContents]) may download resources that will be stored in your local object store at (RefLink[$LocalBase, paclet:ref/$LocalBase]), and can be listed using (RefLink[LocalObjects, paclet:ref/LocalObjects])[] and removed using (RefLink[ResourceRemove, paclet:ref/ResourceRemove]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (8)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Identify contents of an image:

ImageContents[]

Get results only in the specified category:

ImageContents[,(Entity["zebra", Entity["Concept","Zebra::nx5qr"], "Entity[\"Concept\", \"Zebra::nx5qr\"]", "concept"])]

OpenersExampleSection1(Spacer1)Scope  (3)

Get a summary of all the identified entities in an image:

ImageContents[]

Get a summary only in the specified category:

ImageContents[,(Entity["bowl", Entity["Concept","Bowl::8mv4z"], "Entity[\"Concept\", \"Bowl::8mv4z\"]", "concept"])]

Specify which properties to include in the summary:

ImageContents[,(Entity["bowl", Entity["Concept","Bowl::8mv4z"], "Entity[\"Concept\", \"Bowl::8mv4z\"]", "concept"]),{"Image","Name","Probability","Position"}]

OpenersExampleSection2(Spacer1)Options  (4)

OpenersExampleSubsection0(Spacer1)AcceptanceThreshold  (1)

Objects with low probability are not returned:

i=;

ImageContents[i]

Allowing a lower probability may result in more objects being recognized:

ImageContents[i,AcceptanceThreshold->.2]

OpenersExampleSubsection1(Spacer1)MaxFeatures  (1)

By default, all the detected objects are returned:

i=;

ImageContents[i]

Specify a maximum number of results:

ImageContents[i,MaxFeatures->2]

OpenersExampleSubsection2(Spacer1)MaxOverlapFraction  (1)

The detected bounding boxes may overlap each other:

i=;

ImageContents[i,All,"BoundingBox"]

HighlightImage[i,Normal@%[All,"BoundingBox"]]

Find only non-intersecting objects:

ImageContents[i,MaxOverlapFraction->0];

HighlightImage[i,Normal[%[[All,"BoundingBox"]]]]

OpenersExampleSubsection3(Spacer1)TargetDevice  (1)

By default, the function is evaluated on CPU:

i=;

ImageContents[i]

Use the (RefLink[TargetDevice, paclet:ref/TargetDevice]) option to specify a different device:

ImageContents[i,TargetDevice->"GPU"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ImageContainsQ, paclet:ref/ImageContainsQ])  ▪  (RefLink[ImageCases, paclet:ref/ImageCases])  ▪  (RefLink[ImageIdentify, paclet:ref/ImageIdentify])  ▪  (RefLink[ImageInstanceQ, paclet:ref/ImageInstanceQ])  ▪  (RefLink[ImagePosition, paclet:ref/ImagePosition])  ▪  (RefLink[ImageBoundingBoxes, paclet:ref/ImageBoundingBoxes])  ▪  (RefLink[FacialFeatures, paclet:ref/FacialFeatures])  ▪  (RefLink[TextRecognize, paclet:ref/TextRecognize])  ▪  (RefLink[TextContents, paclet:ref/TextContents])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Computer Vision, paclet:guide/ComputerVision])}, {▪(RefLinkPlain[Image Processing & Analysis, paclet:guide/ImageProcessing])}})}})