opencap-core icon indicating copy to clipboard operation
opencap-core copied to clipboard

Speed up inference mmpose

Open antoinefalisse opened this issue 2 years ago • 7 comments

Test examples

  1. set flip_test=False in pose_hrnet_w48_dark+.
  2. set post_process='default' in pose_hrnet_w48_dark+.
  3. use faster human bounding box detector, see MMDetection.

antoinefalisse avatar Jan 10 '23 05:01 antoinefalisse

Tested 1. and 2.

On a 40s video, processing time goes from about 3min50s to 1min50s. It looks much shakier though. It is likely that accuracy would go down.

What would be interesting is to run pose detection only on the biggest box, and not on all boxed detected in the previous step. This should make pose detection faster.

antoinefalisse avatar Mar 15 '23 17:03 antoinefalisse

we could do the "find the biggest box across video and track it" approach that we use downstream. Not sure how easy it is to modify that.

suhlrich avatar Mar 15 '23 18:03 suhlrich

It should not be very hard, we get a pickle file from the box detection, we could just use the data for identifying the biggest box. Then we rewrite the pickle with the biggest box only.

antoinefalisse avatar Mar 15 '23 18:03 antoinefalisse

nice. let's first verify that pose est of 1 box makes things faster/ less memory before all the work to do it right.

suhlrich avatar Mar 15 '23 18:03 suhlrich

FYI, I tested this model: https://github.com/open-mmlab/mmpose/blob/master/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/tcformer_coco-wholebody.md

But it is as slow and looks noisier

antoinefalisse avatar Mar 15 '23 23:03 antoinefalisse

Yoni mentioned we are doing passes with HRNet, is it useful? Dig in.

antoinefalisse avatar Aug 29 '23 23:08 antoinefalisse

two things to try:

  • image flipping, is that necessary? Ask Yoni
  • batch for bbox. ask Yoni

antoinefalisse avatar Oct 03 '23 21:10 antoinefalisse