{"id":246,"date":"2026-01-11T14:15:36","date_gmt":"2026-01-11T14:15:36","guid":{"rendered":"https:\/\/marcinzygmunt.pl\/blog\/?p=246"},"modified":"2026-06-21T17:45:16","modified_gmt":"2026-06-21T17:45:16","slug":"real-time-object-detection-opencv-yolo-in-action","status":"publish","type":"post","link":"https:\/\/marcinzygmunt.pl\/blog\/real-time-object-detection-opencv-yolo-in-action\/","title":{"rendered":"Real-Time Object Detection: OpenCV + YOLO in Action"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">AI-powered object detection is no longer exclusive to tech giants. With open-source tools like <strong>OpenCV<\/strong> and <strong>YOLO<\/strong>, anyone can build sophisticated detection systems.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">What I Built<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A unified Java application for real-time detection supporting:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 <strong>3 Detection Models:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>YOLOv3 (Darknet)<\/li>\n\n\n\n<li>YOLOv8 (ONNX)<\/li>\n\n\n\n<li>OpenCV HOG<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 <strong>3 Video Sources:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Video files<\/li>\n\n\n\n<li>Webcam<\/li>\n\n\n\n<li>Live streams (HLS \/ RTSP)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 Real-time processing with visualization<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udd27 With YOLO you\u2019re not limited to people only \u2014 you can detect <strong>cars, phones, bikes, bags, animals, and many other classes<\/strong>, or even <strong>train and fine-tune your own custom models<\/strong> for domain-specific tasks (industrial defects, PPE detection, custom objects, etc.).<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"600\" src=\"https:\/\/marcinzygmunt.pl\/blog\/wp-content\/uploads\/2026\/01\/person-detect-example-1024x600.png\" alt=\"\" class=\"wp-image-252\" srcset=\"https:\/\/marcinzygmunt.pl\/blog\/wp-content\/uploads\/2026\/01\/person-detect-example-1024x600.png 1024w, https:\/\/marcinzygmunt.pl\/blog\/wp-content\/uploads\/2026\/01\/person-detect-example-300x176.png 300w, https:\/\/marcinzygmunt.pl\/blog\/wp-content\/uploads\/2026\/01\/person-detect-example-768x450.png 768w, https:\/\/marcinzygmunt.pl\/blog\/wp-content\/uploads\/2026\/01\/person-detect-example.png 1273w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Real-World Applications<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83c\udfe2 <strong>Security &amp; Surveillance Systems<\/strong><br>Automated monitoring of public and private spaces with real-time detection from CCTV feeds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udc65 <strong>Crowd Control<\/strong><br>Detection and counting for event management, gatherings, and public facilities.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u26a0\ufe0f <strong>Threat Recognition<\/strong><br>An extensible framework for detecting unusual behaviors and security threats.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83c\udfe0 <strong>Smart Home &amp; Private Monitoring<\/strong><br>DIY home security with intruder detection \u2014 completely offline, no cloud, full data control.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83c\udfed <strong>Industrial &amp; Custom Use Cases<\/strong><br>Custom-trained YOLO models for detecting specific objects, safety gear, production issues, or anomalies.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Open Source<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Full project available on GitHub:<br>\ud83d\udc49 <strong><a href=\"http:\/\/github.com\/marcinzygmunt-pl\/persondetect\" data-type=\"link\" data-id=\"github.com\/marcinzygmunt-pl\/persondetect\" target=\"_blank\" rel=\"noreferrer noopener\">github.com\/marcinzygmunt-pl\/persondetect<\/a><\/strong> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Built with: <strong>OpenCV 4.9.0, YOLO (v3 &amp; v8), Processing Framework, Maven<\/strong> <br>*** Remember to download model files below ***<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Object detection technology is more accessible than ever.<br>You don\u2019t need supercomputers or massive budgets \u2014 just a laptop and curiosity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What other use cases do you see? Share your thoughts! \ud83d\udc47<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>Download yolo 3 \/8 model files <\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-e7b3d1fa-252f-4d6c-bc75-17be872ab22b\" href=\"https:\/\/marcinzygmunt.pl\/blog\/wp-content\/uploads\/2026\/01\/data.zip\">data<\/a><a href=\"https:\/\/marcinzygmunt.pl\/blog\/wp-content\/uploads\/2026\/01\/data.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-e7b3d1fa-252f-4d6c-bc75-17be872ab22b\">Download<\/a><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AI-powered object detection is no longer exclusive to tech giants. With open-source tools like OpenCV and YOLO, anyone can build sophisticated detection systems.<\/p>\n","protected":false},"author":1,"featured_media":357,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[13,44,15,45,47,46,49,50,48],"class_list":["post-246","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-ai","tag-computervision","tag-java","tag-machinelearning","tag-objectdetection","tag-opencv","tag-security","tag-smarthome","tag-yolo"],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/marcinzygmunt.pl\/blog\/wp-content\/uploads\/2026\/01\/yGROQ75Rk8lzef-07npKg_L6DVqX0U.png","_links":{"self":[{"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/posts\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/comments?post=246"}],"version-history":[{"count":8,"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/posts\/246\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/posts\/246\/revisions\/257"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/media\/357"}],"wp:attachment":[{"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/media?parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/categories?post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marcinzygmunt.pl\/blog\/wp-json\/wp\/v2\/tags?post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}