Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading from external camera #97

Closed
NatalliSu opened this issue Dec 3, 2024 · 3 comments
Closed

Reading from external camera #97

NatalliSu opened this issue Dec 3, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@NatalliSu
Copy link

NatalliSu commented Dec 3, 2024

I have an external camera, that is connected to my laptop. And, my laptop has its own webcam. I need to run prediction for the external camera. Could you give an example of CLI command for rtsp streaming external camera, please? I tryed

darknet_07_display_rtsp_stream rtsp://182.178.3.10:9254/w344 yolov4-tiny.cfg coco.names yolov4-tiny.weights

I know for sure that URL for camera is correct. There is an error message

Darknet V3 "Jazz" ←[1;37mv3.0-193-g0a3dca26←[0m
CUDA runtime version 12060 (←[1;37mv12.6←[0m), driver version 12070 (←[1;37mv12.7←[0m)
cuDNN version 12060 (←[1;37mv9.5.1←[0m), use of half-size floats is ←[1;37mENABLED←[0m
=> 0: ←[1;32mNVIDIA GeForce RTX 3080 Laptop GPU←[0m [#8.6], ←[1;33m16.0 GiB←[0m
OpenCV ←[1;37mv4.9.0←[0m, Windows 10 Pro
0 : compute_capability = 860, cudnn_half = 1, GPU: NVIDIA GeForce RTX 3080 Laptop GPU
Allocating workspace to transfer between CPU and GPU: 25.0 MiB
←[1;33mskipped validating of argument #0 "rtsp://182.178.3.10:9254/w344" (does not appear to be a valid parameter, file, or directory)←[0m
Connecting to stream rtsp://182.178.3.10:9254/w344...
Exception: failed to open the stream "rtsp://182.178.3.10:9254/w344"

When I tried darknet_08_display_webcam with flag -c number, like darknet_08_display_webcam -c 1 yolov4-tiny.cfg coco.names yolov4-tiny.weights, darknet always use camera of my laptop whatever number I enter.

@NatalliSu NatalliSu added the question Further information is requested label Dec 3, 2024
@stephanecharette
Copy link
Collaborator

You have multiple problems in 1 issue. Please join the discord server if you want to discuss things, or at the very least create a separate issue.

@stephanecharette
Copy link
Collaborator

On the discord, Natallia reports that setting the OpenCV backend to CAP_ANY has solved the problem with the RTSP stream:

image

@stephanecharette
Copy link
Collaborator

Added checks for -c and --camera parameters to darknet_08_display_webcam. So non-default webcams can now be specified. For example:

darknet_08_display_webcam mscoco --camera 2

...which is the same as:

darknet_08_display_webcam mscoco -c 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants