opencap-core
opencap-core copied to clipboard
Speed up inference mmpose
Test examples
- set flip_test=False in pose_hrnet_w48_dark+.
- set post_process='default' in pose_hrnet_w48_dark+.
- use faster human bounding box detector, see MMDetection.
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.
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.
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.
nice. let's first verify that pose est of 1 box makes things faster/ less memory before all the work to do it right.
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
Yoni mentioned we are doing passes with HRNet, is it useful? Dig in.
two things to try:
- image flipping, is that necessary? Ask Yoni
- batch for bbox. ask Yoni