viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.

MIT License

Stars
1.6K
viseron - v3.0.0b9 - EdgeTPU fix Latest Release

Published by roflcoopter 4 months ago

viseron - v3.0.0b8 - License plate recognition events

Published by roflcoopter 4 months ago

  • OpenCV 4.10.0
  • Annotate images with supervision for nicer looking text and bounding boxes
  • Fix HLS playback bug when not using auth
  • Darknet on CPU now runs in a separate python process
  • Store License plate recognition snapshots
  • Show License plate recognition in the timeline/events tabs
  • Store Motion detection snapshots
  • Show Motion detection in the events tab
  • Correctly calculate event amounts in the date picker
  • Allow running object and motion detectors with trigger_recorder: true at the same time without using scan_on_motion_only: true or recorder_keepalive

For discussions, please use this discussion: https://github.com/roflcoopter/viseron/discussions/721

Full Changelog: https://github.com/roflcoopter/viseron/compare/v3.0.0b7...v3.0.0b8

viseron - v3.0.0b7 - Face recognition events

Published by roflcoopter 4 months ago

Changes

  • Show Face Recognition events on the Events and Timeline tabs
  • Events on the Events tab is now grouped to avoid clutter
  • Fix auth check always being enabled when viewing the timeline
  • Escape camera passwords
  • Add better logic for redacting sensitive information from the logs
  • New config option check_interval for each storage tier to control the minimum time between moving/deleting files
  • Allow running without any detectors to only store continuous recordings
  • Upgrade all python dependencies

For discussions, please use this discussion: #721

Full Changelog: https://github.com/roflcoopter/viseron/compare/v3.0.0b6...v3.0.0b7

viseron - v3.0.0b6 - GStreamer fix and VAAPI support

Published by roflcoopter 5 months ago

Fixes

  • Small fix to GStreamer. A bug was introduced when upgrading to Ubuntu 22.04 which caused pipelines to hang
  • Support for VAAPI decoding of streams in GStreamer

Full Changelog: https://github.com/roflcoopter/viseron/compare/v3.0.0b5...v3.0.0b6

viseron - v3.0.0b5 - Delete unwanted files instead of moving

Published by roflcoopter 5 months ago

Fixes

  • Make sure to instantly delete files instead of moving them to succeeding tiers that wont store them
  • Crossbuild gpac so it works on aarch64, jetson-nano etc
  • Make sure jetson-nano finds the correct postgresql version

Full Changelog: https://github.com/roflcoopter/viseron/compare/v3.0.0b4...v3.0.0b5

viseron - v3.0.0b4 - Ubuntu 22.04 Jammy

Published by roflcoopter 6 months ago

Fixes

  • Improve handling of clip created by create_event_clip
  • Frontend breadcrumbs partially blocking icons in header
  • Show Viseron version in the footer and the logs
  • Containers are now based on Ubuntu Jammy and Python 3.10
  • EdgeTPU runs in a separate python 3.9 shell since it does not support Python 3.10 yet
  • Automatic PostgreSQL version upgrades
  • Upgrade CUDA to 12.3
  • Upgrade OpenCV to 4.9.0
  • Upgrade Darknet
  • Upgrade Dlib to 19.24.1
  • Upgrade OpenCL and VA-API
  • Make sure that postgres major version upgrades succeed when superuser != postgres

Full Changelog: https://github.com/roflcoopter/viseron/compare/v3.0.0b3...v3.0.0b4

For discussions, please use this discussion: #721

viseron - v3.0.0b3 - Fix builds

Published by roflcoopter 7 months ago

Small version bump to fix failing Azure builds

viseron - v3.0.0b2 - Fix playback and running as root

Published by roflcoopter 7 months ago

Various fixes for the v3.0.0b1 release

Fixes:

  • Make sure thumbnails are lazyloaded properly on Events tab
  • Set a new HLS Client ID everytime the source changes. Resolves some playback issues
  • Make Camera Grid on Events page scrollable so the page remains the same size no matter how many cameras you have.
  • Reduce some spacing in the frontend
  • The Hover Line which shows the time is now properly positioned
  • Connect to DB using the postgres user to allow running the container as root
  • Set default value for EXTINF for fragmented mp4s if it cant be read properly from the manifest file.
    This resolves an issue where playback and loading of the timeline would fail because there were segments that had EXTINF: null in the DB
viseron - v3.0.0b1 - 24/7 recordings

Published by roflcoopter 7 months ago

This is a pretty massive release that brings a number of new features and improvements.

Features

24/7 recordings

The main feature developed here is the option of having 24/7 recordings.
With this comes a new component, storage which will allow you to retain data based on time (like it is today) and based one consumed space.
This allows you to use your storage to its maximum.

Storage Tiers

Another feature of the storage component are tiers.
They allow you to store recordings on multiple media.
Say you have one 256GB SSD and a 1TB HDD, you can keep the most recent recordings on the SSD for fast access while offloading the older recordings to the HDD for archiving.

Timeline

To easily view 24/7 recordings, a new Timeline view is available.
It currently shows continuous recordings, motion events, detected objects.
Face recognition and License plate recognition will be available soon as well.
viseron_v3_timeline_blur

Events

The Events view is a more concise view than the Timeline.
Here you can scroll through and view all the Events.
Currently it shows only recordings but more events like face recognition etc is in the works.
You cannot view 24/7 recordings here.
viseron_v3_events_blur

Breaking Changes

  • Old recordings are not yet migrated over to the new format and will not be viewable in Viseron
  • Recordings are now in HLS format. If you need to have the recordings saved as full MP4 files you can use the new config option create_event_clip
  • Recordings folder structure has changed
  • mp4 file extension is now forced and extension is removed
  • segments_folder is removed in favor of tier paths
  • Thumbnails are now stored in /thumbnails folder (depending on the tier config)
  • filename_pattern in thumbnail is removed, stored as ID of the recording

See the #716 v3.0.0 PR for tasks left to do before final release is ready.

viseron - v2.3.1 - Jetson Nano GStreamer fix

Published by roflcoopter about 1 year ago

Fix Failed to load component gstreamer: No module named 'gi' for the jetson-nano container.

Closes #672

viseron - v2.3.0 - CodeProject AI and License Plate Recognition

Published by roflcoopter about 1 year ago

This is a smaller release with a few new features and fixes.
I am working hard on 24/7 recordings that I hade planned to release together with these changes, but its taking a bit longer than i had anticipated.
If you are interested in that, sit tight for the next release! You can follow my progress here: #619

CodeProject AI component

A new component which leverages CodeProject AI's computer vision capabilities is included in this release.
As of now it supports object detection, face recognition as well as a new post processor, Automatic License Plate Recognition!

Automatic License Plate Recognition (ALPR)

A new post processor is now available for ALPR.
Currently only CodeProject AI supports it, but in the future more variants may be supported.

Developer Experience

I have started to work on a better Developer Experience together with some proper Developer documentation.
It is still in early stages and the inner workings of Viseron are not explained yet, but it will improve over time.

The biggest addition to the Developer Experience this release is the support for VSCode Devcontainers.
This makes it significantly easier to get going with development, as all you have to do is spin up the container!
I have been using this myself for some time now and it has accelerated my work significantly

The new Developer docs can be found here : https://viseron.netlify.app/docs/developers

Changes and fixes

There are also a small number of changes and improvements.

  • New config option for the camera domain, still_image
    It allows you to configure a URL to fetch the snapshots that are displayed in the UI from.
    Useful if you woudl lke to get full resolution still images in the UI while still using the substream for detection
    Under still_image you can specify refresh_interval which makes the UI refresh more often. Default is 10 seconds.
  • A mask helper has been added to the docs: https://viseron.netlify.app/components-explorer/components/mog2#mask
    This makes it a bit clearer how to configure them until its possible to do it from the frontend directly.
  • ffmpeg has a new config option raw_command that makes it possible to specify an FFmpeg command that will be used directly.
    Great if you want to test out some specific command that is hard to accomplish using the other available options.
    There are a number of things to keep in mind tho, so if you are going to use it, make sure to read the docs thoroughly.

What's Changed

Full Changelog: https://github.com/roflcoopter/viseron/compare/v2.2.0...v2.3.0

viseron - v2.2.0 - Authentication

Published by roflcoopter over 1 year ago

This release contains a lot of tweaks and fixes as well as some cool new features!

Authentication

The biggest change in this release is the addition of authentication for the frontend/API.
It is disabled by default but can be enabled by adding auth to your webserver config.

webserver:
  auth:

When you first enable authentication you will be greeted with an onboarding page which allows you to create your first user.
At the moment you can only create this first user. Complete user handling is planned for the next release.
image

Enabling authentication protects all resources, including streams and videos, so if you are consuming these directly through Viserons API from another tool you will have some issues. I will make sure to properly implement and document a good way of accessing the API and resources from third-party tools even with auth enabled in a future release.

Things that needs to be added before i consider this feature done:

  • Long lived access tokens for third party consumers of the API
  • Create more users
  • Delete/update users
  • IP bans for failed login attempts

Failed cameras

Cameras that are unavailable during startup will now properly retry setup with automatic back-off.
Any camera that cant be successfully setup will be displayed in the frontend, displaying the error:
Failed_cameras

The red border represents failed cameras, and the orange border represents cameras that are actively retrying setup.
A bonus feature here is that the recordings for the cameras are still available for viewing in the frontend, neat right?!

General fixes

  • FFmpeg upgraded to 5.1.2 with improved hardware acceleration for RPi4
  • H265 fix for gstreamer
  • Audio is transcoded to aac by default if the original codec (pcm_alaw, pcm_mulaw) is not supported in .mp4 files.
    Previously recordings would be stored in .mkv files instead but that proved to be confusing.
  • Changed how dlib and sklearn is installed which should solve a lot of issues with this component on the jetson-nano and aarch64 image

What's Changed

Full Changelog: https://github.com/roflcoopter/viseron/compare/v2.1.1...v2.2.0

viseron - v2.2.0b1 - Authentication

Published by roflcoopter over 1 year ago

This release contains a lot of tweaks and fixes as well as some cool new features!

Authentication

The biggest change in this release is the addition of authentication for the frontend/API.
It is disabled by default but can be enabled by adding auth to your webserver config.

webserver:
  auth:

When you first enable authentication you will be greeted with an onboarding page which allows you to create your first user.
At the moment you can only create this first user. Complete user handling is planned for the next release.
image

Enabling authentication protects all resources, including streams and videos, so if you are consuming these directly through Viserons API from another tool you will have some issues. I will make sure to properly implement and document a good way of accessing the API and resources from third-party tools even with auth enabled in a future release.

Things that needs to be added before i consider this feature done:

  • Long lived access tokens for third party consumers of the API
  • Create more users
  • Delete/update users
  • IP bans for failed login attempts

Failed cameras

Cameras that are unavailable during startup will now properly retry setup with automatic back-off.
Any camera that cant be successfully setup will be displayed in the frontend, displaying the error:
Failed_cameras

The red border represents failed cameras, and the orange border represents cameras that are actively retrying setup.
A bonus feature here is that the recordings for the cameras are still available for viewing in the frontend, neat right?!

General fixes

  • FFmpeg upgraded to 5.1.2 with improved hardware acceleration for RPi4
  • H265 fix for gstreamer
  • Audio is transcoded to aac by default if the original codec (pcm_alaw, pcm_mulaw) is not supported in .mp4 files.
    Previously recordings would be stored in .mkv files instead but that proved to be confusing.
  • Changed how dlib and sklearn is installed which should solve a lot of issues with this component on the jetson-nano and aarch64 image

What's Changed

Full Changelog: https://github.com/roflcoopter/viseron/compare/v2.1.1...v2.2.0b1

viseron - v2.1.1 - Recorder bugfixes

Published by roflcoopter over 1 year ago

This is a minor release containing a few new features as well as some bug fixes.
I recommend everyone running 2.1.0 to update immediately since 2.1.0 introduced a bug which creates shorter recordings than intended, which might make you miss important events.

New features

  • Recordings can now be deleted from the UI, either by camera, per day or individual recording.
  • Add output_args configuration option to allow better customization of the ffmpeg recorder command
  • aarch64 docker image now contains the yolov7 model family

Bugfixes

  • Fix calculation of event start and end time
  • Fixed handling of max_recorder_keepalive when running with only motion detection as trigger for the recorder.
  • Easier copying of the configuration key name from the docs page
  • Fix stream naming colission

What's Changed

New Contributors

Full Changelog: https://github.com/roflcoopter/viseron/compare/v2.1.0...v2.1.1

viseron - v2.1.0 - Frontend improvements

Published by roflcoopter almost 2 years ago

Frontend

Recordings grouped daily

Recordings are now grouped by day to reduce the amount of scrolling needed.
Each day will show the latest recording, along with a button to drill down to that days recordings.

Breadcrumbs

Breadcrumbs are added to the header for easier navigation

Layout fixes

Grid sizes are now more consistent across the different pages

Backend

OpenVINO backend for Darknet

Upgraded to OpenCV 4.6.0 with OpenVINO support for Darknet.
This means better hardware acceleration support on Intel CPUs.
YOLOv7 is now supported and is the default in all images.

Breaking changes

The attributes of the binary_sensor.{camera identifier}_recorder has changed slightly:

  • last_recording_start -> start_time
  • last_recording_end -> end_time

What's Changed

New Contributors

Full Changelog: https://github.com/roflcoopter/viseron/compare/v2.0.0...v2.1.0

viseron - v2.0.0 - Viseron rewrite

Published by roflcoopter almost 2 years ago

This release features a massive rewrite that I have been working on for the past year.

It focuses on decoupling all parts of Viseron, making it more modularized. This allows for easier integration of new functionality.

The config.yaml file will change completely so there is some work that has to be done by each user to port over to the new version.
The general config format is a component which implements one or more domains.
Each camera has a unique camera identifier which flows through the entire configuration.

The nvr component then ties all these different domains together and provides the full functionality.

The big benefit of this new format is that you can mix and match components more freely.
For instance, you could use different object detectors for different cameras, you are not tied into just one.

ffmpeg: # <-- component
  camera: # <-- domain
    camera_one: # <-- camera identifier
       name: Camera 1
       host: 192.168.10.10
       username: test
       password: test
    camera_two: # <-- camera identifier
       name: Camera 2
       host: 192.168.10.11
       username: test
       password: test
       ....

darknet: # <-- component
  object_detector: # <-- domain
    model: /my_custom_model/model.weights
    cameras:
      camera_one: # <-- camera identifier
        fps: 5

deepstack:  # <-- component
  host: deepstack # <-- component config option
  port: 5000 # <-- component config option
  object_detector: # <-- domain
    cameras:
      camera_two:  # <-- camera identifier
        fps: 1
        labels:
          - label: person
            confidence: 0.75
            trigger_recorder: false
  face_recognition: # <-- domain
    cameras:
      camera_one:
      camera_two:
    labels:
      - person

background_subtractor: # <-- component
  motion_detector: # <-- domain
    cameras:
      camera_one: # <-- camera identifier
        fps: 1
        mask:
          - coordinates:
              - x: 400
                y: 200
              - x: 1000
                y: 200
              - x: 1000
                y: 750
              - x: 400
                y: 750

nvr: # <-- component
  camera_one: # <-- camera identifier
  camera_two: # <-- camera identifier
ffmpeg:
  camera:
    viseron_camera:
      name: Camera 1
      host: 195.196.36.242
      path: /mjpg/video.mjpg
      port: 80
      stream_format: mjpeg
      fps: 6
      recorder:
        idle_timeout: 1
        codec: h264
    viseron_camera2:
      name: Camera 2
      host: storatorg.halmstad.se
      path: /mjpg/video.mjpg
      stream_format: mjpeg
      port: 443
      fps: 2
      protocol: https
      recorder:
        idle_timeout: 1
        codec: h264
    viseron_camera3:
      name: Camera 3
      host: 195.196.36.242
      path: /mjpg/video.mjpg
      port: 80
      stream_format: mjpeg
      fps: 6
      recorder:
        idle_timeout: 1
        codec: h264

mog2:
  motion_detector:
    cameras:
      viseron_camera:
        fps: 1
      viseron_camera2:
        fps: 1

background_subtractor:
  motion_detector:
    cameras:
      viseron_camera3:
        fps: 1
        mask:
          - coordinates:
              - x: 400
                y: 200
              - x: 1000
                y: 200
              - x: 1000
                y: 750
              - x: 400
                y: 750

darknet:
  object_detector:
    cameras:
      viseron_camera:
        fps: 1
        scan_on_motion_only: false
        labels:
          - label: person
            confidence: 0.8
            trigger_recorder: true
      viseron_camera2:
        fps: 1
        labels:
          - label: person
            confidence: 0.8
            trigger_recorder: true
      viseron_camera3:
        fps: 1
        labels:
          - label: person
            confidence: 0.8
            trigger_recorder: true

nvr:
  viseron_camera:
  viseron_camera2:
  viseron_camera3:

webserver:

mqtt:
  broker: mqtt_broker.lan
  port: 1883
  username: !secret mqtt_username
  password: !secret mqtt_password
  home_assistant:

logger:
  default_level: debug

Frontend

There is now a UI included in Viseron, written in React TypeScript.
It is enabled by default and can be reached on port 8888 inside the container by default.

Currently it features functionality like viewing cameras, recordings and editing the configuration.
It will be expanded upon in the future.

Cameras:
Viseron-screenshot-cameras

Recordings:
Viseron-screenshot-recordings

Configuration:
Viseron-screenshot-configuration

Entities:
Viseron-screenshot-entities

Jetson Nano support

This release also features better Jetson Nano support through the gstreamer component.
This means that you can utilize your Nano for hardware accelerated camera decoding and object detection.

CompreFace face recognition

Face recognition using CompreFace is now available

Image classification

A new post processor is available, image_classification.
This allows you to get more granular results from a detected object.
As an example, you could detect a specific kind of dog breed, or a specific kind of bird.

Multiprocessing

darknet and edgetpu object detectos utilize multiprocessing which spreads the load between multiple processes.
This allows for better performance, but also makes it easier to analyze and fine tune the load on your system.

Documentation site

The documentation has moved over from being in a README format to a dedicated site.
Hopefully it will help you use Viseron better.
I need your help on how it can be improved, writing good docs is always hard.

I am especially proud of the components page, which is mostly generated from the config schema used.
This means that the documentation and schema will always match, yay!

The documentation is hosted here: https://viseron.netlify.app/

Breaking changes

  • ALL kinds of inheritance in the config has been removed.
    This means that you have to explicitly configure your object detector and motion detector settings for each camera.

  • interval has been removed from object_detection and motion_detection
    A new config option fps will be used instead.
    This change was made since it was quite confusing, both in the code and for the users because interval was specified in seconds.

  • logging has been removed in all shapes and forms and has been replaced with the new component logger
    Please see the updated documentation

  • cameras config section has been removed. Camera config is now specified under a component.

  • Each object detector has been split up into individual components.
    See the documentation for each detector.

  • Each motion detector has been split up into individual components.
    See the documentation for each detector.

  • recorder can no longer be configured on a global level.
    It now has to be present under each camera configuration.

  • timeout under recorder is now called idle_timeout

  • static_mjpeg_streams are now called mjpeg_streams

  • enable under object_detection is no more. To disable object detection you simply dont configure it for a camera
    Same goes for motion_detector

  • timeout for motion_detector is now called recorder_keepalive

  • max_timeout for motion_detector is now called max_recorder_keepalive

  • Recordings are now stored in the folder structure /recordings/<camera name>/<date>/<timestamp>.mp4

  • Images are no longer streamed to MQTT/Home Assistant, with the exception of thumbnails.
    This is because MQTT is not really suited for this and it impacts performance a lot.
    If you still want to have the cameras in Home Assistant you can point Home Assistant to an MJPEG stream in Viseron.

  • filter_args removed for camera and recorder.
    For camera, use video_filters instead.
    For recorder, you can use both video_filters and audio_filters

    ffmpeg:
      camera:
        camera_1:
        ....
          video_filters:   # These filters rotate the images processed by Viseron
            - transpose=2
            - transpose=2
          recorder:
            video_filters:   # These filters rotate the recorded video
              - transpose=2
              - transpose=2
    

What's Changed

New Contributors

Full Changelog: https://github.com/roflcoopter/viseron/compare/v1.10.2...v2.0.0

viseron - v2.0.0b4 - Entities

Published by roflcoopter almost 2 years ago

This release features a new Entities Page where you can browse all the entities in Viseron.
At the moment you can only view the current states, not change them or view any history.

image

This will most likely be the last beta before official release unless something unexpected happens.

What's Changed

Full Changelog: https://github.com/roflcoopter/viseron/compare/v2.0.0b3...v2.0.0b4

viseron - v2.0.0b3 - Compreface

Published by roflcoopter almost 2 years ago

What's Changed

Full Changelog: https://github.com/roflcoopter/viseron/compare/v2.0.0b2...v2.0.0b3

viseron - v2.0.0b2 - Bugfixes

Published by roflcoopter almost 2 years ago

Fixes an issue where bounding boxes were not displaying correctly for darknet
Fixes permission issues for edgetpu
Upgrades dlib to 19.24 to support more CUDA compute capabilities

What's Changed

Full Changelog: https://github.com/roflcoopter/viseron/compare/v2.0.0b1...v2.0.0b2

viseron - 2.0.0b1 - Viseron rewrite

Published by roflcoopter almost 2 years ago

This release features a massive rewrite that I have been working on for the past year.

It focuses on decoupling all parts of Viseron, making it more modularized. This allows for easier integration of new functionality.

The config.yaml file will change completely so there is some work that has to be done by each user to port over to the new version.
The general config format is a component which implements one or more domains.
Each camera has a unique camera identifier which flows through the entire configuration.

The nvr component then ties all these different domains together and provides the full functionality.

The big benefit of this new format is that you can mix and match components more freely.
For instance, you could use different object detectors for different cameras, you are not tied into just one.

ffmpeg: # <-- component
  camera: # <-- domain
    camera_one: # <-- camera identifier
       name: Camera 1
       host: 192.168.10.10
       username: test
       password: test
    camera_two: # <-- camera identifier
       name: Camera 2
       host: 192.168.10.11
       username: test
       password: test
       ....

darknet: # <-- component
  object_detector: # <-- domain
    model: /my_custom_model/model.weights
    cameras:
      camera_one: # <-- camera identifier
        fps: 5

deepstack:  # <-- component
  host: deepstack # <-- component config option
  port: 5000 # <-- component config option
  object_detector: # <-- domain
    cameras:
      camera_two:  # <-- camera identifier
        fps: 1
        labels:
          - label: person
            confidence: 0.75
            trigger_recorder: false
  face_recognition: # <-- domain
    cameras:
      camera_one:
      camera_two:
    labels:
      - person

background_subtractor: # <-- component
  motion_detector: # <-- domain
    cameras:
      camera_one: # <-- camera identifier
        fps: 1
        mask:
          - coordinates:
              - x: 400
                y: 200
              - x: 1000
                y: 200
              - x: 1000
                y: 750
              - x: 400
                y: 750

nvr: # <-- component
  camera_one: # <-- camera identifier
  camera_two: # <-- camera identifier

Frontend

There is now a UI included in Viseron, writen in React/TypeScript.
It is enabled by default and can be reached on port 8888 inside the container by default.

Currently it features basic functionality like viewing cameras, recordings and editing the configuration.
It will be expanded upon in the future.

Cameras:
Viseron-screenshot-cameras

Recordings:
Viseron-screenshot-recordings

Configuration:

Jetson Nano support

This release also features better Jetson Nano support through the gstreamer component.
This means that you can utilize your Nano for hardware accelerated camera decoding and object detection.

Documentation site

The documentation has moved over from being in a README format to a dedicated site.
Hopefully it will help you use Viseron better.
I need your help on how it can be improved, writing good docs is always hard.

I am especially proud of the components page, which is mostly generated from the config schema used.
This means that the documentation and schema will always match, yay!

The documentation is hosted here: https://viseron.netlify.app/

What's Changed

Full Changelog: https://github.com/roflcoopter/viseron/compare/v1.10.2...v2.0.0b1

Related Projects