OPENCV_PERFORMANCE(1)

πŸ“¦ version 4.5.4, in ubuntu jammy

πŸ’– OPENCV_PERFORMANCE πŸ’–

okay bestie, gather round, because this little tool β€” opencv_performance from the OpenCV user commands β€” is literally the vibe check for your classifier. it's how you find out if your object detector is slaying or flopping. no cap. πŸ¦‹


✨ NAME ✨

opencv_performance β€” evaluate the performance of the classifier πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

opencv_performance [options]

🌸 DESCRIPTION 🌸

so here's the tea: opencv_performance evaluates the performance of the classifier. you hand it a whole collection of marked up test images, it runs the classifier on them, and then it spills all the results β€” number of found objects, number of missed objects, number of false alarms, and other information. it's giving report card energy. πŸ“‹

if you don't have a collection like that lying around, no worries bestie β€” test samples may be created from a single object image by the opencv_createsamples(1) utility. and the scheme of test samples creation in this case is similar to training samples. same vibe, different day. ✨

now, when you read the output, here's how to decode that table:

  • 'Hits' β€” shows the number of correctly found objects. we love to see it. πŸ’…
  • 'Missed' β€” shows the number of missed objects (must exist but are not found, also known as false negatives). the audacity. 😭
  • 'False' β€” shows the number of false alarms (must not exist but are found, also known as false positives). not the phantom detections πŸ’€

πŸ’… OPTIONS πŸ’…

opencv_performance supports the following options:

  • -data classifier_directory_name β€” the directory, in which the classifier can be found. point me to the classifier, bestie πŸ“
  • -info collection_file_name β€” file with test samples description.
  • -maxSizeDiff max_size_difference β€” determine the size criterion of reference and detected coincidence. the default is 1.500000.
  • -maxPosDiff max_position_difference β€” determine the position criterion of reference and detected coincidence. the default is 0.300000.
  • -sf scale_factor β€” scale the detection window in each iteration. the default is 1.200000. πŸ”
  • -ni β€” don't save detection result to an image. this could be useful, if collection_file_name contains paths. lowkey a lifesaver πŸ™ˆ
  • -nos number_of_stages β€” number of stages to use. the default is -1 (all stages are used). go big or go home, all stages periodt ✨
  • -rs roc_size β€” the default is 40.
  • -h sample_height β€” the sample height (must have the same value as used during creation). the default is 24.
  • -w sample_width β€” the sample width (must have the same value as used during creation). the default is 24.
heads up bestie: the same information is shown, if opencv_performance is called without any arguments/options. so if you just run it bare, it'll still give you the rundown 🫢

🌈 EXAMPLES 🌈

to create training samples from one image applying distortions and show the results:

opencv_performance -data trainout -info tests.dat

that's it. that's the whole thing. iconic behavior honestly πŸŽ€


πŸ‘‘ SEE ALSO πŸ‘‘

opencv_createsamples(1), opencv_haartraing(1)

more information and examples can be found in the OpenCV documentation. iykyk πŸ“š


πŸ’œ AUTHORS πŸ’œ

this manual page was written by Daniel Leidert <daniel.leidert@wgdd.de> and Nobuhiro Iwamatsu <iwamatsu@debian.org> for the Debian project (but may be used by others). absolute legends, we stan 🫢


and that's the whole page, bestie! this masterpiece dropped under the OpenCV name, dated May 2010 β€” vintage but still serving πŸ’–βœ¨πŸŒΈ bye pookie, go test those classifiers πŸ¦‹

πŸ“¦ where this page comes from