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
Copy file name to clipboardexpand all lines: docs/docs/configuration/semantic_search.md
+21-17
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ For best performance, 16GB or more of RAM and a dedicated GPU are recommended.
19
19
20
20
## Configuration
21
21
22
-
Semantic search is disabled by default, and must be enabled in your config file before it can be used. Semantic Search is a global configuration setting.
22
+
Semantic Search is disabled by default, and must be enabled in your config file before it can be used. Semantic Search is a global configuration setting.
23
23
24
24
```yaml
25
25
semantic_search:
@@ -41,7 +41,7 @@ The vision model is able to embed both images and text into the same vector spac
41
41
42
42
The text model is used to embed tracked object descriptions and perform searches against them. Descriptions can be created, viewed, and modified on the Search page when clicking on the gray tracked object chip at the top left of each review item. See [the Generative AI docs](/configuration/genai.md) for more information on how to automatically generate tracked object descriptions.
43
43
44
-
Differently weighted CLIP models are available and can be selected by setting the `model_size` config option:
44
+
Differently weighted CLIP models are available and can be selected by setting the `model_size` config option as `small` or `large`:
45
45
46
46
```yaml
47
47
semantic_search:
@@ -50,37 +50,41 @@ semantic_search:
50
50
```
51
51
52
52
- Configuring the `large` model employs the full Jina model and will automatically run on the GPU if applicable.
53
-
- Configuring the `small` model employs a quantized version of the model that uses much less RAM and runs faster on CPU with a very negligible difference in embedding quality.
53
+
- Configuring the `small` model employs a quantized version of the model that uses less RAM and runs on CPU with a very negligible difference in embedding quality.
54
54
55
55
### GPU Acceleration
56
56
57
57
The CLIP models are downloaded in ONNX format, and the `large` model can be accelerated using GPU hardware, when available. This depends on the Docker build that is used.
58
58
59
+
```yaml
60
+
semantic_search:
61
+
enabled: True
62
+
model_size: large
63
+
```
64
+
59
65
:::info
60
66
61
67
If the correct build is used for your GPU and the `large` model is configured, then the GPU will be detected and used automatically.
62
68
63
-
**AMD**
64
-
- ROCm will automatically be detected and used for semantic search in the `-rocm` Frigate image.
69
+
**NOTE:** Object detection and Semantic Search are independent features. If you want to use your GPU with Semantic Search, you must choose the appropriate Frigate Docker image for your GPU.
65
70
66
-
**Intel**
67
-
- OpenVINO will automatically be detected and used as a detector in the default Frigate image.
71
+
- **AMD**
68
72
69
-
**Nvidia**
70
-
- Nvidia GPUs will automatically be detected and used as a detector in the `-tensorrt` Frigate image.
71
-
- Jetson devices will automatically be detected and used as a detector in the `-tensorrt-jp(4/5)` Frigate image.
73
+
- ROCm will automatically be detected and used for Semantic Search in the `-rocm` Frigate image.
72
74
73
-
:::
75
+
- **Intel**
74
76
75
-
```yaml
76
-
semantic_search:
77
-
enabled: True
78
-
model_size: small
79
-
```
77
+
- OpenVINO will automatically be detected and used for Semantic Search in the default Frigate image.
78
+
79
+
- **Nvidia**
80
+
- Nvidia GPUs will automatically be detected and used for Semantic Search in the `-tensorrt` Frigate image.
81
+
- Jetson devices will automatically be detected and used for Semantic Search in the `-tensorrt-jp(4/5)` Frigate image.
82
+
83
+
:::
80
84
81
85
## Usage and Best Practices
82
86
83
-
1. Semantic search is used in conjunction with the other filters available on the Search page. Use a combination of traditional filtering and semantic search for the best results.
87
+
1. Semantic Search is used in conjunction with the other filters available on the Search page. Use a combination of traditional filtering and Semantic Search for the best results.
84
88
2. Use the thumbnail search type when searching for particular objects in the scene. Use the description search type when attempting to discern the intent of your object.
85
89
3. Because of how the AI models Frigate uses have been trained, the comparison between text and image embedding distances generally means that with multi-modal (`thumbnail` and `description`) searches, results matching `description` will appear first, even if a `thumbnail` embedding may be a better match. Play with the "Search Type" setting to help find what you are looking for. Note that if you are generating descriptions for specific objects or zones only, this may cause search results to prioritize the objects with descriptions even if the the ones without them are more relevant.
86
90
4. Make your search language and tone closely match exactly what you're looking for. If you are using thumbnail search, **phrase your query as an image caption**. Searching for "red car" may not work as well as "red sedan driving down a residential street on a sunny day".
The shm size cannot be set per container for Home Assistant add-ons. However, this is probably not required since by default Home Assistant Supervisor allocates `/dev/shm` with half the size of your total memory. If your machine has 8GB of memory, chances are that Frigate will have access to up to 4GB without any additional configuration.
@@ -194,7 +194,7 @@ services:
194
194
privileged: true # this may not be necessary for all setups
195
195
restart: unless-stopped
196
196
image: ghcr.io/blakeblackshear/frigate:stable
197
-
shm_size: "64mb" # update for your cameras based on calculation above
197
+
shm_size: "512mb" # update for your cameras based on calculation above
198
198
devices:
199
199
- /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
200
200
- /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
0 commit comments