Closed KyGuy2002 closed 8 months ago
Do you have a GPU? Also, how did you install and run the program? Either way, the first line shouldn't be an issue, if I remember from my expierence. Also, do you have a webcam or video capture device? That's what is most likely causing the error near the end of the output. If you want to use a Wyze Cam, you have to set up docker-wyze-bridge. Currently, the Dockerfile for Wyzely Detect isn't up-to-date and thus, might not work. Thus, I suggest going to docker-wyze-bridge and following the quick start guide. If you face any issues, I can try to help you.
I do have a GPU, but im not sure if I need to do anything to select or enable it. I cloned the repo and ran the docker compose command, and added creds to the file. My laptop has a webcam and I have an external webcam, but im not sure if those are accessible to WSL. I am using docker desktop with WSL 2 integration, and I ran the docker commands from within WSL. I have docker bridge setup in a seperate container, how would I link them if I dont use the one included in the compose file?
I am pretty new to all this so sorry if Im overlooking some things.
I tried it with poetry instead of docker, and I got it to recognize my GPU but same error. I have docker bridge running also, but not sure if I need to tell it where to find it or something.
The currently activated Python version 3.8.10 is not supported by the project (>=3.10, <3.12).
Trying to find and use a compatible version.
Using python3.10 (3.10.13)
Directory /home/linux /.deepface created
Directory /home/linux /.deepface/weights created
No .env file found
Using NVIDIA GeForce RTX 3050 Laptop GPU for pytorch
Set CUDA device
Downloading https://github.com/ultralytics/assets/releases/download/v8.1.0/yolov8n.pt to 'yolov8n.pt'...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6.23M/6.23M [00:00<00:00, 8.62MB/s]
No stream or capture device set, defaulting to capture device 0
[ WARN:0@16.890] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video0): can't open camera by index
[ERROR:0@16.890] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
Capture for a source failed as resolution is 0x0.
Check if the capture device is connected, working, and not in use by another program.
I tried it with poetry instead of docker, and I got it to recognize my GPU but same error. I have docker bridge running also, but not sure if I need to tell it where to find it or something.
The currently activated Python version 3.8.10 is not supported by the project (>=3.10, <3.12). Trying to find and use a compatible version. Using python3.10 (3.10.13) Directory /home/linux /.deepface created Directory /home/linux /.deepface/weights created No .env file found Using NVIDIA GeForce RTX 3050 Laptop GPU for pytorch Set CUDA device Downloading https://github.com/ultralytics/assets/releases/download/v8.1.0/yolov8n.pt to 'yolov8n.pt'... 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6.23M/6.23M [00:00<00:00, 8.62MB/s] No stream or capture device set, defaulting to capture device 0 [ WARN:0@16.890] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video0): can't open camera by index [ERROR:0@16.890] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range Capture for a source failed as resolution is 0x0. Check if the capture device is connected, working, and not in use by another program.
This is caused by WSL not having access to the webcam. There are workarounds, but I would suggest just running it natively on Windows. However, it seems TensorFlow randomly stopped working on Windows when using Poetry, which I am doing some more testing on currently.
Given what you've said, and since it seems to be running on WSL, pass --rtsp-url <URL>
to the program. You can obtain the RTSP URL from the docker-wyze-bridge Web UI.
Ideally, when I get Windows support working again, you shouldn't need to use WSL and the process will be much more seamless, like it was before the TensorFlow issue.
Seems the TensorFlow issue only impacts Poetry, which whilst still unfortunate and irritating, at least means that you can install via pip
. Try installing via pip
outside of WSL and you should be able to use the webcam.
Using the rtsp url i was able to get it working! I suggest you add that to the readme, unless I missed it.
I will try it with the webcam and pip to make sure that works also.
Thanks!!
No problem - glad it's working. I'll reply to this issue once TensorFlow is working again.
I agree the README needs work. I'm going to keep this issue open until I fix it.
The TensorFlow issue is now fixed in v0.2.1.
When attempting to start the container, I am receiving this error.
Do I need to install something else to make this work?
Thank you!