ImageInstanceQ[image,obj]
gives True if image appears to be an instance of the object obj, and gives False otherwise.
ImageInstanceQ[image,obj,cat]
assumes that the image is of something in the category cat.
ImageInstanceQ[video,…]
returns a time series of results for video frames.
ImageInstanceQ
ImageInstanceQ[image,obj]
gives True if image appears to be an instance of the object obj, and gives False otherwise.
ImageInstanceQ[image,obj,cat]
assumes that the image is of something in the category cat.
ImageInstanceQ[video,…]
returns a time series of results for video frames.
Details and Options
- ImageContainsQ tries to identify whether an image is an instance of a given category.
- Possible forms for both object obj and category cat are:
-
"type" entity type, as used in Interpreter "concept" named concept, as used in "Concept" entities "word" English word, as used in WordData wordspec word sense specification, as used in WordData Entity[…] any appropriate entity instance1|instance2|… any of the instancei - The following options can be given:
-
AcceptanceThreshold 0.5 what recognition probability to require PerformanceGoal Automatic favor algorithms with specific advantages RecognitionPrior 0.5 prior probability for a True result TargetDevice "CPU" the target device on which to compute - ImageInstanceQ uses machine learning. Its methods, training sets and biases included therein may change and yield varied results in different versions of the Wolfram Language.
- ImageInstanceQ may download resources that will be stored in your local object store at $LocalBase, and can be listed using LocalObjects[] and removed using ResourceRemove.
Examples
open all close allBasic Examples (2)
Test whether an image is an instance of a particular object:
ImageInstanceQ[[image], Entity["Species", "Species:FelisCatus"]]Perform the test within a specific category:
ImageInstanceQ[[image], "cat"]ImageInstanceQ[[image], "cat", Entity["Concept", "Felid::t6ktm"]]Options (2)
AcceptanceThreshold (1)
Using the default AcceptanceThreshold, an object may not be identified:
ImageInstanceQ[[image], Entity["Concept", "Uke::57cs3"]]Specify a lower threshold to accept a less certain match:
ImageInstanceQ[[image], Entity["Concept", "Uke::57cs3"], AcceptanceThreshold -> 1 / 50]RecognitionPrior (1)
The default RecognitionPrior is 0.5:
ImageInstanceQ[[image], Entity["Concept", "Freighter::968s8"]]Assign a very low prior probability to the object to be tested for in the image:
ImageInstanceQ[[image], Entity["Concept", "Freighter::968s8"], RecognitionPrior -> 1 / 40]Related Guides
History
Text
Wolfram Research (2015), ImageInstanceQ, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageInstanceQ.html.
CMS
Wolfram Language. 2015. "ImageInstanceQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ImageInstanceQ.html.
APA
Wolfram Language. (2015). ImageInstanceQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageInstanceQ.html
BibTeX
@misc{reference.wolfram_2026_imageinstanceq, author="Wolfram Research", title="{ImageInstanceQ}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/ImageInstanceQ.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_imageinstanceq, organization={Wolfram Research}, title={ImageInstanceQ}, year={2015}, url={https://reference.wolfram.com/language/ref/ImageInstanceQ.html}, note=[Accessed: 13-June-2026]}