Skip to content

Commit 4100452

Browse files
committed
Add /home/jiahao/Tutorial-of-AI-Kit-with-Raspberry-Pi-From-Zero-to-Hero/articles/Chapter_6-RaspberryPi_and_AIoT/Smart_Retail_with_reComputerR11_and_AIkit.md
1 parent 7e8a6a5 commit 4100452

File tree

9 files changed

+105
-1
lines changed

9 files changed

+105
-1
lines changed

articles/Chapter_6-RaspberryPi_and_AIoT/Smart_Retail_with_reComputerR11_and_AIkit.md

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,108 @@ Beyond inventory and security, we integrated environmental monitoring using temp
1313

1414
All data and controls are consolidated into a Node-RED dashboard, providing an intuitive interface for monitoring and managing store operations effectively.
1515

16-
## First : Set your environment
16+
## First: set up your environment
17+
18+
### Download the project
19+
20+
```
21+
git clone https://github.com/Seeed-Projects/Smart-Retail-with-reComputerR11-and-AI-kit.git
22+
cd Smart-Retail-with-reComputerR11-and-AI-kit
23+
```
24+
25+
### Clone office example
26+
```
27+
git clone https://github.com/hailo-ai/hailo-rpi5-examples.git
28+
```
29+
### Setup environment
30+
31+
```
32+
cd hailo-rpi5-examples && source setup.sh
33+
```
34+
### Install requirements
35+
36+
```
37+
cd .. && pip install -r requirements.txt
38+
```
39+
### Post process compilation
40+
41+
```
42+
cd hailo-rpi5-examples && ./compile_postprocess.sh
43+
```
44+
45+
## Second: run Product_Detection
46+
47+
> **Note:**
48+
> /dev/video* will be your first usb camera
49+
50+
```
51+
cd ../Product_Detection && python detection_pipelin.py --hef-path ./yolov8n.hef -i /dev/video0 --labels-json ./config.json
52+
```
53+
## Third: run Warehouse_Monitoring
54+
55+
> **Note:**
56+
> '1' will be your second usb camera
57+
58+
you should open another terminal and run command below:
59+
```
60+
cd ../Warehouse_Monitoring/ && python app.py --device 1
61+
```
62+
## Fourth: run Node-RED
63+
64+
### Install mosquitto because the picture and message is sending by MQTT service:
65+
```
66+
sudo apt install -y mosquitto mosquitto-clients
67+
```
68+
69+
### Install node-red:
70+
```
71+
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
72+
```
73+
74+
### Enable node-red and start node-red:
75+
```
76+
sudo systemctl enable nodered.service
77+
sudo systemctl start nodered.service
78+
```
79+
80+
### Open node-red:
81+
```
82+
localhost:1880
83+
```
84+
The interface is like below:
85+
![](../../pictures/Chapter6/nodered_start.png)
86+
87+
### Install Dashboard and Modbus node:
88+
89+
![](../../pictures/Chapter6/dashboard_node.png)
90+
91+
![](../../pictures/Chapter6/modbus_node.png)
92+
93+
### Import the workflow
94+
95+
```
96+
cp nodered-workflow/flows.json ~/.node-red/lib/flows
97+
```
98+
And then, import flows like below:
99+
![](../../pictures/Chapter6/import_1.png)
100+
101+
### Deploy the flow, and the result is shown as below:
102+
103+
![](../../pictures/Chapter6/deploy_flow.png)
104+
105+
### Open Dashboard:
106+
1. Click the Dashboard button.
107+
![](../../pictures/Chapter6/dashboard_1.png)
108+
109+
2. Click the Dashboard button in the top right corner to open dashboard.
110+
![](../../pictures/Chapter6/dashboard_2.png)
111+
112+
3. The result is shown like below:
113+
![](../../pictures/Chapter6/dashboard_show.png)
114+
115+
116+
## The result
117+
118+
We use the Raspberry Pi to accelerate EfficientNet for intrusion detection in storage rooms through object recognition. Meanwhile, the AI Kit is used to accelerate the YOLOv8 model for object detection to determine the quantity of goods on the shelves.
119+
120+
<iframe width="1273" height="716" src="https://www.youtube.com/embed/Sd5J5k863Vs" title="Making Next Gadget: Master AI with Raspberry Pi, Power Smart Retail Solutions" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

pictures/Chapter6/dashboard_1.png

267 KB
Loading

pictures/Chapter6/dashboard_2.png

264 KB
Loading
134 KB
Loading
72.1 KB
Loading

pictures/Chapter6/deploy_flow.png

310 KB
Loading

pictures/Chapter6/import_1.png

302 KB
Loading

pictures/Chapter6/modbus_node.png

130 KB
Loading
75.8 KB
Loading

0 commit comments

Comments
 (0)