realtime_object_detection
realtime_object_detection copied to clipboard
Question regarding performance.
I'm doing bad thing Naisy, You'll hate me, but overall goal is quite simple. Tensor takes 5 gigs or GPU I want to create queue which will use socket.io to read data from multiple cameras and returns boxes. https://drive.google.com/drive/folders/14d50kFKWnBUaLwL7z06CF2PwHUklaJdA?usp=sharing I have some problem with performance, I tried to mess with parameters but it makes no difference, it looks like GPU analyse takes a lot of time. Got any idea why there might be this heart beat ? https://photos.app.goo.gl/r1srTC1cEHnw8Z4t6 I tasted it previously it was about 20FPS for one source, but now it hangs on gpu queue for half a second. I really have no idea where I should look for improvements.
- camera_worker.py is just generator which reads frames from file and sends message to socket that frame is ready ( images are exchanged threw RAM DISK )
- run_socketio_tensor.py is just big script which executes without include of model this big loop
- socketio.py is equivalent to video or webcam..
ps. be lenient it's my first fight with python ;-) on daily bases I work with DWH/BI .
Overall I have also problem with sending first few images into gpu session, script seems to hang if I restart camera_worker.py it works, is there any special reason why it can't work from first frame?
Hi, @eeerrrwwwuuu,
faster rcnn is really slow. Was 20 fps with faster rcnn? I think that 20 fps with faster rcnn is maximum performance on desktop gpu. If you are using Jetson, it should be slower. It is about 1 fps.
At the first frame, memory initialization also works. Therefore it is slow. If the first frame can not be delayed, you should run with dummy frame before read camera frame.
I guess I removed all what is possible to leave just loop, which takes static image from ram disk, all stats are gone, but still gpu session takes about 1 second per image or RTX 2070 and Ryzen. When I used Your code without modification I was able to reach 20FPS. Maybe it goes threw CPU instead?
https://drive.google.com/open?id=1d3Fc5H9q1EfKUPIXTnXgRshOlDZQAlKE
@naisy my bad, after rebooting computer it started to fly ! ;-) Thank You as always!