YOLO Object Detection on the Raspberry Pi AI HAT | Writing Python Scripts

Core Electronics November 29, 2024
Video Thumbnail

About

No channel description available.

Video Description

🔗 *The full guide* : _https://core-electronics.com.au/guides/raspberry-pi/yolo-object-detection-on-the-raspberry-pi-ai-hat-writing-custom-python/_ In this guide, we will be exploring how to set up *YOLO object detection* with the *Raspberry Pi AI HAT*, and more importantly, learning how to apply this in your *Python projects*. We will be taking a look at how to *install* the required *hardware and firmware* as well as how to set up and use the object detection *Python pipelines*. The result of this guide will have you equipped with an understanding of this whole setup, as well as three different *example scripts* we have written. One will "do something" when an object is detected, another when a certain number of objects are detected, and the last when an object is detected in a certain location. 🔧🔨🧰 Hardware featured in this guide: *13 TOPS AI HAT+:* _https://core-electronics.com.au/catalog/product/view/sku/CE09993_ *26 TOPS AI HAT+:* _https://core-electronics.com.au/catalog/product/view/sku/CE09994_ *Raspberry Pi 5:* _https://core-electronics.com.au/raspberry-pi/boards.html#category_1392_ 💡❓ If you have any questions about this content or want to share a project you're working on head over to our *maker forum:* _http://coreelec.io/forum_ 0:00 What we will be doing 0:30 What you will need 1:00 Installing the AI HAT 1:54 Installing firmware and Python pipelines 3:37 Looking at the file structure and pipeline 4:49 Running object recognition demo 6:29 Exploring the Python demo script 8:23 Project code 1: detecting objects 13:19 Disabling FPS shell reading 13:58 Project code 2: counting objects 16:03 Project code 3: object position 18:08 Wrap up 🌏🦘 *Core Electronics* is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for: • *Raspberry Pi* _https://core-electronics.com.au/raspberry-pi.html_ • *Arduino* _https://core-electronics.com.au/arduino.html_ • *Sparkfun* _https://core-electronics.com.au/brands/sparkfun-australia_ • *Adafruit* _https://core-electronics.com.au/brands/adafruit-australia_ • *Pololu* _https://core-electronics.com.au/brands/pololu-australia_ • *DFRobot* _https://core-electronics.com.au/brands/dfrobot-australia_ The following trademarks are owned by *Core Electronics Pty Ltd:* "Core Electronics" and the Core Electronics logo "Makerverse" and the Makerverse logo "PiicoDev" and the PiicoDev logo "GlowBit" and the GlowBit logo

You May Also Like

Upgrade Your Gaming Setup

AI-recommended products based on this video

Loading...
acer Nitro 50 N50-620-UA91 Gaming Desktop | 11th Gen Intel Core i5-11400F 6-Core Processor | NVIDIA GeForce GTX 1650 | 8GB DDR4 | 512GB NVMe M.2 SSD | Intel Wi-Fi 6 AX201 | Keyboard and Mouse

acer Nitro 50 N50-620-UA91 Gaming Desktop | 11th Gen Intel Core i5-11400F 6-Core Processor | NVIDIA GeForce GTX 1650 | 8GB DDR4 | 512GB NVMe M.2 SSD | Intel Wi-Fi 6 AX201 | Keyboard and Mouse

(283)
$1,658.99
Loading...
Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

(40)
$1,399.00
FREE delivery Feb 24 - Mar 5
Loading...
Acer Nitro V 15.6" FHD 165Hz Gaming Laptop, Intel i5-13420H, 16GB RAM, 512GB SSD, NVIDIA GeForce RTX 5050 8GB GDDR7, Copilot, Backlit Keyboard, Wi-Fi 6, Win 11, Black, 1TB Docking Station Set

Acer Nitro V 15.6" FHD 165Hz Gaming Laptop, Intel i5-13420H, 16GB RAM, 512GB SSD, NVIDIA GeForce RTX 5050 8GB GDDR7, Copilot, Backlit Keyboard, Wi-Fi 6, Win 11, Black, 1TB Docking Station Set

(1,689)
$1,349.00
FREE delivery Feb 24 - Mar 5Only 7 left in stock.
Loading...
Lenovo Legion Pro 5 16" WQXGA 165Hz Gaming Laptop, AMD Ryzen 9 9955HX, GeForce RTX 5070, 32GB DDR5, 3TB Storage (2TB SSD+1TB Docking Station Set), 24-Zone RGB Backlit Keyboard, WiFi 7, Win 11, Black

Lenovo Legion Pro 5 16" WQXGA 165Hz Gaming Laptop, AMD Ryzen 9 9955HX, GeForce RTX 5070, 32GB DDR5, 3TB Storage (2TB SSD+1TB Docking Station Set), 24-Zone RGB Backlit Keyboard, WiFi 7, Win 11, Black

(2)
$3,199.00
FREE delivery Feb 24 - Mar 5
Loading...
230W Charger for Lenovo Legion Slim Pro 5 5P 7 S7 C7 Y720 Y730 Y740 Y920 Y530 Y540 Y545 R720 ThinkPad P1 P16 P16v P15 P17 T15g P50 P50s P51 P52 P53 P70 P71 P72 P73 Laptop ideacentre/ThinkStation AIO

230W Charger for Lenovo Legion Slim Pro 5 5P 7 S7 C7 Y720 Y730 Y740 Y920 Y530 Y540 Y545 R720 ThinkPad P1 P16 P16v P15 P17 T15g P50 P50s P51 P52 P53 P70 P71 P72 P73 Laptop ideacentre/ThinkStation AIO

(10)
$47.99
FREE delivery Sat, Jun 21
Loading...
New Slim 170W AC Charger Fit for Lenovo Legion Slim 5 5i Yoga Pro 9i ThinkPad P1 P16 P16v P53 P70 P71 P72 P73 IdeaPad Pro 5i 5 3 LOQ 16 15 ADL170SCC3A 20V 8.5A Laptop Power Supply Adapter Cord

New Slim 170W AC Charger Fit for Lenovo Legion Slim 5 5i Yoga Pro 9i ThinkPad P1 P16 P16v P53 P70 P71 P72 P73 IdeaPad Pro 5i 5 3 LOQ 16 15 ADL170SCC3A 20V 8.5A Laptop Power Supply Adapter Cord

(3)
$36.89
FREE delivery Sat, Jun 21
Loading...
170W AC Charger for Lenovo ThinkPad P1 P50 P51 P52 P53 P70 P71 P72 P73 P16 P16v P17 P15 T15g P15v T15p X1 Extreme Legion Y520 IdeaPad Pro 5 Yoga Slim 7 Laptop ThinkStation ThinkCentre IdeaCentre AIO

170W AC Charger for Lenovo ThinkPad P1 P50 P51 P52 P53 P70 P71 P72 P73 P16 P16v P17 P15 T15g P15v T15p X1 Extreme Legion Y520 IdeaPad Pro 5 Yoga Slim 7 Laptop ThinkStation ThinkCentre IdeaCentre AIO

(8)
$35.99
FREE delivery Sun, Jun 22
Loading...
95MM T129215SU Cooling Fan for ASUS ROG Strix for GeForce RTX 3060 3070 3080 3090 Ti Graphics Card CF1010U12S/D T129215BU(Black A-Fan T12)

95MM T129215SU Cooling Fan for ASUS ROG Strix for GeForce RTX 3060 3070 3080 3090 Ti Graphics Card CF1010U12S/D T129215BU(Black A-Fan T12)

(0)
$43.56
FREE delivery Mar 19 - Apr 10
Loading...
ASUS ROG Strix G16 Gaming Laptop, GeForce RTX 5070 Ti 12GB GDDR7, AMD Ryzen 9 8940HX, 64GB DDR5, 2TB SSD, Backlit Keyboard, Wi-Fi 6E, 16" WUXGA 165Hz Display, Win 11, Gray, 1TB Docking Station Set

ASUS ROG Strix G16 Gaming Laptop, GeForce RTX 5070 Ti 12GB GDDR7, AMD Ryzen 9 8940HX, 64GB DDR5, 2TB SSD, Backlit Keyboard, Wi-Fi 6E, 16" WUXGA 165Hz Display, Win 11, Gray, 1TB Docking Station Set

(10)
$4,269.00
FREE delivery Feb 24 - Mar 5
Loading...
ASUS ROG Strix G16 (2024) Gaming Laptop, 16” 16:10 FHD+ 165Hz, GeForce RTX 4060, Intel Core i7-13650HX, 16GB DDR5, 1TB PCIe SSD, Wi-Fi 6E, Windows 11, G614JV-AS71-CA

ASUS ROG Strix G16 (2024) Gaming Laptop, 16” 16:10 FHD+ 165Hz, GeForce RTX 4060, Intel Core i7-13650HX, 16GB DDR5, 1TB PCIe SSD, Wi-Fi 6E, Windows 11, G614JV-AS71-CA

(43)
$1,659.99$1,549.30
FREE delivery Feb 19 - 23
Loading...
Asus ROG STRIX Z890-A GAMING WIFI Z890 LGA 1851 ATX motherboard, Intel® Core™ Ultra Series 2 Ready, Advanced AI PC-ready, 16+2+1+2 stages, DDR5, WiFi 7, 2.5G, 5x M.2, Thunderbolt™ 4, USB Type-C, AI OC

Asus ROG STRIX Z890-A GAMING WIFI Z890 LGA 1851 ATX motherboard, Intel® Core™ Ultra Series 2 Ready, Advanced AI PC-ready, 16+2+1+2 stages, DDR5, WiFi 7, 2.5G, 5x M.2, Thunderbolt™ 4, USB Type-C, AI OC

(54)
$299.99
FREE delivery Jan 11 - Feb 5
Loading...
230W Charger Compatible with Razer Blade 14” 15” 16" 17” (2025-2018) RZ09 RTX-3060/3070/3080/4060/4070 Gaming Laptop RC30-0530 RC30-0238 RC30-0248 Replacement Power Adapter

230W Charger Compatible with Razer Blade 14” 15” 16" 17” (2025-2018) RZ09 RTX-3060/3070/3080/4060/4070 Gaming Laptop RC30-0530 RC30-0238 RC30-0248 Replacement Power Adapter

(16)
$67.99
FREE delivery Mon, Feb 16
Loading...
MSI Thin 15 15.6" 144Hz Gaming Laptop, Intel® Core™ 5-210H, RTX 4050, 16GB DDR5, 1TB NVMe SSD, Windows 11 Home

MSI Thin 15 15.6" 144Hz Gaming Laptop, Intel® Core™ 5-210H, RTX 4050, 16GB DDR5, 1TB NVMe SSD, Windows 11 Home

(6)
$1,099.00
FREE delivery Mon, Feb 16
Loading...
MSI Ultra-Slim Thin 15 VR-Ready High FPS Gaming Laptop, 15.6 FHD 144Hz, Intel Core i5-13420H, NVIDIA GeForce RTX 4060, 32GB RAM, 2TB SSD, Backlit KB, Wi-Fi 6, Bundle with PCO Notebook Fold Radiator

MSI Ultra-Slim Thin 15 VR-Ready High FPS Gaming Laptop, 15.6 FHD 144Hz, Intel Core i5-13420H, NVIDIA GeForce RTX 4060, 32GB RAM, 2TB SSD, Backlit KB, Wi-Fi 6, Bundle with PCO Notebook Fold Radiator

(0)
$4,697.44
FREE delivery Jun 23 - Jul 3Only 3 left in stock.
Loading...
llano RGB Laptop Cooling Pad with Powerful Turbofan Gaming Cooler Radiator with Infinitely Variable Speed, Touch Control, LCD Screen, 3-Port USB Hub, Seal Foam for Notebook Computer 15-19in

llano RGB Laptop Cooling Pad with Powerful Turbofan Gaming Cooler Radiator with Infinitely Variable Speed, Touch Control, LCD Screen, 3-Port USB Hub, Seal Foam for Notebook Computer 15-19in

(1,404)
$129.99
Prime
200+ bought in past month
Loading...
18.5 Inch Portable Touchscreen Gaming Monitor, High Resolution 1920x1080 with HDR, for PC, Phone Game Console, Easy Connection, Large Display

18.5 Inch Portable Touchscreen Gaming Monitor, High Resolution 1920x1080 with HDR, for PC, Phone Game Console, Easy Connection, Large Display

(0)
$226.59
$2.99 delivery Aug 19 - 29
Loading...
GEEKOM A8 Mini PC (High Performance) – AMD Ryzen 7 8745HS, 16GB DDR4 Upgradable RAM + 1TB SSD, Mini Desktop for Gaming, Video Editing & Productivity, Windows 11 Pro, USB4, 8K/Quad Monitor Ready

GEEKOM A8 Mini PC (High Performance) – AMD Ryzen 7 8745HS, 16GB DDR4 Upgradable RAM + 1TB SSD, Mini Desktop for Gaming, Video Editing & Productivity, Windows 11 Pro, USB4, 8K/Quad Monitor Ready

(678)
$899.00
FREE delivery Sun, Jan 4
Loading...
600Mbps WiFi Adapter for Laptop, Driver Free Dual Band USB Wireless Network Adapter for Desktop PC Gaming, High Speed Mini WiFi Dongle Stick Adaptateur WiFi, Plug&Play, Compatible with Windows OS

600Mbps WiFi Adapter for Laptop, Driver Free Dual Band USB Wireless Network Adapter for Desktop PC Gaming, High Speed Mini WiFi Dongle Stick Adaptateur WiFi, Plug&Play, Compatible with Windows OS

(21)
$15.99
FREE delivery Sun, Jun 22 on your first order
Loading...
Lexar EQ790 4TB SSD M.2 2280 PCIe Gen4x4 NVMe 1.4, Blazing Speeds Up to 7000MB/s Read 6000MB/s Write for Intense Workloads & PS5 PC Gaming, High Performance Internal Solid State Drive

Lexar EQ790 4TB SSD M.2 2280 PCIe Gen4x4 NVMe 1.4, Blazing Speeds Up to 7000MB/s Read 6000MB/s Write for Intense Workloads & PS5 PC Gaming, High Performance Internal Solid State Drive

(334)
$319.99
100+ bought in past month
Loading...
Logitech G435 Lightspeed and Bluetooth Wireless Gaming Headset - Lightweight Over-Ear Headphones, Built-in mics, 18h Battery, Compatible with Dolby Atmos, PC, Mobile - Black

Logitech G435 Lightspeed and Bluetooth Wireless Gaming Headset - Lightweight Over-Ear Headphones, Built-in mics, 18h Battery, Compatible with Dolby Atmos, PC, Mobile - Black

(14,873)
$49.99$39.99
FREE delivery Thu, Aug 21
400+ bought in past month
Loading...
Logitech G305 Lightspeed Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Logitech G305 Lightspeed Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

(35,879)
$49.99$44.99
FREE delivery Mon, Jan 26
1K+ bought in past month
Loading...
Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

(48,912)
$15.99$12.79
FREE delivery Wed, Feb 18 on your first order
1K+ bought in past month
Loading...
Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black
Best Seller

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

(17,871)
$27.98$22.38
FREE delivery Tue, Oct 14 on your first order
500+ bought in past month
Loading...
Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

(17,449)
$54.98$48.21
FREE delivery Mon, Jan 26
3K+ bought in past month
Loading...
230W Charger Compatible with Razer Blade 14” 15” 16" 17” (2025-2018) RZ09 RTX-3060/3070/3080/4060/4070 Gaming Laptop RC30-0530 RC30-0238 RC30-0248 Replacement Power Adapter

230W Charger Compatible with Razer Blade 14” 15” 16" 17” (2025-2018) RZ09 RTX-3060/3070/3080/4060/4070 Gaming Laptop RC30-0530 RC30-0238 RC30-0248 Replacement Power Adapter

(16)
$67.99
FREE delivery Mon, Feb 16
Loading...
Logitech G305 Lightspeed Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Logitech G305 Lightspeed Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

(35,879)
$49.99$44.99
FREE delivery Mon, Jan 26
1K+ bought in past month
Loading...
Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

(48,912)
$15.99$12.79
FREE delivery Wed, Feb 18 on your first order
1K+ bought in past month
Loading...
Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black
Best Seller

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

(17,871)
$27.98$22.38
FREE delivery Tue, Oct 14 on your first order
500+ bought in past month
Loading...
Logitech G435 Lightspeed and Bluetooth Wireless Gaming Headset - Lightweight Over-Ear Headphones, Built-in mics, 18h Battery, Compatible with Dolby Atmos, PC, Mobile - Black

Logitech G435 Lightspeed and Bluetooth Wireless Gaming Headset - Lightweight Over-Ear Headphones, Built-in mics, 18h Battery, Compatible with Dolby Atmos, PC, Mobile - Black

(14,873)
$49.99$39.99
FREE delivery Thu, Aug 21
400+ bought in past month
Loading...
230W Charger Compatible with Razer Blade 14” 15” 16" 17” (2025-2018) RZ09 RTX-3060/3070/3080/4060/4070 Gaming Laptop RC30-0530 RC30-0238 RC30-0248 Replacement Power Adapter

230W Charger Compatible with Razer Blade 14” 15” 16" 17” (2025-2018) RZ09 RTX-3060/3070/3080/4060/4070 Gaming Laptop RC30-0530 RC30-0238 RC30-0248 Replacement Power Adapter

(16)
$67.99
FREE delivery Mon, Feb 16
Loading...
Lenovo LOQ 15.6" FHD 144Hz Gaming Laptop, Intel Core i5-12450HX, NVIDIA GeForce RTX 2050, 16GB DDR5, 2TB Storage (1TB SSD+1TB Docking Station Set), Number Pad, 720p Camera, Wi-Fi 6, Win 11, Gray

Lenovo LOQ 15.6" FHD 144Hz Gaming Laptop, Intel Core i5-12450HX, NVIDIA GeForce RTX 2050, 16GB DDR5, 2TB Storage (1TB SSD+1TB Docking Station Set), Number Pad, 720p Camera, Wi-Fi 6, Win 11, Gray

(2)
$1,369.00
FREE delivery Feb 24 - Mar 5
Loading...
Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

(40)
$1,399.00
FREE delivery Feb 24 - Mar 5
Loading...
Lenovo Legion 5 15.1" WQXGA 165Hz Gaming Laptop, Intel i9 14900HX, GeForce RTX 5070 8GB GDDR7, 16GB DDR5, 2TB Storage(1TB SSD+1TB Docking Station Set), 24-Zone RGB Backlit Keyboard, Windows 11, Black

Lenovo Legion 5 15.1" WQXGA 165Hz Gaming Laptop, Intel i9 14900HX, GeForce RTX 5070 8GB GDDR7, 16GB DDR5, 2TB Storage(1TB SSD+1TB Docking Station Set), 24-Zone RGB Backlit Keyboard, Windows 11, Black

(68)
$2,749.00
FREE delivery Feb 24 - Mar 5
Loading...
Asus Dual NVIDIA GeForce RTX 3050 6GB OC Edition Gaming Graphics Card - PCIe 4.0, 6GB GDDR6 Memory, HDMI 2.1, DisplayPort 1.4a, 2-Slot Design, Axial-tech Fan Design, 0dB Technology, Steel Bracket

Asus Dual NVIDIA GeForce RTX 3050 6GB OC Edition Gaming Graphics Card - PCIe 4.0, 6GB GDDR6 Memory, HDMI 2.1, DisplayPort 1.4a, 2-Slot Design, Axial-tech Fan Design, 0dB Technology, Steel Bracket

(903)
$248.98
FREE delivery Sat, Jan 3
300+ bought in past month
Loading...
MSI NVIDIA GeForce RTX 3050 Ventus 2X XS 8G OC Graphics Card - 8 GB GDDR6, 1807 MHz, PCI Express Gen 4, 128 Bits, DP v 1.4a, DL DVI-D, HDMI 2.1 (Supports 4K at 120Hz)

MSI NVIDIA GeForce RTX 3050 Ventus 2X XS 8G OC Graphics Card - 8 GB GDDR6, 1807 MHz, PCI Express Gen 4, 128 Bits, DP v 1.4a, DL DVI-D, HDMI 2.1 (Supports 4K at 120Hz)

(760)
$1,020.45
Loading...
Yeston RTX 3050 6GB GDDR6 Graphics Cards Nvidia pci Express 4.0 x8 Video Cards Desktop Computer PC Video Gaming Graphics Card

Yeston RTX 3050 6GB GDDR6 Graphics Cards Nvidia pci Express 4.0 x8 Video Cards Desktop Computer PC Video Gaming Graphics Card

(94)
$448.71$429.58
FREE delivery Feb 18 - 20