opendatacam: Detection in 3.0.2 is not working on desktop

Hi!

Thanks a lot for this cool project! Unfortunately, I am having problems getting it to run.

Expected: Get detection boxes on the demo video file.

Actual: image

Steps to reproduce: I followed the instructions to install the desktop version using the latest release of 3.0.2 and then started the containers. I did not change the default config.

My setup: GPU: NVIDIA RTX A2000 8GB Laptop GPU CUDA-version: 10020 (12020), cuDNN: 7.6.5, GPU count: 1
OpenCV version: 4.1.1 Firefox 118 Ubuntu 22.04

Anyone had the same problems? There is definitively something wrong with some versions or my hardware, I guess.

Logs:

 > OpenDataCam@3.0.2 start /var/local/opendatacam
opendatacam-opendatacam-1  | > PORT=8080 NODE_ENV=production node server.js
opendatacam-opendatacam-1  | 
opendatacam-opendatacam-1  | -----------------------------------
opendatacam-opendatacam-1  | -     Opendatacam initialized     -
opendatacam-opendatacam-1  | - Config loaded:                  -
opendatacam-opendatacam-1  | {
opendatacam-opendatacam-1  |   "OPENDATACAM_VERSION": "3.0.2",
opendatacam-opendatacam-1  |   "PATH_TO_YOLO_DARKNET": "/var/local/darknet",
opendatacam-opendatacam-1  |   "VIDEO_INPUT": "file",
opendatacam-opendatacam-1  |   "NEURAL_NETWORK": "yolov4",
opendatacam-opendatacam-1  |   "VIDEO_INPUTS_PARAMS": {
opendatacam-opendatacam-1  |     "file": "opendatacam_videos/demo.mp4",
opendatacam-opendatacam-1  |     "usbcam": "v4l2src device=/dev/video0 ! video/x-raw, framerate=30/1, width=640, height=360 ! videoconvert ! appsink",
opendatacam-opendatacam-1  |     "raspberrycam": "nvarguscamerasrc ! video/x-raw(memory:NVMM),width=1280, height=720, framerate=30/1, format=NV12 ! nvvidconv ! video/x-raw, format=BGRx, width=640, height=360 ! videoconvert ! video/x-raw, format=BGR ! appsink",
opendatacam-opendatacam-1  |     "remote_cam": "YOUR IP CAM STREAM (can be .m3u8, MJPEG ...), anything supported by opencv",
opendatacam-opendatacam-1  |     "remote_hls_gstreamer": "souphttpsrc location=http://YOUR_HLSSTREAM_URL_HERE.m3u8 ! hlsdemux ! decodebin ! videoconvert ! videoscale ! appsink"
opendatacam-opendatacam-1  |   },
opendatacam-opendatacam-1  |   "TRACKER_SETTINGS": {
opendatacam-opendatacam-1  |     "objectMaxAreaInPercentageOfFrame": 80,
opendatacam-opendatacam-1  |     "confidence_threshold": 0.2,
opendatacam-opendatacam-1  |     "iouLimit": 0.05,
opendatacam-opendatacam-1  |     "unMatchedFrameTolerance": 5
opendatacam-opendatacam-1  |   },
opendatacam-opendatacam-1  |   "COUNTER_SETTINGS": {
opendatacam-opendatacam-1  |     "minAngleWithCountingLineThreshold": 5,
opendatacam-opendatacam-1  |     "computeTrajectoryBasedOnNbOfPastFrame": 5
opendatacam-opendatacam-1  |   },
opendatacam-opendatacam-1  |   "VALID_CLASSES": [
opendatacam-opendatacam-1  |     "*"
opendatacam-opendatacam-1  |   ],
opendatacam-opendatacam-1  |   "DISPLAY_CLASSES": [
opendatacam-opendatacam-1  |     {
opendatacam-opendatacam-1  |       "class": "bicycle",
opendatacam-opendatacam-1  |       "hexcode": "1F6B2"
opendatacam-opendatacam-1  |     },
opendatacam-opendatacam-1  |     {
opendatacam-opendatacam-1  |       "class": "person",
opendatacam-opendatacam-1  |       "hexcode": "1F6B6"
opendatacam-opendatacam-1  |     },
opendatacam-opendatacam-1  |     {
opendatacam-opendatacam-1  |       "class": "truck",
opendatacam-opendatacam-1  |       "hexcode": "1F69B"
opendatacam-opendatacam-1  |     },
opendatacam-opendatacam-1  |     {
opendatacam-opendatacam-1  |       "class": "motorbike",
opendatacam-opendatacam-1  |       "hexcode": "1F6F5"
opendatacam-opendatacam-1  |     },
opendatacam-opendatacam-1  |     {
opendatacam-opendatacam-1  |       "class": "car",
opendatacam-opendatacam-1  |       "hexcode": "1F697"
opendatacam-opendatacam-1  |     },
opendatacam-opendatacam-1  |     {
opendatacam-opendatacam-1  |       "class": "bus",
opendatacam-opendatacam-1  |       "hexcode": "1F68C"
opendatacam-opendatacam-1  |     }
opendatacam-opendatacam-1  |   ],
opendatacam-opendatacam-1  |   "PATHFINDER_COLORS": [
opendatacam-opendatacam-1  |     "#1f77b4",
opendatacam-opendatacam-1  |     "#ff7f0e",
opendatacam-opendatacam-1  |     "#2ca02c",
opendatacam-opendatacam-1  |     "#d62728",
opendatacam-opendatacam-1  |     "#9467bd",
opendatacam-opendatacam-1  |     "#8c564b",
opendatacam-opendatacam-1  |     "#e377c2",
opendatacam-opendatacam-1  |     "#7f7f7f",
opendatacam-opendatacam-1  |     "#bcbd22",
opendatacam-opendatacam-1  |     "#17becf"
opendatacam-opendatacam-1  |   ],
opendatacam-opendatacam-1  |   "COUNTER_COLORS": {
opendatacam-opendatacam-1  |     "yellow": "#FFE700",
opendatacam-opendatacam-1  |     "turquoise": "#A3FFF4",
opendatacam-opendatacam-1  |     "green": "#a0f17f",
opendatacam-opendatacam-1  |     "purple": "#d070f0",
opendatacam-opendatacam-1  |     "red": "#AB4435"
opendatacam-opendatacam-1  |   },
opendatacam-opendatacam-1  |   "NEURAL_NETWORK_PARAMS": {
opendatacam-opendatacam-1  |     "yolov4": {
opendatacam-opendatacam-1  |       "data": "cfg/coco.data",
opendatacam-opendatacam-1  |       "cfg": "cfg/yolov4-416x416.cfg",
opendatacam-opendatacam-1  |       "weights": "yolov4.weights"
opendatacam-opendatacam-1  |     },
opendatacam-opendatacam-1  |     "yolov4-tiny": {
opendatacam-opendatacam-1  |       "data": "cfg/coco.data",
opendatacam-opendatacam-1  |       "cfg": "cfg/yolov4-tiny.cfg",
opendatacam-opendatacam-1  |       "weights": "yolov4-tiny.weights"
opendatacam-opendatacam-1  |     }
opendatacam-opendatacam-1  |   },
opendatacam-opendatacam-1  |   "TRACKER_ACCURACY_DISPLAY": {
opendatacam-opendatacam-1  |     "nbFrameBuffer": 300,
opendatacam-opendatacam-1  |     "settings": {
opendatacam-opendatacam-1  |       "radius": 3.1,
opendatacam-opendatacam-1  |       "blur": 6.2,
opendatacam-opendatacam-1  |       "step": 0.1,
opendatacam-opendatacam-1  |       "gradient": {
opendatacam-opendatacam-1  |         "1": "red",
opendatacam-opendatacam-1  |         "0.4": "orange"
opendatacam-opendatacam-1  |       },
opendatacam-opendatacam-1  |       "canvasResolutionFactor": 0.1
opendatacam-opendatacam-1  |     }
opendatacam-opendatacam-1  |   },
opendatacam-opendatacam-1  |   "MONGODB_URL": "mongodb://mongo:27017",
opendatacam-opendatacam-1  |   "PORTS": {
opendatacam-opendatacam-1  |     "app": 8080,
opendatacam-opendatacam-1  |     "darknet_json_stream": 8070,
opendatacam-opendatacam-1  |     "darknet_mjpeg_stream": 8090
opendatacam-opendatacam-1  |   }
opendatacam-opendatacam-1  | }
opendatacam-opendatacam-1  | -----------------------------------
opendatacam-opendatacam-1  | Process YOLO initialized
opendatacam-opendatacam-1  | > Ready on http://localhost:8080
opendatacam-opendatacam-1  | > Ready on http://172.21.5.2:8080
opendatacam-mongo-1        | {"t":{"$date":"2023-09-28T10:05:40.804+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.21.5.2:47670","uuid":{"uuid":{"$uuid":"1a3dbc39-ff8f-4aae-8fa3-0af36497ff9f"}},"connectionId":1,"connectionCount":1}}
opendatacam-mongo-1        | {"t":{"$date":"2023-09-28T10:05:40.806+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn1","msg":"client metadata","attr":{"remote":"172.21.5.2:47670","client":"conn1","doc":{"driver":{"name":"nodejs","version":"3.5.8"},"os":{"type":"Linux","name":"linux","architecture":"x64","version":"5.19.0-76051900-generic"},"platform":"'Node.js v12.22.6, LE (unified)"}}}
opendatacam-opendatacam-1  | Success init db
opendatacam-mongo-1        | {"t":{"$date":"2023-09-28T10:05:40.810+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.21.5.2:47676","uuid":{"uuid":{"$uuid":"2e86da74-ccda-4377-addd-27279608fd94"}},"connectionId":2,"connectionCount":2}}
opendatacam-mongo-1        | {"t":{"$date":"2023-09-28T10:05:40.810+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.21.5.2:47682","uuid":{"uuid":{"$uuid":"5269f96b-b76c-4f52-bdbc-72fe5d0cd481"}},"connectionId":3,"connectionCount":3}}
opendatacam-mongo-1        | {"t":{"$date":"2023-09-28T10:05:40.810+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn2","msg":"client metadata","attr":{"remote":"172.21.5.2:47676","client":"conn2","doc":{"driver":{"name":"nodejs","version":"3.5.8"},"os":{"type":"Linux","name":"linux","architecture":"x64","version":"5.19.0-76051900-generic"},"platform":"'Node.js v12.22.6, LE (unified)"}}}
opendatacam-mongo-1        | {"t":{"$date":"2023-09-28T10:05:40.811+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn3","msg":"client metadata","attr":{"remote":"172.21.5.2:47682","client":"conn3","doc":{"driver":{"name":"nodejs","version":"3.5.8"},"os":{"type":"Linux","name":"linux","architecture":"x64","version":"5.19.0-76051900-generic"},"platform":"'Node.js v12.22.6, LE (unified)"}}}
opendatacam-mongo-1        | {"t":{"$date":"2023-09-28T10:05:40.811+00:00"},"s":"I",  "c":"NETWORK",  "id":6788700, "ctx":"conn2","msg":"Received first command on ingress connection since session start or auth handshake","attr":{"elapsedMillis":1}}
opendatacam-mongo-1        | {"t":{"$date":"2023-09-28T10:05:40.812+00:00"},"s":"I",  "c":"NETWORK",  "id":6788700, "ctx":"conn3","msg":"Received first command on ingress connection since session start or auth handshake","attr":{"elapsedMillis":1}}
opendatacam-opendatacam-1  | Process YOLO started
opendatacam-opendatacam-1  |  CUDA-version: 10020 (12020), cuDNN: 7.6.5, GPU count: 1  
opendatacam-opendatacam-1  |  OpenCV version: 4.1.1
opendatacam-opendatacam-1  |  0 : compute_capability = 860, cudnn_half = 0, GPU: NVIDIA RTX A2000 8GB Laptop GPU 
opendatacam-opendatacam-1  |    layer   filters  size/strd(dil)      input                output
opendatacam-opendatacam-1  |    0 (node:40) [DEP0001] DeprecationWarning: OutgoingMessage.flush is deprecated. Use flushHeaders instead.

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 1
  • Comments: 15

Most upvoted comments

Hi, I got it running without Docker! So I guess the problem comes from the GPU runtime.

I encountered a few obstacles though.

  1. I had to install the opencv development package to get the needed header files for compilation (sudo apt install libopencv-dev). Might be worth noting in the documentation. Let me know, if I shall open a PR 😃
  2. I had to set CUDNN=0 in the darknet makefile as the file was not present on my machine and after some googling, I found out that one needs to install the CUDNN library (https://developer.nvidia.com/cudnn) for which an account is needed. So I decided to turn it off.
  3. I installed Cuda 12.2 and the nvcc compiler complained that -gencode arch=compute_30,code=sm_30 is not supported anymore. After I removed it from the Makefile, it compiled

Alright, I will try! Thank you very much for your help!