allo- / virtual_webcam_background

Use a virtual webcam background and overlays with body-pix and v4l2loopback
GNU General Public License v3.0
306 stars 48 forks source link

Error getting a webcam image! #56

Closed bard83 closed 3 years ago

bard83 commented 3 years ago

The run.sh gets error and doesn't work anymore.

config.yml

segmentation_threshold: 0.75
blur: 5
erode: 15
dilate: 10
virtual_video_device: "/dev/video2"
real_video_device: "/dev/video0"
width: 640
height: 480
segmentation_threshold: 0.75
average_masks: 2
mjpeg: False
layers:
  - "input": []
  - "foreground": []
  - "previous": []
$ ./run.sh 
2021-01-27 19:21:10.987584: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2021-01-27 19:21:10.987609: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Reloading config.
2021-01-27 19:21:12.244204: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2021-01-27 19:21:12.244237: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303)
2021-01-27 19:21:12.244268: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (bard83-ThinkPad-E570): /proc/driver/nvidia/version does not exist
Failed to reduce capture buffer size. Latency will be higher!
Model: mobilenet (multiplier=0.5, stride=16)
Loading model...
2021-01-27 19:21:12.286539: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-01-27 19:21:12.315614: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2699905000 Hz
2021-01-27 19:21:12.315857: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x533c9a0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-01-27 19:21:12.315875: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2021-01-27 19:21:12.344433: W tensorflow/core/common_runtime/graph_constructor.cc:1529] Importing a graph with a lower producer version 38 into an existing graph with producer version 440. Shape inference will have run different parts of the graph with different producer versions.
2021-01-27 19:21:12.379970: I tensorflow/core/grappler/devices.cc:69] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 0
2021-01-27 19:21:12.380112: I tensorflow/core/grappler/clusters/single_machine.cc:356] Starting new session
2021-01-27 19:21:12.416100: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:816] Optimization results for grappler item: graph_to_optimize
2021-01-27 19:21:12.416132: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   debug_stripper: debug_stripper did nothing. time = 0.03ms.
2021-01-27 19:21:12.416140: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   remapper: Graph size after: 244 nodes (0), 171 edges (0), time = 0.873ms.
2021-01-27 19:21:12.416148: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   constant_folding: Graph size after: 172 nodes (-72), 171 edges (0), time = 7.957ms.
2021-01-27 19:21:12.416155: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   arithmetic_optimizer: Graph size after: 172 nodes (0), 171 edges (0), time = 3.16ms.
2021-01-27 19:21:12.416161: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   dependency_optimizer: Graph size after: 172 nodes (0), 171 edges (0), time = 1.759ms.
2021-01-27 19:21:12.416168: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   debug_stripper: debug_stripper did nothing. time = 0.202ms.
2021-01-27 19:21:12.416174: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   remapper: Graph size after: 172 nodes (0), 171 edges (0), time = 0.7ms.
2021-01-27 19:21:12.416180: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   constant_folding: Graph size after: 172 nodes (0), 171 edges (0), time = 3.071ms.
2021-01-27 19:21:12.416186: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   arithmetic_optimizer: Graph size after: 172 nodes (0), 171 edges (0), time = 3.069ms.
2021-01-27 19:21:12.416192: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:818]   dependency_optimizer: Graph size after: 172 nodes (0), 171 edges (0), time = 1.217ms.
done.
Error getting a webcam image!
allo- commented 3 years ago

Check:

The success return value is only True or False and I am currently not sure how to get more debug output from opencv.