Skip to content

Commit

Permalink
MLECO-5454: VSI support driven by build-type
Browse files Browse the repository at this point in the history
Moving away from last implementation using a separate cproject to
configure VSI support. Instead it is now a build-type option for
object-detection example targeting Arm Corstone reference package
based FVPs.

Change-Id: I624a00ec93063f25cfcba4b229408a9623e300eb
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
  • Loading branch information
kshitij-sisodia-arm committed Oct 11, 2024
1 parent 171982f commit 4eea40b
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 91 deletions.
16 changes: 9 additions & 7 deletions cmsis-pack-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,11 @@ $ cp ./out/kws/STM32F746-DISCO/Release/kws.Release+STM32F746-DISCO.bin /media/us

### Working with Virtual Streaming Interface

The object detection example supports the Virtual Streaming Interface (VSI) feature found in the FVPs for Arm Corstone-300, Corstone-310 and Corstone-315.
This allows the locally installed FVP application (or an AVH instance) to read images in from a camera connected to
your local machine and stream these over to the application running within the FVP.
The object detection example supports the Virtual Streaming Interface (VSI) feature found in the
FVPs for Arm Corstone-300, Corstone-310, Corstone-315 and Corstone-320. To build the example with
VSI support, switch the build type to `VSI-enabled`. This allows the locally installed FVP
application to read images in from a camera connected to your host machine and stream these over
to the application running within the FVP.

To run the VSI application, append the command line with the v_path argument. For example:

Expand All @@ -248,8 +250,8 @@ For Arm Corstone-300 and Arm Corstone-310:

```shell
$ <path_to_installed_FVP> \
-a ./out/object-detection-vsi/AVH-SSE-300-U55/Release/object-detection-vsi.axf \
-C ethosu.num_macs=256 \
-a ./out/object-detection/AVH-SSE-300-U55/VSI-enabled/object-detection.axf \
-f ./device/corstone/fvp-configs/mps3_fvp_config.txt \
-C mps3_board.v_path=./device/corstone/vsi/video/python/
```

Expand All @@ -259,8 +261,8 @@ For Arm Corstone-315 and Arm Corstone-320:

```shell
$ <path_to_installed_FVP> \
-a ./out/object-detection-vsi/AVH-SSE-315-U65/Release/object-detection-vsi.axf \
-C ethosu.num_macs=256 \
-a ./out/object-detection/AVH-SSE-320-U85/VSI-enabled/object-detection.axf \
-f ./device/corstone/fvp-configs/mps4_fvp_config.txt \
-C mps4_board.v_path=./device/corstone/vsi/video/python/
```

Expand Down
Binary file modified cmsis-pack-examples/docs/02-build-run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 10 additions & 29 deletions cmsis-pack-examples/mlek.csolution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ solution:
debug: off
optimize: speed

- type: VSI-enabled
compiler: AC6
debug: off
optimize: speed

target-types:
# Arm Corstone-300 targets
- type: AVH-SSE-300
Expand Down Expand Up @@ -156,35 +161,11 @@ solution:
- +AVH-SSE-315-U65
- +AVH-SSE-320
- +AVH-SSE-320-U85
- +Alif-E7-M55-HP

# Object detection with Virtual Streaming Interface (VSI) support
- project: ./object-detection/object-detection-vsi.cproject.yml
for-context:
- +AVH-SSE-300
- +AVH-SSE-300-U55
- +AVH-SSE-300-U65
- +AVH-SSE-310
- +AVH-SSE-310-U55
- +AVH-SSE-310-U65
- +AVH-SSE-315
- +AVH-SSE-315-U65
- +AVH-SSE-320
- +AVH-SSE-320-U85
- .Debug+Alif-E7-M55-HP
- .Release+Alif-E7-M55-HP

# Keyword Spotting (KWS) use case
- project: ./kws/kws.cproject.yml
for-context:
- +AVH-SSE-300
- +AVH-SSE-300-U55
- +AVH-SSE-300-U65
- +AVH-SSE-310
- +AVH-SSE-310-U55
- +AVH-SSE-310-U65
- +AVH-SSE-315
- +AVH-SSE-315-U65
- +AVH-SSE-320
- +AVH-SSE-320-U85
- +FRDM-K64F
- +STM32F746-DISCO
- +Alif-E7-M55-HE
not-for-context:
- .VSI-enabled
- +Alif-E7-M55-HP

This file was deleted.

76 changes: 64 additions & 12 deletions cmsis-pack-examples/object-detection/object-detection.cproject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,9 @@ project:

groups:
- group: MainStatic
for-context:
- +AVH-SSE-300
- +AVH-SSE-300-U55
- +AVH-SSE-300-U65
- +AVH-SSE-310
- +AVH-SSE-310-U55
- +AVH-SSE-310-U65
- +AVH-SSE-315
- +AVH-SSE-315-U65
- +AVH-SSE-320
- +AVH-SSE-320-U85
not-for-context:
- .VSI-enabled
- +Alif-E7-M55-HP
files:
- file: include/InputFiles.hpp
- file: src/InputFiles.cpp
Expand All @@ -47,6 +39,61 @@ project:
files:
- file: src/main_live.cpp

- group: MainVSI
for-context:
- .VSI-enabled
files:
- file: src/main_vsi.cpp

- group: Use Case
files:
- file: src/yolo-fastest_192_face_v4.tflite.cpp
for-context:
- +AVH-SSE-300
- +AVH-SSE-310
- +AVH-SSE-315
- +AVH-SSE-320
- file: src/yolo-fastest_192_face_v4_vela_H256.tflite.cpp
for-context:
- +AVH-SSE-300-U55
- +AVH-SSE-310-U55
- +Alif-E7-M55-HP
- file: src/yolo-fastest_192_face_v4_vela_Y256.tflite.cpp
for-context:
- +AVH-SSE-300-U65
- +AVH-SSE-310-U65
- +AVH-SSE-315-U65
- file: src/yolo-fastest_192_face_v4_vela_Z256.tflite.cpp
for-context:
- +AVH-SSE-320-U85

- group: Device Files
files:
- file: linker/mps3-sse-300.sct
for-context:
- +AVH-SSE-300
- +AVH-SSE-300-U55
- +AVH-SSE-300-U65

- file: linker/mps3-sse-310.sct
for-context:
- +AVH-SSE-310
- +AVH-SSE-310-U55
- +AVH-SSE-310-U65

- file: linker/mps4-sse-315.sct
for-context:
- +AVH-SSE-315
- +AVH-SSE-315-U65
- +AVH-SSE-320
- +AVH-SSE-320-U85

- file: linker/alif-e7-m55-hp.sct
for-context: +Alif-E7-M55-HP

define:
- ACTIVATION_BUF_SZ: 532480

layers:
- layer: ../common/common.clayer.yml

Expand All @@ -67,4 +114,9 @@ project:
for-context:
- +Alif-E7-M55-HP

- layer: ./object-detection.clayer.yml
- layer: ../device/corstone/vsi/vsi.clayer.yml
for-context:
- .VSI-enabled

components:
- component: ARM::ML Eval Kit:Vision:Object detection

0 comments on commit 4eea40b

Please sign in to comment.