Hzzone / pytorch-openpose

pytorch implementation of openpose including Hand and Body Pose Estimation.
2.02k stars 391 forks source link

Is the performance too bad? #53

Open HW140701 opened 3 years ago

HW140701 commented 3 years ago

Is the performance too bad? It takes 1 - 2 seconds to predict a image on GTX 1070 8G. Is there a plan to optimize performance and increase the speed of predicit?

Hzzone commented 3 years ago

well, I will update this repo with parallel processing and a new hand detection model. Waiting for the time I am free.

HW140701 commented 3 years ago

well, I will update this repo with parallel processing and a new hand detection model. Waiting for the time I am free.

Thanks ! Expect

RisithPerera commented 3 years ago

@Hzzone Can you please tell me which kind of optimizations did you used? When are you able to update the repo? Thanks for you hard work!

Hzzone commented 3 years ago

I mean that, the major consumption is the hand detection model which I have to use the pose to estimate. It would be better if I change it by training a mobile net hand detection model, and process the images with multi-thread.

RisithPerera commented 3 years ago

@Hzzone In the body.py there are lots of calculations after using the model. These calculations take lots of time.

data = torch.from_numpy(im).float()
  if torch.cuda.is_available():
      data = data.cuda()

  with torch.no_grad():
      Mconv7_stage6_L1, Mconv7_stage6_L2 = self.model(data)

Do you have any idea to do these calculations on GPU? In my application, I crop each person in the frame using YOLO and send each person to this model. Can you give me any hint on how to speed up this little more.

HW140701 commented 3 years ago

@Hzzone In the body.py there are lots of calculations after using the model. These calculations take lots of time.

data = torch.from_numpy(im).float()
if torch.cuda.is_available():
    data = data.cuda()

with torch.no_grad():
    Mconv7_stage6_L1, Mconv7_stage6_L2 = self.model(data)

Do you have any idea to do these calculations on GPU? In my application, I crop each person in the frame using YOLO and send each person to this model. Can you give me any hint on how to speed up this little more.

Alphapose maybe faster ? It gets 20 FPS on GTX 1080Ti.

RisithPerera commented 3 years ago

@HW140701 Is there a PyTorch implementation of Alphapose?

HW140701 commented 3 years ago

@HW140701 Is there a PyTorch implementation of Alphapose?

maybe you can see https://github.com/MVIG-SJTU/AlphaPose

notsong commented 2 years ago

@Hzzone In the body.py there are lots of calculations after using the model. These calculations take lots of time.

data = torch.from_numpy(im).float()
if torch.cuda.is_available():
    data = data.cuda()

with torch.no_grad():
    Mconv7_stage6_L1, Mconv7_stage6_L2 = self.model(data)

Do you have any idea to do these calculations on GPU? In my application, I crop each person in the frame using YOLO and send each person to this model. Can you give me any hint on how to speed up this little more.

Hello, has your problem been solved?