Great!
Yes the frontend supports MJPEG streams, and they will also be sent to Home Assistant as a camera entity.
Images are only sent when processing of a frame is done so if you have low intervals set the stream might appear a little laggy
Is the project abandoned?
It definitely is not!
I am working on a huge refactor of Viseron which will make it a lot more stable and much easier for me to implement new features.
I am very close to release of this new version, with only some parts of the documentation left.
You can follow the progress over at github.
roflcoopter:dev
ā roflcoopter:modularize
opened 11:00AM - 04 Dec 21 UTC
This is a huge rewrite of Viseron.
It focuses on decoupling all parts of Viseroā¦ n, 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.
<details>
<summary>Config Example</summary>
```yaml
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
```
</details>
<details>
<summary>Here is a generic config snippet with publicly available cameras that can be used to try it out</summary>
```yaml
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
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:
model_path: /detectors/models/darknet/yolov4-csp-x-swish.weights
model_config: /detectors/models/darknet/yolov4-csp-x-swish.cfg
cameras:
viseron_camera:
fps: 1
scan_on_motion_only: false
labels:
- label: person
confidence: 0.2
trigger_recorder: false
viseron_camera2:
fps: 1
labels:
- label: person
confidence: 0.2
trigger_recorder: false
nvr:
viseron_camera:
viseron_camera2:
viseron_camera3:
webserver:
mqtt:
broker: ****
port: 1883
username: ****
password: *****
client_id: viseron
home_assistant:
logger:
default_level: debug
logs:
viseron.components.data_stream: info
viseron.components.background_subtractor: info
viseron.components.mog2: info
```
</details>
End goal is to port all existing functionality and also resolve some of the open issues.
This PR and its description will be updated going forward.
### To-do list:
- [x] EdgeTPU Object detector
- [x] Darknet Object detector
- [x] DeepStack Object detector
- [x] MoG2 Motion detector
- [x] Background subtractor Motion detector
- [x] Webserver
- [ ] MQTT
- [x] Client
- [ ] Home Assistant integration
- [x] Camera status binary sensors
- [x] Motion detected binary sensors
- [x] Object detected binary sensors
- [x] Face detected binary sensors
- [x] Sensors
- [x] Switches
- [ ] Cameras
- [x] FFmpeg camera
- [x] Recordings
- [x] Deepstack Face recognition
- [x] OpenCV Face recognition
- [x] Internal Entity registry that components can listen and react to (inspired by Home Assistant)
- [x] Setup retry functionality of components
- [x] React based UI
- [x] Letterbox resizing before object detection
- [x] Default config generation
- [ ] Remove all old and dead code
- [ ] Update tests
- [ ] Update documentation
### Issues to resolve
- [x] #300
- [x] #297
- [x] #294
- [x] #304
- [x] #307
- [x] #309
- [x] #145
- [x] #284
- [x] #311
- [x] #312
- [x] #313
- [x] #326
- [x] #289
- [x] #341
- [ ] #345
### Bonus features not possible with previous versions of Viseron
- Multiprocessing
- Using different object or motion detectors simultaneously
### Partial changelog (README has not been updated to reflect this)
**Breaking changes**
- **ALL** kinds of inheritance in the config has been removed.
This means that you have to explicitly have to configure your object detector and motion detector settings for each `nvr`.
- `interval` has been removed from `object_detection` and `motion_detection`
A new config option `fps` will be used instead. Please update your configuration.
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 `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`
- `filter_args` removed for camera and recorder.
For `camera`, use `video_filters` instead.
For `recorder`, you can use both `video_filters` and `audio_filters`
<details>
<summary>Short config example to rotate video 180 degrees:</summary>
```yaml
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
```
</details>
**New features**
- New config entry for `webserver`. See the README for available config options
- React based Web UI
- New component `gstreamer`(!)
The implementation is quite basic as of now, but this will pave way for a better Jetson Nano integration.
- New `post_processor`, `image_classification`. Right now the `edgetpu` component has support for it.
**Changes**
**Fixes**
- Fixed detection of usb EdgeTPU, so that permissions are set correctly
1 Like
Thanks for replying. Can it be run successfully run on Jetson Nano together with HA?
Yes the new version runs on the Jetson Nano with hardware acceleration enabled
Once again thanks - this the github documentation sufficient or other docs exists to properly run it on Nano?
nickrout
(Nick Rout)
October 17, 2022, 3:40am
289
The nano is specifically referred to in the docs.
@roflcoopter
What about using Yolo V7 in Viseron?
Its coming in the near future.
I just need to release v2 before i start working on anything new, which should just be days away at this point.
1 Like
2.0.0b1 - Viseron rewrite
v2 of Viseron is now finally in beta stage!
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.
It also features a new frontend and a new documentation site!
Check out the release page for more information and some screenshots
1 Like
nickrout
(Nick Rout)
October 28, 2022, 7:37pm
293
Fantastic. Any chance of a HA addon?
1 Like
First thank you for this component.
I read the documentation and searched through github but couldnāt find a sample configuration file with all available components.
Thank you
roflcoopter
(Roflcoopter)
October 29, 2022, 12:34pm
295
Will look into it! Might be a bit complicated due to all the hardware acceleration but Iāll see what I can do
2 Likes
roflcoopter
(Roflcoopter)
October 29, 2022, 12:37pm
296
You can find all components in the Components Explorer page, and they all have a config example.
Or do you mean you would like one example with all the components aggregated?
Thank you. Apologies if Im missing the obvious, but i did look in the Components explorer, which for instance has Coral, but when you click on Coral it takes you to āpage not foundā.
You are right, sorry about that, the deployment must have gone wrong, looking into it
Itās working for me now, can you refresh and confirm?
Unfortunately not. Still showing
Page Not Found
Now i can see them. Thank you
One question, when using the roflcoopter/amd64-cuda-viseron image, is dlib working with cuda as well?
Yes dlib uses cuda by default.
Now I canāt see the pages again something strange going on