roflcoopter / 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
1.66k stars 171 forks source link

Darknet Component - No section: 'net' / armv7 #585

Closed Pixelartist closed 1 year ago

Pixelartist commented 1 year ago

Hello there,

first time viserion user here - I seem to have an issue with the darknet component. It looks like I hit #476 - I am using viserion currently on my QNAP NAS 431P3 which is using armv7. If I understand what you are describing in the linked issue - image / object detection will be horribly slow and therefore you left out the necessary files from that image?

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing... 
************************ UID/GID *************************
User uid:    0
User gid:    0
************************** Done **************************
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-gid-video-device: executing... 
[cont-init.d] 20-gid-video-device: exited 0.
[cont-init.d] 30-edgetpu-permission: executing... 
************** Setting EdgeTPU permissions ***************
Coral Vendor IDs:
"1a6e"
"18d1"
No EdgeTPU USB device was found
************************** Done **************************
[cont-init.d] 30-edgetpu-permission: exited 0.
[cont-init.d] 40-set-env-vars: executing... 
****** Checking for hardware acceleration platforms ******
OpenCL cannot be used
VA-API cannot be used
CUDA cannot be used
*********************** Done *****************************
[cont-init.d] 40-set-env-vars: exited 0.
[cont-init.d] 50-check-if-rpi: executing... 
********** Checking if we are running on an RPi **********
Not running on any supported RPi
*********************** Done *****************************
[cont-init.d] 50-check-if-rpi: exited 0.
[cont-init.d] 55-check-if-jetson: executing... 
****** Checking if we are running on a Jetson Board ******
Not running on any supported Jetson board
*********************** Done *****************************
[cont-init.d] 55-check-if-jetson: exited 0.
[cont-init.d] 60-ffmpeg-path: executing... 
****************** Getting FFmpeg path *******************
FFmpeg path: /home/abc/bin/ffmpeg
*********************** Done *****************************
[cont-init.d] 60-ffmpeg-path: exited 0.
[cont-init.d] 70-gstreamer-path: executing... 
***************** Getting GStreamer path *****************
GStreamer path: /usr/bin/gst-launch-1.0
*********************** Done *****************************
[cont-init.d] 70-gstreamer-path: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2023-05-03 00:24:51] [INFO    ] [viseron.core] - -------------------------------------------
[2023-05-03 00:24:51] [INFO    ] [viseron.core] - Initializing Viseron
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setting up component data_stream
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setup of component data_stream took 0.0 seconds
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setting up component webserver
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setup of component webserver took 0.0 seconds
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setting up component nvr
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setting up component darknet
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setting up component mog2
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setting up component ffmpeg
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setup of component nvr took 0.0 seconds
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setup of component ffmpeg took 0.0 seconds
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setup of component mog2 took 0.0 seconds
Traceback (most recent call last):
  File "/src/viseron/components/__init__.py", line 152, in setup_component
    result = component_module.setup(self._vis, config)
  File "/src/viseron/components/darknet/__init__.py", line 125, in setup
    vis.data[COMPONENT] = DarknetDNN(vis, config[CONFIG_OBJECT_DETECTOR])
  File "/src/viseron/components/darknet/__init__.py", line 219, in __init__
    super().__init__(vis, config)
  File "/src/viseron/components/darknet/__init__.py", line 164, in __init__
    self._model_width = int(model_config.get("net", "width"))
  File "/usr/lib/python3.8/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/lib/python3.8/configparser.py", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'net'
[2023-05-03 00:24:52] [ERROR   ] [viseron.components] - Uncaught exception setting up component darknet: No section: 'net'
None
[2023-05-03 00:24:52] [ERROR   ] [viseron.components] - Setup of component darknet failed
[2023-05-03 00:24:52] [ERROR   ] [viseron.components] - Failed setup of component darknet
[2023-05-03 00:24:52] [INFO    ] [viseron.components] - Setting up domain camera for component ffmpeg with identifier camera_1
roflcoopter commented 1 year ago

Yes I left them out for that reason, also not to bloat the image with extra models.

However I realize now that it's a bad design choice and not very user friendly. I will add the tiny models which are quite small. Then every user can make their own decisions on whether it's fast enough

roflcoopter commented 1 year ago

The yolov7-tiny model is now included in the dev tag. It should be picked up automatically as the default model.