This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:edge2:npu:demos:vgg16 [2023/08/25 02:50] hyphop [convert] |
products:sbc:edge2:npu:demos:vgg16 [2023/09/20 03:12] (current) louis |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ~~tag> |
+ | |||
+ | ====== VGG16 TensorFlow Keras Edge2 Demo - 4 ====== | ||
+ | |||
+ | {{indexmenu_n> | ||
===== Get Source Code ===== | ===== Get Source Code ===== | ||
Line 32: | Line 36: | ||
==== Get convert tool ==== | ==== Get convert tool ==== | ||
- | Download Tool from [[https:// | + | Download Tool from [[gh>rockchip-linux/ |
```shell | ```shell | ||
Line 39: | Line 43: | ||
``` | ``` | ||
- | Install dependences and RKNN toolkit2 packages, | + | Install dependences and RKNN toolkit2 packages. |
```shell | ```shell | ||
Line 49: | Line 53: | ||
``` | ``` | ||
- | ==== convert | + | ==== Convert |
Keras model can convert rknn model directly. But this demo is to convert tensorflow model(.pb) first, and convert tnesorflow model to rknn model. We use this tool to convert. | Keras model can convert rknn model directly. But this demo is to convert tensorflow model(.pb) first, and convert tnesorflow model to rknn model. We use this tool to convert. | ||
Line 57: | Line 61: | ||
``` | ``` | ||
- | Enter rknn-toolkit2/ | + | Enter '' |
- | ```python | + | ```python test.py |
# Create RKNN object | # Create RKNN object | ||
rknn = RKNN(verbose=True) | rknn = RKNN(verbose=True) | ||
Line 96: | Line 100: | ||
``` | ``` | ||
- | Run test.py to generate rknn model. | + | Run '' |
```shell | ```shell | ||
Line 106: | Line 110: | ||
==== Get source code ==== | ==== Get source code ==== | ||
- | Clone the source code form our [[https:// | + | Clone the source code from our [[gh>khadas/ |
```shell | ```shell | ||
Line 123: | Line 127: | ||
=== Picture input demo === | === Picture input demo === | ||
- | Put yolov8n.rknn in edge2-npu/ | + | Put '' |
```shell | ```shell | ||
- | // compile | + | # Compile |
$ bash build.sh | $ bash build.sh | ||
- | // run | + | # Run |
$ cd install/ | $ cd install/ | ||
$ ./vgg16 data/ | $ ./vgg16 data/ | ||
Line 135: | Line 139: | ||
<WRAP tip > | <WRAP tip > | ||
- | If your yolov8n | + | If your **VGG16** |
</ | </ | ||