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

Running prediction on webcam. Invalid Darknet command: detector #90

Closed
NatalliSu opened this issue Nov 12, 2024 · 2 comments
Closed

Running prediction on webcam. Invalid Darknet command: detector #90

NatalliSu opened this issue Nov 12, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@NatalliSu
Copy link

Hello. I have installed Darknet on Windows 10 step by step as in the description. When I run it on my webcam I got an error message invalid Darknet command: detector. The command line that I used and output is bellow.

darknet detector demo test.data yolov4-tiny.cfg yolov4-tiny.weights -c 0

←[1;33mskipped validating of argument #1 "demo" (does not appear to be a valid parameter, file, or directory)←[0m
Darknet V3 "Jazz" v3.0-193-g0a3dca26
CUDA runtime version 12060 (v12.6), driver version 12070 (v12.7)
cuDNN version 12060 (v9.5.1), use of half-size floats is ENABLED
=> 0: NVIDIA GeForce RTX 3080 Laptop GPU [#8.6], 16.0 GiB
OpenCV v4.9.0, Windows 10 Pro * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

  • Error location: C:\src\darknet\src-lib\detector.cpp, run_detector(), line #2196
  • Error message: invalid Darknet command: detector
  • Thread #20748: main darknet thread
  • Version v3.0-193-g0a3dca26 built on Nov 12 2024 10:23:45

backtrace (7 entries):
1/7: $☻()
2/7: $☻()
3/7: $☻()
4/7: $☻()
5/7: $☻()
6/7: BaseThreadInitThunk()
7/7: RtlUserThreadStart()
known threads: 1
1/1: #20748: main darknet thread

If I run detector test everything is fine, but detector demo causing error message above.

@NatalliSu NatalliSu added the bug Something isn't working label Nov 12, 2024
@stephanecharette
Copy link
Collaborator

darknet detector demo test.data yolov4-tiny.cfg yolov4-tiny.weights -c 0

That is an invalid command. Where did you get that command from?

The new V3 commands are listed in the darknet --help output and in the readme: https://github.com/hank-ai/darknet?tab=readme-ov-file#cli

image

So the command you probably want would be something near the following (adjust as necessary):

darknet_08_display_webcam yolov4-tiny.cfg coco.names yolov4-tiny.weights

@NatalliSu
Copy link
Author

The command
darknet_08_display_webcam yolov4-tiny.cfg coco.names yolov4-tiny.weights
works perfectly. Thank you.

The command I was talking about (detector demo) I copied from the readme link you mentioned and adjusted file names. Now I see, it was an old version. Probably, that is why I got the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants