From 8e7b83d2f1cdc1f7645065c012d0b7ba5165eb92 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:08:07 -0500 Subject: [PATCH 1/6] Display messages when no events exist (#12694) * Display message in desktop events list when no events exist * Add message for when no events are found on plus view * validating check * activity indicator check * clarify error message --- web/src/pages/SubmitPlus.tsx | 185 +++++++++++++------------ web/src/views/events/RecordingView.tsx | 42 +++--- 2 files changed, 121 insertions(+), 106 deletions(-) diff --git a/web/src/pages/SubmitPlus.tsx b/web/src/pages/SubmitPlus.tsx index c1a89dc45..57c0fdf37 100644 --- a/web/src/pages/SubmitPlus.tsx +++ b/web/src/pages/SubmitPlus.tsx @@ -43,6 +43,7 @@ import { FaSortAmountDown, FaSortAmountUp, } from "react-icons/fa"; +import { LuFolderX } from "react-icons/lu"; import { PiSlidersHorizontalFill } from "react-icons/pi"; import useSWR from "swr"; import useSWRInfinite from "swr/infinite"; @@ -240,96 +241,104 @@ export default function SubmitPlus() {
-
- (!open ? setUpload(undefined) : null)} - > - - - Submit To Frigate+ - - Objects in locations you want to avoid are not false - positives. Submitting them as false positives will confuse the - model. - - - {`${upload?.label}`} - - - - - - - - - {events?.map((event) => { - if (event.data.type != "object" || event.plus_id) { - return; - } - - return ( -
setUpload(event)} - > -
- -
- -
- - {[event.label].map((object) => { - return getIconForLabel( - object, - "size-3 text-white", - ); - })} -
- {Math.round(event.data.score * 100)}% -
-
-
-
-
- - {[event.label] - .map((text) => capitalizeFirstLetter(text)) - .sort() - .join(", ") - .replaceAll("-verified", "")} - -
-
+ {isValidating ? ( + + ) : events?.length === 0 ? ( +
+ + No snapshots found +
+ ) : ( +
+ (!open ? setUpload(undefined) : null)} + > + + + Submit To Frigate+ + + Objects in locations you want to avoid are not false + positives. Submitting them as false positives will confuse + the model. + + {`${upload?.label}`} -
- ); - })} - {!isValidating && !isDone &&
} - {isValidating && } -
+ + + + + + + + + {events?.map((event) => { + if (event.data.type != "object" || event.plus_id) { + return; + } + + return ( +
setUpload(event)} + > +
+ +
+ +
+ + {[event.label].map((object) => { + return getIconForLabel( + object, + "size-3 text-white", + ); + })} +
+ {Math.round(event.data.score * 100)}% +
+
+
+
+
+ + {[event.label] + .map((text) => capitalizeFirstLetter(text)) + .sort() + .join(", ") + .replaceAll("-verified", "")} + +
+
+ +
+ ); + })} + {!isValidating && !isDone &&
} +
+ )}
); diff --git a/web/src/views/events/RecordingView.tsx b/web/src/views/events/RecordingView.tsx index 2613069de..ce416b873 100644 --- a/web/src/views/events/RecordingView.tsx +++ b/web/src/views/events/RecordingView.tsx @@ -708,25 +708,31 @@ function Timeline({ isMobile && "sm:grid-cols-2", )} > - {mainCameraReviewItems.map((review) => { - if (review.severity == "significant_motion") { - return; - } + {mainCameraReviewItems.length === 0 ? ( +
+ No events found for this time period. +
+ ) : ( + mainCameraReviewItems.map((review) => { + if (review.severity === "significant_motion") { + return; + } - return ( - { - manuallySetCurrentTime( - review.start_time - REVIEW_PADDING, - true, - ); - }} - /> - ); - })} + return ( + { + manuallySetCurrentTime( + review.start_time - REVIEW_PADDING, + true, + ); + }} + /> + ); + }) + )}
)} From c0b23ca9388b51f42b6106c73be679f6f769a31c Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 1 Aug 2024 14:33:06 -0600 Subject: [PATCH 2/6] Remove mention of older yolox model (#12711) --- docs/docs/configuration/object_detectors.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md index 55ef1e156..cd1430b3f 100644 --- a/docs/docs/configuration/object_detectors.md +++ b/docs/docs/configuration/object_detectors.md @@ -136,23 +136,7 @@ model: #### YOLOX -This detector also supports YOLOX. Frigate does not come with any YOLOX models preloaded, so you will need to supply your own models. This detector has been verified to work with the [yolox_tiny](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolox-tiny) model from Intel's Open Model Zoo. You can follow [these instructions](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolox-tiny#download-a-model-and-convert-it-into-openvino-ir-format) to retrieve the OpenVINO-compatible `yolox_tiny` model. Make sure that the model input dimensions match the `width` and `height` parameters, and `model_type` is set accordingly. See [Full Configuration Reference](/configuration/reference.md) for a list of possible `model_type` options. Below is an example of how `yolox_tiny` can be used in Frigate: - -```yaml -detectors: - ov: - type: openvino - device: GPU - -model: - width: 416 - height: 416 - input_tensor: nchw - input_pixel_format: bgr - model_type: yolox - path: /path/to/yolox_tiny.xml - labelmap_path: /path/to/coco_80cl.txt -``` +This detector also supports YOLOX. Frigate does not come with any YOLOX models preloaded, so you will need to supply your own models. #### YOLO-NAS From b28cc4551020ea62381dc944e4c3cd542317ecaa Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 1 Aug 2024 17:27:15 -0600 Subject: [PATCH 3/6] Update docs (#12714) --- docs/docs/configuration/advanced.md | 8 +++++ docs/docs/configuration/cameras.md | 2 +- .../configuration/{objects.mdx => objects.md} | 0 docs/docs/guides/getting_started.md | 36 +++++-------------- 4 files changed, 17 insertions(+), 29 deletions(-) rename docs/docs/configuration/{objects.mdx => objects.md} (100%) diff --git a/docs/docs/configuration/advanced.md b/docs/docs/configuration/advanced.md index 37a3b5ceb..b237d4b66 100644 --- a/docs/docs/configuration/advanced.md +++ b/docs/docs/configuration/advanced.md @@ -80,6 +80,14 @@ model: input_pixel_format: "bgr" ``` +#### `labelmap` + +:::warning + +If the labelmap is customized then the labels used for alerts will need to be adjusted as well. See [alert labels](../configuration/review.md#restricting-alerts-to-specific-labels) for more info. + +::: + The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. By default, truck is renamed to car because they are often confused. You cannot add new object types, but you can change the names of existing objects in the model. ```yaml diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index ebe45eac4..52361e9bf 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -111,6 +111,6 @@ camera_groups: cameras: - driveway_cam - garage_cam - icon: car + icon: LuCar order: 0 ``` diff --git a/docs/docs/configuration/objects.mdx b/docs/docs/configuration/objects.md similarity index 100% rename from docs/docs/configuration/objects.mdx rename to docs/docs/configuration/objects.md diff --git a/docs/docs/guides/getting_started.md b/docs/docs/guides/getting_started.md index 3b58a1d38..af11f789c 100644 --- a/docs/docs/guides/getting_started.md +++ b/docs/docs/guides/getting_started.md @@ -274,13 +274,11 @@ cameras: - 0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432 ``` -### Step 6: Enable recording and/or snapshots +### Step 6: Enable recordings -In order to see Events in the Frigate UI, either snapshots or record will need to be enabled. +In order to review activity in the Frigate UI, recordings need to be enabled. -#### Record - -To enable recording video, add the `record` role to a stream and enable it in the config. If record is disabled in the config, turning it on via the UI will not have any effect. +To enable recording video, add the `record` role to a stream and enable it in the config. If record is disabled in the config, it won't be possible to enable it in the UI. ```yaml mqtt: ... @@ -307,26 +305,6 @@ If you don't have separate streams for detect and record, you would just add the By default, Frigate will retain video of all events for 10 days. The full set of options for recording can be found [here](../configuration/reference.md). -#### Snapshots - -To enable snapshots of your events, just enable it in the config. Snapshots are taken from the detect stream because it is the only stream decoded. - -```yaml -mqtt: ... - -detectors: ... - -cameras: - name_of_your_camera: ... - detect: ... - record: ... - snapshots: # <----- Enable snapshots - enabled: True - motion: ... -``` - -By default, Frigate will retain snapshots of all events for 10 days. The full set of options for snapshots can be found [here](../configuration/reference.md). - ### Step 7: Complete config At this point you have a complete config with basic functionality. You can see the [full config reference](../configuration/reference.md) for a complete list of configuration options. @@ -336,6 +314,8 @@ At this point you have a complete config with basic functionality. You can see t Now that you have a working install, you can use the following documentation for additional features: 1. [Configuring go2rtc](configuring_go2rtc.md) - Additional live view options and RTSP relay -2. [Home Assistant Integration](../integrations/home-assistant.md) - Integrate with Home Assistant -3. [Masks](../configuration/masks.md) -4. [Zones](../configuration/zones.md) +2. [Zones](../configuration/zones.md) +3. [Review](../configuration/review.md) +4. [Masks](../configuration/masks.md) +5. [Home Assistant Integration](../integrations/home-assistant.md) - Integrate with Home Assistant + From 88d4b694f881b5e24688744a22db5ec494491d54 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 2 Aug 2024 07:06:15 -0600 Subject: [PATCH 4/6] Fix tall videos from covering height in export page (#12725) * Fix tall videos from covering height in export page * Handle mobile landscape --- web/src/pages/Exports.tsx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/web/src/pages/Exports.tsx b/web/src/pages/Exports.tsx index 411a53e6a..451d52052 100644 --- a/web/src/pages/Exports.tsx +++ b/web/src/pages/Exports.tsx @@ -13,9 +13,11 @@ import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { Toaster } from "@/components/ui/sonner"; +import { cn } from "@/lib/utils"; import { DeleteClipType, Export } from "@/types/export"; import axios from "axios"; import { useCallback, useEffect, useMemo, useState } from "react"; +import { isMobile } from "react-device-detect"; import { LuFolderX } from "react-icons/lu"; import { toast } from "sonner"; import useSWR from "swr"; @@ -92,6 +94,7 @@ function Exports() { // Viewing const [selected, setSelected] = useState(); + const [selectedAspect, setSelectedAspect] = useState(0.0); return (
@@ -129,15 +132,27 @@ function Exports() { } }} > - - {selected?.name} + + + {selected?.name?.replaceAll("_", " ")} +