Skip to content

Commit 5054787

Browse files
johan-hultberg-workjimmy-rubin-workJimmy Rubinftor-work
authored
object-detection-yolov5: Update README to better reflect the code (#419)
Co-authored-by: Jimmy Rubin <[email protected]> Co-authored-by: Jimmy Rubin <[email protected]> Co-authored-by: Fernando Esquirio Torres <[email protected]>
1 parent 33346fb commit 5054787

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

object-detection-yolov5/README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,22 @@ example specified.
9595

9696
1. Retrieve parameters using the
9797
[Parameter API](https://developer.axis.com/acap/api/native-sdk-api/#parameter-api).
98-
2. Start a thread for continuously fetching frames with
98+
2. Select a resolution from vdo dependent on the neural network resolution and use a resolution
99+
that has the same aspect ratio as the native aspect ratio.
99100
[Video capture API (VDO)](https://developer.axis.com/acap/api/native-sdk-api/#video-capture-api-vdo).
100101
3. Create two Larod jobs with
101102
[Machine learning API (Larod)](https://developer.axis.com/acap/api/native-sdk-api/#machine-learning-api-larod):
102-
- Pre-processing job.
103+
- Pre-processing job. (Only created if needed)
103104
- Model inference job.
104105
4. Setup the style of bounding boxes using the
105106
[Bounding Box API](https://developer.axis.com/acap/api/native-sdk-api/#bounding-box-api).
106107
5. Run the main program loop:
107108
1. Fetch image data from VDO.
108109
2. Convert image data to the correct format with the Larod pre-processing job, if needed.
109110
3. Run inference with the Larod model inference job.
110-
4. Perform YOLOv5-specific parsing of the output.
111-
5. Draw bounding boxes and log details about the detected objects.
111+
4. Measure the total inference time (preprocessing and inference time) and adjust the framerate of the vdo stream if needed.
112+
5. Perform YOLOv5-specific parsing of the output.
113+
6. Draw bounding boxes and log details about the detected objects.
112114

113115
## Train YOLOv5
114116

@@ -254,6 +256,12 @@ docker build --tag <APP_IMAGE> --build-arg ARCH=<ARCH> --build-arg CHIP=<CHIP> .
254256
- `<ARCH>` is the SDK architecture, `armv7hf` or `aarch64`.
255257
- `<CHIP>` is the chip type, `artpec9`, `artpec8`, or `cpu`.
256258

259+
> [!NOTE]
260+
> This example may not build on Apple Silicon computers due to a Docker compatibility issue.
261+
> To work around this, you can disable the "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" option in Docker Desktop's General settings: **Settings → General → Virtual Machine Options**
262+
>
263+
> Note that disabling Rosetta allows the example to build successfully, but performance may be impacted as some optimizations for emulation are turned off. So, turn it on and off when needed.
264+
257265
Copy the result from the container image to a local directory `build`:
258266

259267
```sh

0 commit comments

Comments
 (0)