Skip to content

Commit 5392f18

Browse files
authored
Update README.md
1 parent 66451d6 commit 5392f18

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ docker run -p 6379:6379 --name=redis-opencv ghcr.io/redisgrafana/redis-opencv:la
3636

3737
Check that OpenCV with dependencies downloaded, installed and registered in the RedisGears requirements:
3838

39-
```
39+
```bash
4040
cluster.remote:6379> rg.pydumpreqs
4141
1) 1) "GearReqVersion"
4242
2) (integer) 1
@@ -81,7 +81,7 @@ cluster.remote:6379> rg.pydumpreqs
8181

8282
The loader script will load AI model and [PyTorch](https://pytorch.org/) script to the Redis database.
8383

84-
```
84+
```bash
8585
cd src/
8686
python3 ai-loader.py -u redis://redis:6379
8787
```
@@ -90,7 +90,7 @@ python3 ai-loader.py -u redis://redis:6379
9090

9191
Grafana can be started using Docker Compose or installed locally with [Redis plug-ins for Grafana](https://redisgrafana.github.io) and [Volkov Labs Image panel](https://github.com/VolkovLabs/grafana-image-panel).
9292

93-
```
93+
```bash
9494
docker-compose pull
9595
docker-compose up
9696
```
@@ -99,18 +99,35 @@ When starting using Docker Compose, dashboard and plug-ins will be auto-provisio
9999

100100
## Register RedisGears script
101101

102-
Select `Camera Processing` dashboard and copy-paste `gears-yolo.py` script to RedisGears Script editor panel. Click on the `Run script` button and you should see `StreamReader` Registration.
102+
Select `Camera Processing` dashboard and copy-paste `gears-yolo.py` script to RedisGears Script editor panel. Click on the `Run script` button and you should see `StreamReader` in the Registration panel.
103103

104104
![RedisGears Script Editor](https://raw.githubusercontent.com/RedisGrafana/redis-camera-ai/main/images/gears-script-editor.png)
105105

106106
## Start Camera
107107

108108
Copy script `edge-camera.py` to IoT or any device with camera. Run script by specifying Redis URL, number of frames per second and rotate camera if required.
109109

110-
```
110+
```bash
111111
python3 camera.py -u redis://redis:6379 --fps 6 --rotate-90-clockwise true
112112
```
113113

114+
You should see output with Stream's Id and size of the jpeg file.
115+
116+
```bash
117+
# python3 camera.py -u redis://red:6379 --fps 6 --rotate-90-clockwise true
118+
Connected to Redis: ParseResult(scheme='redis', netloc='redis:6379', path='', params='', query='', fragment='')
119+
id: b'1622145939609-0', size: 5479
120+
id: b'1622145939769-0', size: 10006
121+
id: b'1622145939928-0', size: 6709
122+
id: b'1622145940100-0', size: 6037
123+
id: b'1622145940266-0', size: 6468
124+
id: b'1622145940435-0', size: 11607
125+
id: b'1622145940597-0', size: 5577
126+
id: b'1622145940768-0', size: 6041
127+
id: b'1622145940926-0', size: 5570
128+
id: b'1622145941098-0', size: 5916
129+
```
130+
114131
## Learn more
115132

116133
- Redis plug-ins for Grafana [Documentation](https://redisgrafana.github.io/)

0 commit comments

Comments
 (0)