Qidian213 / deep_sort_yolov3

Real-time Multi-person tracker using YOLO v3 and deep_sort with tensorflow
GNU General Public License v3.0
1.65k stars 593 forks source link

how to improve fps? I use 7 k80 gpus,but it's just about 3~5fps. #85

Open LU-K-Brant opened 5 years ago

xxcheng0708 commented 5 years ago

Did you have any solutions?

reddytocode commented 5 years ago

i use a video capture Async method and works really well in a 1050ti and even better in a 2080ti

linspace100 commented 4 years ago

i use a video capture Async method and works really well in a 1050ti and even better in a 2080ti

How did you do the Async method? Could you please help me..?

reddytocode commented 4 years ago

https://github.com/Reddyforcode/thermal_camera_mtcnn/blob/master/videocaptureasync.py remove from the 9th line to 17th line for just the source that you want to have

for your local webcam

use:

from videocaptureasync import VideoCaptureAsync

cap = VideoCaptureAsync()
cap.start

while (True):
    _, frame = cap.read()

    #when exit
    #cap.stop()

or just don't process all the frames that you receive

linspace100 commented 4 years ago

@Reddyforcode Wow amazing. I did yours and got a amazing fps.

But, my model doesn`t work well. For example, in the demo file, line 89 to 100.

` if writeVideo_flag:

save a frame

        out.write(frame)
        frame_index = frame_index + 1
        list_file.write(str(frame_index)+' ')
        if len(boxs) != 0:
            for i in range(0,len(boxs)):
                list_file.write(str(boxs[i][0]) + ' '+str(boxs[i][1]) + ' '+str(boxs[i][2]) + ' '+str(boxs[i][3]) + ' ')
        list_file.write('\n')

    fps  = ( fps + (1./(time.time()-t1)) ) / 2

`

It always print former fps like 6~8. But actual video in window is much faster than before. Maybe x5 or x10 that I think.

Do you think it is possible to show exact fps?

guojingsai commented 4 years ago

@linspace100 Hi: I'm seeing the same issue,could you fix the fps print issue?

linspace100 commented 4 years ago

@guojingsai nope.. some people are struggling to solve the issue but it cant be solved. Maybe youd better use multiprocessing not async method. Async method cannot detect all of the objects in the frame.

HirataYurina commented 4 years ago

ok