You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, how can I make data_latents/men.npy? Can I just get all the men images and extract features like the code below?
image_data = natsorted(glob.glob(args.path))
with torch.no_grad():
for i in range(len(image_data)):
if i == 0:
i_x = preprocess(Image.open(image_data[i])).unsqueeze(0).to(device)
image_features_pred = model.encode_image(i_x)
else:
i_x = preprocess(Image.open(image_data[i])).unsqueeze(0).to(device)
image_features_pred = torch.cat((image_features_pred, model.encode_image(i_x)),dim = 0)
Thanks,
The text was updated successfully, but these errors were encountered:
Hi, I have a question. It would be really helpful if you answer me.
I am wondering how to make the
*.npy
s indata_latents
andlatents_
folders.For example, If I want to make
latents_/beard_glass.npy
anddata_latents/men.npy
for edit_type 'beard', what should I save?Is the normalized
B
in https://github.com/RameenAbdal/CLIP2StyleGAN/blob/main/optimize_dir.py#L85 can belatents_/beard_glass.npy
?Also, how can I make
data_latents/men.npy
? Can I just get all the men images and extract features like the code below?Thanks,
The text was updated successfully, but these errors were encountered: