Error in object detection

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
naseemr
Posts: 2
Joined: Mon Jun 20, 2022 5:29 pm

Error in object detection

Post by naseemr »

Hi All,
I am getting this error during object detection that I see in the /var/log/zm/zmesdetect.log:
06/20/22 12:17:14 zmesdetect[3178390] ERR image_manip.py:156 [animation: Traceback:Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/imageio_ffmpeg/_io.py", line 615, in write_frames
p.stdin.write(bb)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/zmes_hook_helpers/image_manip.py", line 118, in createAnimation
imageio.mimwrite(fname+'.mp4', mp4_final, format='mp4', fps=target_fps)
File "/usr/local/lib/python3.8/dist-packages/imageio/v2.py", line 331, in mimwrite
return file.write(ims, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/imageio/core/legacy_plugin_wrapper.py", line 216, in write
writer.append_data(ndimage)
File "/usr/local/lib/python3.8/dist-packages/imageio/core/format.py", line 589, in append_data
return self._append_data(im, total_meta)
File "/usr/local/lib/python3.8/dist-packages/imageio/plugins/ffmpeg.py", line 606, in _append_data
self._write_gen.send(im)
File "/usr/local/lib/python3.8/dist-packages/imageio_ffmpeg/_io.py", line 622, in write_frames
raise IOError(msg)
OSError: [Errno 32] Broken pipe

FFMPEG COMMAND:
/usr/local/lib/python3.8/dist-packages/imageio_ffmpeg/binaries/ffmpeg-linux64-v4.2.2 -y -f rawvideo -vcodec rawvideo -s 640x360 -pix_fmt rgb24 -r 2.00 -i - -an -vcodec libx264 -pix_fmt yuv420p -vf scale=640:368 -v warning /objdetect.mp4

FFMPEG STDERR OUTPUT:

]

And when I test with this script (/var/lib/zmeventnotification/bin/zm_event_start.sh) I get the following error:
sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 136
[ WARN:0@1.345] global /io/opencv/modules/dnn/src/net_impl.cpp (179) setUpNet DNN module was not built with CUDA backend; switching to CPU
IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (640, 360) to (640, 368) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).
/objdetect.mp4: Permission denied
[s] detected:car:83% person:75% --SPLIT--{"labels": ["car", "person", "car"], "boxes": [[155, -2, 329, 56], [427, 220, 615, 450], [30, 6, 130, 52]], "frame_id": "snapshot", "confidences": [0.8297111988067627, 0.7549650073051453, 0.6120249629020691], "image_dimensions": {"original": [720, 1280], "resized": [450, 800]}}


Any help is very much appreciated.
Thanks you!
Post Reply