tiny-smart / in-context-matting

42 stars 1 forks source link

two errors when performing evaluation #4

Closed pinderpeng closed 4 months ago

pinderpeng commented 4 months ago

Hello, dear author. There are two errors as follows when performing evaluation: (1) Missing Keys missing keys: ['feature_extractor.prompt_embeds', 'feature_extractor.dift_sd.vae.encoder.conv_in.weight', ...

(2) Missing Trimap The provided dataset does not include trimaps.

trimap = cv2.imread(trimap_path, 0).astype(np.float32) AttributeError: 'NoneType' object has no attribute 'astype'

BRONYA-818 commented 4 months ago

Hey bro, I had the same problem. Waiting for a solution QAQ

guohe369 commented 4 months ago

Hello,

Sorry for the wait. Here are the explanations and solutions for the issues you encountered:

  1. Missing Keys: The missing keys you see, such as 'feature_extractor.prompt_embeds', 'feature_extractor.dift_sd.vae.encoder.conv_in.weight', and others, are default conditional inputs and parameters of the Stable Diffusion 2-1 model. Our provided checkpoint does not include these parameters, which is expected. There is no need to worry about these keys.

  2. Missing Trimap:

    • The trimap is used to assist in calculating metrics for unknown areas but is not essential.
    • We have supplemented the dataset with versions that include trimaps. You can find the updated dataset at this link.
    • Additionally, we will remove the dependency on trimaps in our code to prevent such issues in the future.