Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

how to remove the background??? #38

@kaisark

Description

@kaisark

Thanks. I was able to install and run the pre-trained model.

Question: (how to)
Is there a way to remove the background (bg=black) and only show the key point detections (skeletons)? I know the original openpose had a flag that controlled this feature. I will take a look at pose_detector.py draw_person_pose function...

Update: 1/13
One Solution was to modify the video capture image after pose detector was called:
https://pastebin.com/CC2dV6MS

    person_pose_array, _ = pose_detector(img)
    img = np.zeros(img.shape) #kkhatak - line of code added to make background black ###
    res_img = draw_person_pose(img, person_pose_array)
    res_img = cv2.addWeighted(img, 0.6, draw_person_pose(img, person_pose_array), 0.4, 0)
    output_movie.write(np.uint8(res_img)) #kkhatak

blackpink gif-downsized_large

pose-bp-computervision poseestimation gif-downsized_large

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions