trains a ContentDetectorFunction[] based on the examples given.

Details and Options


open allclose all

Basic Examples  (1)

Train a basic object detector:

Apply the detector on a new image:

Highlight the detection on the input image:

Options  (5)

PerformanceGoal  (1)

Use PerformanceGoal"Quality" to emphasize the quality of the result:

Use PerformanceGoal"Speed" to emphasize the speed of computation:

ProgressReporting  (1)

By default, progress is reported in a dynamic panel:

Use ProgressReportingFalse to avoid displaying the progress panel:

TargetDevice  (1)

Train a detector using the default system GPU, if available:

If a compatible GPU is not available, a message is issued:

TimeGoal  (1)

The training time can be influenced by several factors, such as the number of examples and classes:

Use TimeGoal to specify a target time for the training:

ValidationSet  (1)

By default, only cross-validation is performed on the detector:

Use ValidationSet to provide separate validation examples:

Wolfram Research (2021), TrainImageContentDetector, Wolfram Language function,


Wolfram Research (2021), TrainImageContentDetector, Wolfram Language function,


Wolfram Language. 2021. "TrainImageContentDetector." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2021). TrainImageContentDetector. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_trainimagecontentdetector, author="Wolfram Research", title="{TrainImageContentDetector}", year="2021", howpublished="\url{}", note=[Accessed: 16-June-2024 ]}


@online{reference.wolfram_2024_trainimagecontentdetector, organization={Wolfram Research}, title={TrainImageContentDetector}, year={2021}, url={}, note=[Accessed: 16-June-2024 ]}