michalfaber / tensorflow_Realtime_Multi-Person_Pose_Estimation

Multi-Person Pose Estimation project for Tensorflow 2.0 with a small and fast model based on MobilenetV3
Other
215 stars 65 forks source link

The execution time of get_connections increases with each next frame. #37

Open KelLiNBY opened 2 years ago

KelLiNBY commented 2 years ago

I used demo_video.py and I determined an increase in the processing time of the same type of videos , but only different in duration . After that, I modified the process_frame function and added the processing time output for get_coordinate, get_connections and others in this process_frame. Similar to this: def process_frame(cropped, heatmap_idx, model, paf_idx, output_resize_factor): ..... tic4 = time.time() connections = get_connections(cfg, coordinates, pafs) print('connections : %.5f' % (time.time() - tic4)) ..... After that i run 5 min video with 29fps, the log was like this: Processing frame: 290 (00:00:10) processing time is 0.36798 coordinates : 0.00802 connections : 0.12001 ..... Processing frame: 3480 (00:02:00) processing time is 36.80047 coordinates : 0.00798 connections : 32.14523 ..... Processing frame: 5833 (00:03:21) processing time is 90.10047 coordinates : 0.0837 connections : 82.14523 ..... after that I stopped processing. Updating python from 3.9.5 to 3.10.6 and the actual numpy and tenzorflow did not give results.

My video is almost without people and should be processed quickly. If the script is modified and the same video starts again, then get_connections takes 80 seconds for the first frames and processing time continues to increase more than 80sec.