ContentDetectorFunction
represents a function generated by TrainImageContentDetector or TrainTextContentDetector that localizes and classifies contents in a piece of text or an image.
Details
- Content detection, also known as entity tagging and object detection, is the process of finding and classifying subparts of images or text similar to those that the content detector was originally trained on.
- ContentDetectorFunction[…] is a function that can be applied to an image or a string and returns position, class and other classification properties of the detected contents.
- ContentDetectorFunction[…][expr] returns detected contents in expr.
- ContentDetectorFunction[…][{expr1,expr2,…}] detects contents in all expri.
- ContentDetectorFunction[…][expr,prop] returns the specified property; available properties include:
-
"Class" the class of the detected object "Position" the position of the detected object "Probability" estimated probability that the detection is correct "Properties" a list of the available properties {prop1,…} a list of property specifications - In addition, text detectors can return the following properties:
-
"HighlightedSnippet" a snippet with the detected string highlighted "Snippet" a snippet around the detected string "String" string of the identified text - Image detectors can return the following properties:
-
"BoundingBox" the subimage bounding box given as a Rectangle "Image" the identified subimage - ContentDetectorFunction[…][expr,…,opts] specifies that the detector should use the options opts when applied to expr.
- The following options can be given:
-
AcceptanceThreshold Automatic identification acceptance threshold TargetDevice "CPU" the target device on which to compute - Base on the detector type, other options might be available:
-
MaxFeatures Automatic maximum number of contents to return MaxOverlapFraction Automatic maximum bounding box overlap
Examples
open allclose allBasic Examples (2)
Options (3)
AcceptanceThreshold (1)
By default, the detected objects are automatically filtered by a probability threshold:
Use AcceptanceThresholdt to return only detections with strength greater than t:
Using a low threshold might give more low-quality detections:
MaxFeatures (1)
By default, all the detections above the acceptance threshold are returned:
Use MaxFeaturesn to return only the n strongest detections:
Text
Wolfram Research (2021), ContentDetectorFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ContentDetectorFunction.html.
CMS
Wolfram Language. 2021. "ContentDetectorFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ContentDetectorFunction.html.
APA
Wolfram Language. (2021). ContentDetectorFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ContentDetectorFunction.html