Closed tomcatxx closed 3 years ago
Your logs show mlapi is set to cpu mode.
Check your mlapiconfig.ini - what is object_processor
?
Shame on me my eye are fucked up. Playing for 3 days around with object detection and so on. After setting object_processor to gpu it works. Thank you very much for the hint.
Here the performance for your interest done with the exaple video and stream.py:
Aug 28 2020 23:23:53.725127 [DBG 1] |---------- YOLO (input image: 800w*450h, resized to: 416w*416h) ----------|
Aug 28 2020 23:23:53.725346 [DBG 1] Waiting for gpu detection lock...
Aug 28 2020 23:23:53.726335 [DBG 1] Got gpu lock for detection
Aug 28 2020 23:23:53.811529 [DBG 1] detect lock released
Aug 28 2020 23:23:53.812905 [DBG 1] YOLO detection took: 86.383 milliseconds
Aug 28 2020 23:23:54.202768 [DBG 1] YOLO NMS filtering took: 3.078 milliseconds
Aug 28 2020 23:23:54.205099 [DBG 2] core model detection over, got 8 objects. Now filtering
Aug 28 2020 23:23:54.205332 [DBG 3] Max object size found to be: 100%
Aug 28 2020 23:23:54.205499 [DBG 2] Converted 100% to 360000.0
Aug 28 2020 23:23:54.205657 [DBG 1] Ignoring person [242, 143, 270, 219] as conf. level 0.20213405787944794 is lower than 0.
GPU is nearly sleeping :)
Btw. we should find a way to put the detection in front of zoneminder not after an event happends. Even the cheap jetson nano has a great potential about this. For example pushing frames for detection directly from zoneminder to mlapi and trigger recording based on the result. Dirty Workaround Home Assistant take picture every sec -> push to mlapi -> trigger recording based on result.
Or just think about Deepstream -> amqp broker -> (HomeAssistant/some other script ....) triger Zoneminder (my favorite idea)
closing as the core issue is resolved
Hi I installed everything as discribed and followed this guide: https://www.pyimagesearch.com/2020/02/03/how-to-use-opencvs-dnn-module-with-nvidia-gpus-cuda-and-cudnn/ to install opencv. All his exaples work with gpu support after this. Even older yolo exaples could I get running with gpu support after changing the code as discribed. The part:...
however mlapi always start just with cpu support:
Any suggestions what I could to to enable gpu support?