AMEERAZAM08 / ConsistentID

Customized ID Consistent for human

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConsistentID : Portrait Generation with Multimodal Fine-Grained Identity Preserving Paper page

[📄Paper]   [🚩Project Page]   [🖼Gradio Demo]

🌠 Key Features:

  1. Portrait generation with extremely high ID fidelity, without sacrificing diversity, text controllability.
  2. Introducing FaceParsing and FaceID information into the Diffusion model.
  3. Rapid customization within seconds, with no additional LoRA training.
  4. Can serve as an Adapter to collaborate with other Base Models alongside LoRA modules in community.

🔥 Examples

🏷️Abstract

This is a work in the field of AIGC that introduces FaceParsing information and FaceID information into the Diffusion model. Previous work mainly focused on overall ID preservation, even though fine-grained ID preservation models such as InstantID have recently been proposed, the injection of facial ID features will be fixed. In order to achieve more flexible consistency maintenance of fine-grained IDs for facial features, a batch of 50000 multimodal fine-grained ID datasets were reconstructed for training the proposed FacialEncoder model, which can support common functions such as personalized photos, gender/age changes, and identity confusion.

At the same time, we have defined a unified measurement benchmark FGIS for Fine Grained Identity Preservice, covering several common facial personalized character scenes and characters, and constructed a fine-grained ID preservation model baseline.

Finally, a large number of experiments were conducted in this article, and ConsistentID achieved the effect of SOTA in facial personalization task processing. It was verified that ConsistentID can improve ID consistency and even modify facial features by selecting finer grained prompts, which opens up a direction for future research on Fine Grained in facial personalization.

🔧Requirements

To install requirements:

pip3 install -r requirements.txt

📦️Data Preparation

Prepare Data in the following format

├── data
|   ├── JSON_all.json 
|   ├── resize_IMG # Imgaes 
|   ├── all_faceID  # FaceID
|   └── parsing_mask_IMG # Parsing Mask 

The .json file should be like

[
    {
        "resize_IMG": "Path to resized image...",
        "parsing_color_IMG": "...",
        "parsing_mask_IMG": "...",
        "vqa_llva": "...",
        "id_embed_file_resize": "...",
        "vqa_llva_more_face_detail": "..."
    },
    ...
]

🚀Train

Ensure that the workspace is the root directory of the project.

bash train_bash.sh

🧪Infer

Ensure that the workspace is the root directory of the project.

python infer.py

⏬Model weights

We will upload pretrained weights as soon as possialbe. Feel free to check our model structure for now.

About

Customized ID Consistent for human


Languages

Language:Python 99.6%Language:Shell 0.4%