Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Awesome Face Operation: Oil Painting effect Makeover #1640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Inferno2211
Copy link
Contributor

Proposed Changes

  • Added 4 files

Additional Info

  • This filter involves detecting the person, and applying an Oil Painting Effect on the face

  • This is and image processing script that utilizes HaarCascades and Mediapipe's selfie segmentation model.

How it works:

  1. The selfie segmentation model is loaded from Mediapipe.

  2. HaarCascades from opencv are loaded

  3. Image is loaded from the directory

  4. The frame size is obtained, and the background image is loaded.

  5. The the image is processed:

    a. The segmentation mask is extracted using selfie segmentation.

    b. A condition mask is created based on the threshold value.

    c. The Oil painting effect is applied across the original image

    d. The condition mask is used to merge the background of the original
    image and the face from the oil effect.

  6. The final result (output_image) is converted back to RGB and saved as "oil_effect.png".

Screenshots

oil_effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant