Closed danobot closed 4 years ago
From the log output it seems to stop scanning for objects because there is not enough motion.
Can you try to set ’’’trigger_detector: false’’’, and remove max/min height for the label and see if you get any detections?
motion_detection:
interval: 0.5
trigger_detector: False
timeout: true
max_timeout: 30
width: 300
height: 300
area: 0.1
frames: 1
object_detection:
type: darknet
interval: 6
labels:
- label: car
confidence: 0.5
- label: person
confidence: 0.5
- label: truck
confidence: 0.8
Logs
WARNING: Some networks were defined but are not used by any service: public
Attaching to viseron
viseron | 2020-10-17T08:27:20.117373633Z [2020-10-17 16:27:20] [root ] [INFO ] - -------------------------------------------
viseron | 2020-10-17T08:27:20.117404984Z [2020-10-17 16:27:20] [root ] [INFO ] - Initializing...
viseron | 2020-10-17T08:27:20.117462640Z [2020-10-17 16:27:20] [root ] [DEBUG ] - Starting cleanup scheduler
viseron | 2020-10-17T08:27:20.218283783Z [2020-10-17 16:27:20] [root ] [DEBUG ] - Running initial cleanup
viseron | 2020-10-17T08:27:20.218310491Z [2020-10-17 16:27:20] [lib.cleanup ] [DEBUG ] - Running cleanup
viseron | 2020-10-17T08:27:20.228379536Z [2020-10-17 16:27:20] [lib.detector ] [DEBUG ] - Initializing object detector darknet
viseron | 2020-10-17T08:27:20.938562204Z [2020-10-17 16:27:20] [lib.detector ] [DEBUG ] - Object detector initialized
viseron | 2020-10-17T08:27:20.938804606Z [2020-10-17 16:27:20] [lib.post_processors ] [DEBUG ] - Initializing post processor face_recognition
viseron | 2020-10-17T08:27:22.857389188Z [2020-10-17 16:27:22] [lib.post_processors.face_recognition.dlib] [DEBUG ] - Initializing dlib
viseron | 2020-10-17T08:27:22.857410389Z [2020-10-17 16:27:22] [lib.post_processors.face_recognition.dlib] [DEBUG ] - Training faces...
viseron | 2020-10-17T08:27:22.857609141Z [2020-10-17 16:27:22] [lib.post_processors.face_recognition.dlib] [DEBUG ] - Training face daniel
viseron | 2020-10-17T08:27:24.069699742Z [2020-10-17 16:27:24] [lib.post_processors.face_recognition.dlib] [DEBUG ] - Training complete
viseron | 2020-10-17T08:27:24.069776254Z [2020-10-17 16:27:24] [lib.post_processors.face_recognition.dlib] [DEBUG ] - dlib initialized
viseron | 2020-10-17T08:27:24.070156824Z [2020-10-17 16:27:24] [lib.post_processors ] [DEBUG ] - Post processor face_recognition initialized
viseron | 2020-10-17T08:27:24.070247590Z [2020-10-17 16:27:24] [root ] [INFO ] - Initializing NVR threads
viseron | 2020-10-17T08:27:24.070584511Z [2020-10-17 16:27:24] [lib.nvr.amcrest ] [DEBUG ] - Initializing NVR thread
viseron | 2020-10-17T08:27:24.070839980Z [2020-10-17 16:27:24] [lib.camera.amcrest ] [DEBUG ] - Initializing ffmpeg RTSP pipe
viseron | 2020-10-17T08:27:24.070937293Z [2020-10-17 16:27:24] [lib.camera.amcrest ] [DEBUG ] - Getting stream information for rtsp://admin:danielx95@10.1.1.9:554/cam/realmonitor?channel=1&subtype=0
viseron | 2020-10-17T08:27:30.171409326Z [2020-10-17 16:27:30] [lib.camera.amcrest ] [DEBUG ] - Resolution: 1920x1080 @ 20.0 FPS
viseron | 2020-10-17T08:27:30.171589522Z [2020-10-17 16:27:30] [lib.camera.amcrest ] [DEBUG ] - FFMPEG decoder command: ffmpeg -hide_banner -loglevel fatal -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -stimeout 5000000 -use_wallclock_as_timestamps 1 -vsync 0 -rtsp_transport tcp -i rtsp://admin:danielx95@10.1.1.9:554/cam/realmonitor?channel=1&subtype=0 -f rawvideo -pix_fmt nv12 pipe:1
viseron | 2020-10-17T08:27:30.171840969Z [2020-10-17 16:27:30] [lib.motion.amcrest ] [DEBUG ] - Initializing motion detector
viseron | 2020-10-17T08:27:30.171904698Z [2020-10-17 16:27:30] [lib.motion.amcrest ] [DEBUG ] - Motion detector initialized
[2020-10-17 16:27:30] [lib.camera.amcrest] [DEBUG ] - Starting decoder thread, message repeated 2 times
viseron | 2020-10-17T08:27:30.172774601Z [2020-10-17 16:27:30] [lib.nvr.amcrest ] [DEBUG ] - Starting camera
viseron | 2020-10-17T08:27:30.172961728Z [2020-10-17 16:27:30] [lib.camera.amcrest ] [DEBUG ] - Starting capture thread
viseron | 2020-10-17T08:27:30.173250684Z [2020-10-17 16:27:30] [lib.recorder.amcrest ] [DEBUG ] - Initializing ffmpeg recorder
viseron | 2020-10-17T08:27:30.173355706Z [2020-10-17 16:27:30] [lib.camera.amcrest ] [DEBUG ] - Performing a sanity check on the ffmpeg command
viseron | 2020-10-17T08:27:30.173503610Z [2020-10-17 16:27:30] [lib.recorder.amcrest ] [DEBUG ] - FFMPEG encoder command: ffmpeg -hide_banner -loglevel error -f rawvideo -pix_fmt nv12 -s:v <width>x<height> -r <fps> -i pipe:0 -y <file>
viseron | 2020-10-17T08:27:30.173584957Z [2020-10-17 16:27:30] [lib.nvr.amcrest ] [DEBUG ] - NVR thread initialized
viseron | 2020-10-17T08:27:30.173804776Z [2020-10-17 16:27:30] [lib.nvr.amcrest ] [DEBUG ] - Waiting for first frame
viseron | 2020-10-17T08:27:30.173905980Z [2020-10-17 16:27:30] [root ] [INFO ] - Initialization complete
viseron | 2020-10-17T08:28:08.776198444Z [2020-10-17 16:28:08] [lib.camera.amcrest ] [DEBUG ] - Running object detection at 6.0s interval, every 120 frame(s)
viseron | 2020-10-17T08:28:08.776224180Z [2020-10-17 16:28:08] [lib.camera.amcrest ] [DEBUG ] - Running motion detection at 0.5s interval, every 10 frame(s)
viseron | 2020-10-17T08:28:47.298021967Z [2020-10-17 16:28:47] [lib.nvr.amcrest ] [DEBUG ] - First frame received
viseron | 2020-10-17T08:28:48.128489722Z Exception in thread Thread-3:
viseron | 2020-10-17T08:28:48.128513639Z Traceback (most recent call last):
viseron | 2020-10-17T08:28:48.128517628Z File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
viseron | 2020-10-17T08:28:48.128520829Z self.run()
viseron | 2020-10-17T08:28:48.128530429Z File "/src/viseron/lib/nvr.py", line 506, in run
viseron | 2020-10-17T08:28:48.128534836Z self.filter_fov(processed_object_frame)
viseron | 2020-10-17T08:28:48.128537456Z File "/src/viseron/lib/nvr.py", line 383, in filter_fov
viseron | 2020-10-17T08:28:48.128540170Z self.labels_in_fov = labels_in_fov
viseron | 2020-10-17T08:28:48.128543109Z File "/src/viseron/lib/nvr.py", line 412, in labels_in_fov
viseron | 2020-10-17T08:28:48.128546035Z self._mqtt.devices,
viseron | 2020-10-17T08:28:48.128548534Z File "/src/viseron/lib/helpers.py", line 256, in report_labels
viseron | 2020-10-17T08:28:48.128551165Z mqtt_devices[label].publish(True, attributes)
viseron | 2020-10-17T08:28:48.128553760Z KeyError: 'car'
viseron | 2020-10-17T08:28:48.128556352Z
viseron | 2020-10-17T08:28:48.128637585Z [2020-10-17 16:28:48] [root ] [INFO ] - Exiting
I added car
to the object detection because the motion detection seemed to trigger every time a car drove past my house. Even though car
is definitely a trained model in darknet, it created the above error. (validated using docker exec -it viseron cat /detectors/models/darknet/coco.names
).
Also what is the convention for boolean values in YAML? Is it supposed to be true
or True
??
Edit:
Same error happens for person
both for object detection triggered by motion and by the object detection interval.
WARNING: Some networks were defined but are not used by any service: public
Attaching to viseron
viseron | 2020-10-17T13:31:03.298185693Z [2020-10-17 21:31:03] [root ] [INFO ] - -------------------------------------------
viseron | 2020-10-17T13:31:03.298210229Z [2020-10-17 21:31:03] [root ] [INFO ] - Initializing...
viseron | 2020-10-17T13:31:03.298218530Z [2020-10-17 21:31:03] [root ] [DEBUG ] - Starting cleanup scheduler
viseron | 2020-10-17T13:31:03.398093530Z [2020-10-17 21:31:03] [root ] [DEBUG ] - Running initial cleanup
viseron | 2020-10-17T13:31:03.398130481Z [2020-10-17 21:31:03] [lib.cleanup ] [DEBUG ] - Running cleanup
viseron | 2020-10-17T13:31:03.402262313Z [2020-10-17 21:31:03] [lib.detector ] [DEBUG ] - Initializing object detector darknet
viseron | 2020-10-17T13:31:04.064860303Z [2020-10-17 21:31:04] [lib.detector ] [DEBUG ] - Object detector initialized
viseron | 2020-10-17T13:31:04.065075697Z [2020-10-17 21:31:04] [lib.post_processors ] [DEBUG ] - Initializing post processor face_recognition
viseron | 2020-10-17T13:31:06.348248211Z [2020-10-17 21:31:06] [lib.post_processors.face_recognition.dlib] [DEBUG ] - Initializing dlib
viseron | 2020-10-17T13:31:06.348270141Z [2020-10-17 21:31:06] [lib.post_processors.face_recognition.dlib] [DEBUG ] - Training faces...
viseron | 2020-10-17T13:31:06.348460526Z [2020-10-17 21:31:06] [lib.post_processors.face_recognition.dlib] [DEBUG ] - Training face daniel
viseron | 2020-10-17T13:31:07.603082091Z [2020-10-17 21:31:07] [lib.post_processors.face_recognition.dlib] [DEBUG ] - Training complete
viseron | 2020-10-17T13:31:07.603176180Z [2020-10-17 21:31:07] [lib.post_processors.face_recognition.dlib] [DEBUG ] - dlib initialized
viseron | 2020-10-17T13:31:07.607429580Z [2020-10-17 21:31:07] [lib.post_processors ] [DEBUG ] - Post processor face_recognition initialized
viseron | 2020-10-17T13:31:07.607501366Z [2020-10-17 21:31:07] [root ] [INFO ] - Initializing NVR threads
viseron | 2020-10-17T13:31:07.607861414Z [2020-10-17 21:31:07] [lib.nvr.amcrest ] [DEBUG ] - Initializing NVR thread
viseron | 2020-10-17T13:31:07.608148353Z [2020-10-17 21:31:07] [lib.camera.amcrest ] [DEBUG ] - Initializing ffmpeg RTSP pipe
viseron | 2020-10-17T13:31:07.608244870Z [2020-10-17 21:31:07] [lib.camera.amcrest ] [DEBUG ] - Getting stream information for rtsp://admin:password@10.1.1.9:554/cam/realmonitor?channel=1&subtype=0
viseron | 2020-10-17T13:31:13.032545527Z [2020-10-17 21:31:13] [lib.camera.amcrest ] [DEBUG ] - Resolution: 1920x1080 @ 20.0 FPS
viseron | 2020-10-17T13:31:13.032800220Z [2020-10-17 21:31:13] [lib.camera.amcrest ] [DEBUG ] - FFMPEG decoder command: ffmpeg -hide_banner -loglevel fatal -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -stimeout 5000000 -use_wallclock_as_timestamps 1 -vsync 0 -rtsp_transport tcp -i rtsp://*****:*****@10.1.1.9:554/cam/realmonitor?channel=1&subtype=0 -f rawvideo -pix_fmt nv12 pipe:1
viseron | 2020-10-17T13:31:13.033115113Z [2020-10-17 21:31:13] [lib.motion.amcrest ] [DEBUG ] - Initializing motion detector
viseron | 2020-10-17T13:31:13.033182335Z [2020-10-17 21:31:13] [lib.motion.amcrest ] [DEBUG ] - Motion detector initialized
[2020-10-17 21:31:13] [lib.camera.amcrest] [DEBUG ] - Starting decoder thread, message repeated 2 times
viseron | 2020-10-17T13:31:13.034001528Z [2020-10-17 21:31:13] [lib.nvr.amcrest ] [DEBUG ] - Starting camera
viseron | 2020-10-17T13:31:13.034182454Z [2020-10-17 21:31:13] [lib.camera.amcrest ] [DEBUG ] - Starting capture thread
viseron | 2020-10-17T13:31:13.034351804Z [2020-10-17 21:31:13] [lib.recorder.amcrest ] [DEBUG ] - Initializing ffmpeg recorder
viseron | 2020-10-17T13:31:13.034456492Z [2020-10-17 21:31:13] [lib.camera.amcrest ] [DEBUG ] - Performing a sanity check on the ffmpeg command
viseron | 2020-10-17T13:31:13.034585581Z [2020-10-17 21:31:13] [lib.recorder.amcrest ] [DEBUG ] - FFMPEG encoder command: ffmpeg -hide_banner -loglevel error -f rawvideo -pix_fmt nv12 -s:v <width>x<height> -r <fps> -i pipe:0 -y <file>
viseron | 2020-10-17T13:31:13.034683562Z [2020-10-17 21:31:13] [lib.nvr.amcrest ] [DEBUG ] - NVR thread initialized
viseron | 2020-10-17T13:31:13.035062842Z [2020-10-17 21:31:13] [lib.nvr.amcrest ] [DEBUG ] - Waiting for first frame
viseron | 2020-10-17T13:31:13.042949473Z [2020-10-17 21:31:13] [root ] [INFO ] - Initialization complete
viseron | 2020-10-17T13:31:40.406532840Z [2020-10-17 21:31:40] [lib.camera.amcrest ] [DEBUG ] - Running object detection at 6.0s interval, every 120 frame(s)
viseron | 2020-10-17T13:31:40.406601218Z [2020-10-17 21:31:40] [lib.camera.amcrest ] [DEBUG ] - Running motion detection at 0.5s interval, every 10 frame(s)
viseron | 2020-10-17T13:32:19.393034915Z [2020-10-17 21:32:19] [lib.nvr.amcrest ] [DEBUG ] - First frame received
[2020-10-17 21:32:25] [lib.nvr.amcrest.object] [DEBUG ] - Objects: [], message repeated 2 times
viseron | 2020-10-17T13:32:31.355196655Z Exception in thread Thread-3:
viseron | 2020-10-17T13:32:31.355222080Z Traceback (most recent call last):
viseron | 2020-10-17T13:32:31.355227774Z File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
viseron | 2020-10-17T13:32:31.355232777Z self.run()
viseron | 2020-10-17T13:32:31.355237340Z File "/src/viseron/lib/nvr.py", line 506, in run
viseron | 2020-10-17T13:32:31.355241677Z self.filter_fov(processed_object_frame)
viseron | 2020-10-17T13:32:31.355245774Z File "/src/viseron/lib/nvr.py", line 383, in filter_fov
viseron | 2020-10-17T13:32:31.355250239Z self.labels_in_fov = labels_in_fov
viseron | 2020-10-17T13:32:31.355255295Z File "/src/viseron/lib/nvr.py", line 412, in labels_in_fov
viseron | 2020-10-17T13:32:31.355260169Z self._mqtt.devices,
viseron | 2020-10-17T13:32:31.355264445Z File "/src/viseron/lib/helpers.py", line 256, in report_labels
viseron | 2020-10-17T13:32:31.355269022Z mqtt_devices[label].publish(True, attributes)
viseron | 2020-10-17T13:32:31.355273088Z KeyError: 'person'
viseron | 2020-10-17T13:32:31.355275822Z
viseron | 2020-10-17T13:32:31.355327069Z [2020-10-17 21:32:31] [root ] [INFO ] - Exiting
Is this another quick fix? If not I can raise it as a separate issue.
Yeah this should not happen. For some reason its trying to publish to MQTT even though you have not configured it. Looking into it now.
Edit: afaik booleans in YAML is usually lower-case. But it accepts several formats (1/0, true/false, on/off etc)
~What version number should I use going forward?~ Got it 1.6.2
Yes exactly. I just published the release notes.
I got caught up during the pushing of the images, sorry for the delay!
It is now saving clips to /recordings! I think the MQTT issue stopped this from working before!
great! closing this for now. Feel free to reopen or open a new issue if you have any other issues
It is not recording motion/object detection clips to the
/recordings
directory in docker, the volume mapping exists and I tried with bothprivileged
and unprivileged.Docker compose:
Config
Logs:
Volume:
I have studied the configuration but cannot get this to work at all, what am I missing?