naisy / realtime_object_detection

Plug and Play Real-Time Object Detection App with Tensorflow and OpenCV. No Bugs No Worries. Enjoy!
MIT License
101 stars 36 forks source link

FPS performance difference in TX2 #52

Closed geonseoks closed 6 years ago

geonseoks commented 6 years ago

Hello @naisy ,

Thanks a lot for sharing your work.

I'm impressed about your project and I try to run in my TX2 board.

However, I set the same condition as readme, but the difference of FPS is remarkable so I have a question.

Here is my setting : TX2 / JetPack 3.2.1 / Tensorflow 1.6.0 / size = 1280*720 movie file / multi-threading = True / mode = Max-N

In your table with above setting, your FPS is about 31 but My TX2 is about 23.

I don't know why there is a big difference.

In my movie file, there are so many objects... is this the reason that FPS is more than 8 different?

Please let me know if there is anything that I missed or did not check.

Thank you.

naisy commented 6 years ago

Hi @geonseoks,

When saving to a movie, it will decrease to that FPS. Please check the difference with the default config.yml.

geonseoks commented 6 years ago

@naisy Thank you for quick response!

Actually, saving a movie : 21FPS, not saving a movie : 24FPS

The FPS has increased due to storage differences, but there are still difference with your results...

naisy commented 6 years ago

Hi @geonseoks,

The performance of 31 FPS is when using a web camera. (run_stream.py) Reading frames from movie file or image file is slow.

In the case of movie file and image file, frames can not be skipped, so frame reading will work on the main thread. When using the web camera, it is necessary to always read the latest frame. Therefore, the frame reading will work on the sub thread. And it only takes time to copy the image array on the main thread.

Therefore, FPS of movie file and image file is slow more than streaming.

geonseoks commented 6 years ago

@naisy Thank you very much for the detail explanation.