You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example demonstrates an advanced use of a custom frontend. On the DepthAI backend, it runs either the **YOLO-World** (default) or **YOLOE** model on-device, with configurable class labels and confidence threshold — both controllable via the frontend.
3
+
This example demonstrates an advanced use of a custom frontend. On the DepthAI backend, it runs either **YOLOE** (default) or **YOLO-World** on-device, with configurable class labels and confidence threshold — both controllable via the frontend.
4
4
The frontend, built using the `@luxonis/depthai-viewer-common` package, displays a real-time video stream with detections. It is combined with the [default oakapp docker image](https://hub.docker.com/r/luxonis/oakapp-base), which enables remote access via WebRTC.
5
5
6
6
> **Note:** This example works only on RVC4 in standalone mode.
@@ -16,30 +16,34 @@ Running this example requires a **Luxonis device** connected to your computer. R
16
16
Here is a list of all available parameters:
17
17
18
18
```
19
-
-d DEVICE, --device DEVICE
20
-
Optional name, DeviceID or IP of the camera to connect to. (default: None)
21
-
-fps FPS_LIMIT, --fps-limit FPS_LIMIT
22
-
FPS limit. (default: None)
23
-
-ip IP, --ip IP IP address to serve the frontend on. (default: None)
24
-
-p PORT, --port PORT Port to serve the frontend on. (default: None)
25
-
-n MODEL_NAME, --model-name MODEL_NAME
26
-
Name of the model to use: yolo-world or yoloe (default: yolo-world)
19
+
-fps FPS_LIMIT, --fps_limit FPS_LIMIT
20
+
FPS limit. (default: None)
21
+
-ip IP, --ip IP IP address to serve the frontend on. (default: None)
22
+
-p PORT, --port PORT Port to serve the frontend on. (default: None)
23
+
-m MODEL, --model MODEL
24
+
Name of the model to use: yolo-world or yoloe (default: yoloe)
25
+
--precision PRECISION
26
+
Model precision for YOLOE models: int8 (faster) or fp16 (more accurate) (default: fp16)
27
27
```
28
28
29
29
### Model Options
30
30
31
-
This example supports two different YOLO models:
31
+
This example supports two YOLO models:
32
32
33
-
-**YOLO-World** (default): An open-vocabulary object detection model that supports both text-based class definitions and image-based prompting (upload an image to detect similar objects)
34
-
-**YOLOE**: A fast and efficient object detection model with enhanced visualization features including instance segmentation
33
+
-**YOLOE** (default): Supports both text prompts and image prompts (visual prompts). The model outputs 160 classes in total: indices 0–79 correspond to text prompts, and indices 80–159 correspond to image prompts. When only one prompt type is provided, dummy inputs are sent for the other and ignored by the model.
34
+
-**YOLO-World**: Open-vocabulary detection with text prompts and optional image prompting (CLIP visual encoder).
35
+
36
+
Notes:
37
+
38
+
- Backend function `extract_image_prompt_embeddings(image, max_num_classes=80, model_name, mask_prompt=None)` accepts an optional `mask_prompt` of shape `(80,80)` or `(1,1,80,80)` for `yoloe`. When `None`, a default central mask is used.
35
39
36
40
### Prerequisites
37
41
38
42
Before running the example you’ll need to first build the frontend. Follow these steps:
39
43
40
44
1. Install FE dependencies: `cd frontend/ && npm i`
41
-
1. Build the FE: `npm run build`
42
-
1. Move back to origin directory: `cd ..`
45
+
2. Build the FE: `npm run build`
46
+
3. Move back to origin directory: `cd ..`
43
47
44
48
## Standalone Mode (RVC4 only)
45
49
@@ -55,9 +59,13 @@ oakctl app run .
55
59
56
60
Once the app is built and running you can access the DepthAI Viewer locally by opening `https://<OAK4_IP>:9000/` in your browser (the exact URL will be shown in the terminal output).
57
61
58
-
This will run the example with default argument values (YOLO-World model). If you want to change these values you need to edit the `oakapp.toml` file (refer [here](https://docs.luxonis.com/software-v3/oak-apps/configuration/) for more information about this configuration file).
62
+
This will run the example with default argument values (YOLOE model). If you want to change these values you need to edit the `backend-run.sh` file to pass the arguments to the backend. Example:
0 commit comments