Skip to content

Commit 4af8559

Browse files
pperonskiglatosinski
authored andcommitted
[#82173] example: readme: Updated example README for instruction on how to install CPU-enabled TVM
1 parent 3f5f9a5 commit 4af8559

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

  • examples/kenning-instance-segmentation

examples/kenning-instance-segmentation/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ Also, if you want to change the camera path, set the `CAMERA_PATH` variable with
8585
Scripts checks for the presence of NVIDIA drivers - if NVIDIA GPU is not present, the container will run in CPU-only mode.
8686
If you want to explicitly run the container without GPU acceleration, run:
8787

88-
8988
```
9089
../run-docker.sh cpu
9190
```
@@ -124,10 +123,24 @@ cd /data
124123
To get the runtime to perform in real time, you need to first optimize YOLACT model for your machine.
125124
In this example, we will use the Apache TVM compiler to compile the model for the GPU.
126125

126+
### Install TVM for CPU only inference
127+
128+
If you run CPU only inference you need to install:
129+
130+
```bash
131+
pip install --force-reinstall apache-tvm
132+
```
133+
134+
and then run:
135+
136+
```bash
137+
ldconfig
138+
```
139+
127140
First, install Kenning with its necessary dependencies:
128141

129142
```bash
130-
pip install ./kenning[object_detection]
143+
pip install "./kenning[object_detection]"
131144
```
132145

133146
Then, run the [scenario with YOLACT optimizations for the GPU](https://github.com/antmicro/kenning/blob/main/scripts/jsonconfigs/yolact-tvm-gpu-detection.json).
@@ -168,7 +181,7 @@ Then, to run the demo, load the ROS 2 environment including the newly built pack
168181
source install/setup.sh
169182
```
170183

171-
Next, launch Kenning, Camera node, and GUI node using the launch file [`kenning-instance-segmentation.py`](./kenning-instance-segmentation.py):
184+
Next, launch Kenning, Camera node, and GUI node using the launch file [`kenning-instance-segmentation.py use_gui:=True`](./kenning-instance-segmentation.py):
172185

173186
```
174187
ros2 launch gui_node kenning-instance-segmentation.py
@@ -180,7 +193,7 @@ In case you want to change the path to the camera, use the `camera_path:=<new-pa
180193
ros2 launch gui_node kenning-instance-segmentation.py camera_path:=/dev/video1
181194
```
182195

183-
For CPU-only demo of the instance segmentation run [`kenning-instance-segmentation-cpu.py`](./kenning-instance-segmentation-cpu.py) as follows:
196+
For CPU-only demo of the instance segmentation run [`kenning-instance-segmentation-cpu.py use_gui:=True`](./kenning-instance-segmentation-cpu.py) as follows:
184197

185198
```
186199
ros2 launch gui_node kenning-instance-segmentation-cpu.py

0 commit comments

Comments
 (0)