{"id":5001,"date":"2024-11-24T12:46:54","date_gmt":"2024-11-24T08:46:54","guid":{"rendered":"https:\/\/nayarweb.com\/blog\/?p=5001"},"modified":"2024-11-24T13:11:08","modified_gmt":"2024-11-24T09:11:08","slug":"using-ai-to-catch-a-thief-in-flic-en-flac","status":"publish","type":"post","link":"https:\/\/nayarweb.com\/blog\/2024\/using-ai-to-catch-a-thief-in-flic-en-flac\/","title":{"rendered":"Using AI to Catch a Thief in Flic-en-Flac"},"content":{"rendered":"<p>A thief stole a bicycle on my porch and we have CCTV cameras installed. However, witnesses couldn\u2019t recall the exact time, leaving us with three full days of footage to review. Watching it manually was impractical, especially since the mobile app couldn\u2019t fast-forward remotely as it was not on the same LAN as the DVR.<\/p>\n<p>We downloaded all 65 video files from the DVR, but even that was daunting. That\u2019s when I turned to AI.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5003\" src=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115902.png\" alt=\"\" width=\"1032\" height=\"1304\" srcset=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115902.png 1032w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115902-237x300.png 237w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115902-810x1024.png 810w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115902-768x970.png 768w\" sizes=\"auto, (max-width: 1032px) 100vw, 1032px\" \/><\/p>\n<h4><strong>Using AI to Solve the Problem<\/strong><\/h4>\n<p>I asked ChatGPT to write a Python script to detect bicycles in the footage.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5005\" src=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.35.52.png\" alt=\"\" width=\"2056\" height=\"332\" srcset=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.35.52.png 2056w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.35.52-300x48.png 300w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.35.52-1024x165.png 1024w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.35.52-768x124.png 768w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.35.52-1536x248.png 1536w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.35.52-2048x331.png 2048w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.35.52-1272x205.png 1272w\" sizes=\"auto, (max-width: 2056px) 100vw, 2056px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5006\" src=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.17.png\" alt=\"\" width=\"1486\" height=\"368\" srcset=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.17.png 1486w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.17-300x74.png 300w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.17-1024x254.png 1024w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.17-768x190.png 768w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.17-1272x315.png 1272w\" sizes=\"auto, (max-width: 1486px) 100vw, 1486px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5007\" src=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.48.png\" alt=\"\" width=\"1602\" height=\"818\" srcset=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.48.png 1602w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.48-300x153.png 300w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.48-1024x523.png 1024w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.48-768x392.png 768w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.48-1536x784.png 1536w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.36.48-1272x649.png 1272w\" sizes=\"auto, (max-width: 1602px) 100vw, 1602px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5008\" src=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.37.13.png\" alt=\"\" width=\"1458\" height=\"1052\" srcset=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.37.13.png 1458w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.37.13-300x216.png 300w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.37.13-1024x739.png 1024w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.37.13-768x554.png 768w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-24-at-12.37.13-1272x918.png 1272w\" sizes=\"auto, (max-width: 1458px) 100vw, 1458px\" \/><\/p>\n<p>The script worked immediately, but after some testing, I adjusted it to detect people instead\u2014making it faster and more efficient.<\/p>\n<p>It saved only frames with detected persons, reducing hours of video to just the important clips.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5004\" src=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115952.png\" alt=\"\" width=\"1300\" height=\"1093\" srcset=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115952.png 1300w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115952-300x252.png 300w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115952-1024x861.png 1024w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115952-768x646.png 768w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241124_115952-1272x1069.png 1272w\" sizes=\"auto, (max-width: 1300px) 100vw, 1300px\" \/><\/p>\n<h4><strong>Tools and Setup<\/strong><\/h4>\n<p>I ran the script on an Ubuntu machine with an NVIDIA RTX 4070 ti super GPU, which processed the footage quickly. What would have taken days was done in almost 3 to 4 hours.<\/p>\n<h4><strong>The Moment of Truth<\/strong><\/h4>\n<p>Reviewing the condensed clips, I finally found the thief on camera, riding away with the bicycle.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5011 size-full\" src=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/WhatsApp-Image-2024-11-23-at-22.50.44-1-e1732437840407.jpeg\" alt=\"\" width=\"720\" height=\"828\" srcset=\"https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/WhatsApp-Image-2024-11-23-at-22.50.44-1-e1732437840407.jpeg 720w, https:\/\/nayarweb.com\/blog\/wp-content\/uploads\/2024\/11\/WhatsApp-Image-2024-11-23-at-22.50.44-1-e1732437840407-261x300.jpeg 261w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/p>\n<p>What do you think is the proper way to bring justice?<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A thief stole a bicycle on my porch and we have CCTV cameras installed. However, witnesses couldn\u2019t recall the exact time, leaving us with three full days of footage to review. Watching it manually was impractical, especially since the mobile app couldn\u2019t fast-forward remotely as it was not on the same LAN as the DVR. &hellip; <a href=\"https:\/\/nayarweb.com\/blog\/2024\/using-ai-to-catch-a-thief-in-flic-en-flac\/\" class=\"continue-reading\">Continue reading <span class=\"screen-reader-text\">Using AI to Catch a Thief in Flic-en-Flac<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":5011,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5001","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/posts\/5001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/comments?post=5001"}],"version-history":[{"count":3,"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/posts\/5001\/revisions"}],"predecessor-version":[{"id":5012,"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/posts\/5001\/revisions\/5012"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/media\/5011"}],"wp:attachment":[{"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/media?parent=5001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/categories?post=5001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nayarweb.com\/blog\/wp-json\/wp\/v2\/tags?post=5001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}