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

detect.py ~10 FPS on Jetson Xavier AGX and NX #2068

Closed
sammilei opened this issue Jan 28, 2021 · 4 comments
Closed

detect.py ~10 FPS on Jetson Xavier AGX and NX #2068

sammilei opened this issue Jan 28, 2021 · 4 comments
Labels
question Further information is requested

Comments

@sammilei
Copy link

sammilei commented Jan 28, 2021

❔Question

Hi, I installed YOLOv5 v3.0 into Jetpack 4.4.1 on Xavier AGX and NX following this post. Running detect.py only gives me 10-15 PFS with a bare installation regardless of a small or large network in image size 320x256, 416x352, or 640x512 on the inference image, bus.jpg. Detection is a bit slower on NX than AGX, as expected.
Other people on the internet, like in this thread, claimed 30hz detecting on AGX. I wonder what I should do differently to get to 30hz.

Another question is why the detection rate in image size 320 is worse than 416.

Thank you!

system

Linux: Ubuntu 18.04
CUDA: 10.2.89
OpenCV: 4.5.0
cuDNN: 8.0.0.180

run

#python3 detect.py --weights yolov5s.pt --img 416 --conf 0.25 --source inference/images/zidane.jpg

Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.25, device='', img_size=416, iou_thres=0.5, output='inference/output', save_txt=False, source='inference/images/zidane.jpg', update=False, view_img=False, weights=['yolov5s.pt'])
Using CUDA device0 _CudaDeviceProperties(name='Xavier', total_memory=31918MB)

@sammilei sammilei added the question Further information is requested label Jan 28, 2021
@sammilei
Copy link
Author

NVM. I also got 30FPS when using a video instead of a single image.

video 1/1 (1006/1019) /home/co/Downloads/How to get better gas mileage - GEICO.mp4: 384x640 1 cars, Done. (0.032s)
video 1/1 (1007/1019) /home/cor/Downloads/How to get better gas mileage - GEICO.mp4: 384x640 1 cars, Done. (0.035s)
video 1/1 (1008/1019) /home/co/Downloads/How to get better gas mileage - GEICO.mp4: 384x640 1 airplanes, Done. (0.033s)
video 1/1 (1011/1019) /home/co/Downloads/How to get better gas mileage - GEICO.mp4: 384x640 Done. (0.036s)
video 1/1 (1012/1019) /home/co/Downloads/How to get better gas mileage - GEICO.mp4: 384x640 Done. (0.029s)
video 1/1 (1013/1019) /home/co/Downloads/How to get better gas mileage - GEICO.mp4: 384x640 Done. (0.032s)
video 1/1 (1014/1019) /home/co/Downloads/How to get better gas mileage - GEICO.mp4: 384x640 Done. (0.030s)
Results saved to inference/output
Done. (66.865s)

@rickymedrano
Copy link

rickymedrano commented Feb 27, 2021

@sammilei How are you calculating FPS when using detect.py? I'm running inference on a video as well and dont see an option to display it. Are you simply dividing the inference time by 1? i.e 1/0.032 = 31.25FPS?

@ONNONS
Copy link

ONNONS commented Jul 27, 2021

I'm curious too please let me know

@ONNONS
Copy link

ONNONS commented Jul 27, 2021

@sammilei How are you calculating FPS when using detect.py? I'm running inference on a video as well and dont see an option to display it. Are you simply dividing the inference time by 1? i.e 1/0.032 = 31.25FPS?

I'm curious too please let me know

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

3 participants