ercwang

ercwang

Use InsightFaceSwap combined with Midjourney to create avatar face swaps.

Disclaimer and official original text, for personal entertainment use only

Normally, Midjourney is suitable for creating conceptual images, but it is difficult to use it to create personalized avatars. Even if you use placeholder images, it still doesn't look like the real person. Now, with the Insight Face library, you can recognize faces in images and replace them with your own face.

image

What is Insight Face#

InsightFace is an open-source 2D&3D deep face analysis library. InsightFace effectively implements a variety of state-of-the-art face recognition, face detection, and face alignment algorithms. Simply put, it recognizes faces in images and extracts them for modeling purposes.
Therefore, by using Insight Face, you can perform face swapping on images, not limited to images generated by Midjourney. Any image with a face can be used. However, Midjourney is currently popular due to its good image generation results.

User Guide#

  1. First, you need to have a Midjourney account and add the Midjourney bot to your server. There is a lot of information available online, so I won't go into detail about this step.

  2. Invite the InsightFaceSwap Bot to your server.
    image
    image

  3. Enter the command /saveid test (this means giving InsightFace the face to be swapped, so it can analyze and model it, and generate an ID. "test" is the name of this ID, which can be any 8-letter combination). After successful saving, the newly created ID name will be automatically set as the default ID. (You can manually specify the default ID using the command /setid idname(s)).
    😅 Here, I used the characters from the game "Jerusalem, Tifa" for an experiment.
    image

image

  1. Next, chant the Midjourney spell.

image

  1. After the enlargement is complete, use the INSwapper menu button for quick generation. Right-click on the photo and select the menu Apps-INSwapper.

image

  1. Then you will receive the converted result.

image

  1. Zoom in to compare the details. The facial features are basically restored, but the original image has a rounder face shape, which is different here. So when swapping faces, it is recommended to choose images with similar face shapes.

image
image

InsightFace Command List#

Finally, here is a list of slash commands currently supported by the InsightFaceSwap bot:

/saveid name upload-image
Used to upload a photo and register the ID features.

/setid name(s)
Sets the default source ID name for subsequent INSwapper menu generation.

/listid
Lists all registered ID names.

/delid name
Deletes a specific ID name.

/delall
Deletes all IDs.

/swapid name(s) upload-image
Replaces the uploaded photo with the specified ID name (or list of names).

INSwapper context menu (Recommended)
This is a menu button used to replace the specified photo with the default ID.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.