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

8fps on 3070TI #8

Open
Pro100rus32 opened this issue Mar 23, 2022 · 5 comments
Open

8fps on 3070TI #8

Pro100rus32 opened this issue Mar 23, 2022 · 5 comments

Comments

@Pro100rus32
Copy link

I installed opencv with CUDA with version 4.5.4
image
I run the file yolo.py
image
I get 8 - 10 fps, which is too low. I removed the imshow and the fps stayed at the same level. I have noticed that the video card has almost no load. The load is 3 - 6%. I also tried running a smaller model, but fps did not rise above 16.
image
I ran this on the CPU as well, and got about 4 fps. I tried to run the second script, but it didn't work.

Traceback (most recent call last):
  File "C:\Users\test\Desktop\yolov5-opencv-cpp-python-main\yolo-tiny.py", line 19, in <module>
    input_image = format_yolov5(image) # making the image square
  File "C:\Users\test\Desktop\yolov5-opencv-cpp-python-main\yolo-tiny.py", line 12, in format_yolov5
    row, col, _ = frame.shape
AttributeError: 'NoneType' object has no attribute 'shape'

How can I improve the speed?

@freedomcoming
Copy link

Do you use cuda to run the script?
like this:
cd yolov5-opencv-cpp-python
python python/yolo.py cuda

@Pro100rus32
Copy link
Author

Do you use cuda to run the script? like this: cd yolov5-opencv-cpp-python python python/yolo.py cuda

Yes. I have 140fps on yolov4 script, but yolov5 working in 10 fps : (

@Neo-YH
Copy link

Neo-YH commented Apr 7, 2022

Same issue, CUDA available but low FPS?

@fatandfat
Copy link

I found simply change
result.setPreferableTarget(dnn::DNN_TARGET_CUDA_FP16); in load_net() to result.setPreferableTarget(dnn::DNN_TARGET_CUDA);
will solve the low fps problem

@doleron
Copy link
Owner

doleron commented Jun 2, 2022

Sorry, bro. I only tested it on note with RTX 2080. I'd keep it out to make easier reach by someone with same issue.

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

No branches or pull requests

5 participants