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

Excuse me, where can i find the "pretrained_models/flownet.pt" ? In demo.ipynb #23

Closed
little-misfit opened this issue Nov 25, 2021 · 5 comments

Comments

@little-misfit
Copy link

i can find the other three weights, but i can't find the "flownet.pt". I also go to the github of GFLA, there is no flownet.pt.
So can you tell me where/how can i get this weights?
thanks

@cuiaiyu
Copy link
Owner

cuiaiyu commented Nov 25, 2021

Hi, for demo, please put latest_net_Flow.pth for opt.flownet_path (or you can specify opt.flownet_path='' as well, because it will load the saved checkpoints later anyway.)

For training, please put the pre-trained flownet for opt.flownet_path. If you don't want to train the flownet by yourself, you can also extract the flownet weight from GFLA by:

  1. Download weights of Pose-Guided Person Image Generation (the weights trained on fashion dataset.)
  2. Then extract the flownet weights from the latest_net_G.pth (the weight of the full GFLA model) by something like
import torch
weights = torch.load("latest_net_G.pth")
flownet_weights = {w.replace("flow_net.",""): weights[w] for w in weights if w.startswith("flow_net")}
torch.save(flownet_weights, "flownet.pth")

Note GFLA is trained on 256x256 images.

@little-misfit
Copy link
Author

Thanks for your answer o( ̄▽ ̄)ブ

@XuJ1E
Copy link

XuJ1E commented Apr 5, 2022

Thanks for your answer, and I also can't find the flownet.opt file, so if there is the url for flownet.opt will be better

@XuJ1E
Copy link

XuJ1E commented Apr 5, 2022

Thanks for your answer, and I also can't find the flownet.opt file, so if there is the url for flownet.opt will be better

There is no need to replay my question, and I have already got it, and also thank you very much about your idea

@Rakibuz
Copy link

Rakibuz commented May 29, 2022

First of all, there was a issue regarding "flownet.pt" not fund, I resolved it by using opt.flownet_path='' but unfortunately now this issue arrised. What can I do ?

load vgg ckpt from torchvision dict.
[init] init pre-trained model vgg.
initialize network with orthogonal
initialize network with orthogonal
initialize network with kaiming
initialize network with orthogonal
[init] frozen net netVGG.
[init] frozen net netFlow.
[init] frozen net netE_attr.
[init] frozen net netE_attr.
not exsits checkpoints/DIOR_64/latest_net_E_attr.pth
not exsits checkpoints/DIOR_64/latest_net_G.pth
not exsits checkpoints/DIOR_64/latest_net_VGG.pth
not exsits checkpoints/DIOR_64/latest_net_Flow.pth
---------- Networks initialized -------------
[Network E_attr] Total number of parameters : 1.191 M
[Network G] Total number of parameters : 16.501 M
[Network VGG] Total number of parameters : 0.113 M
[Network Flow] Total number of parameters : 6.608 M



FileNotFoundError Traceback (most recent call last)
in ()
30 # create model
31 model = DIORModel(opt)
---> 32 model.setup(opt)

1 frames
/content/drive/MyDrive/Virtual Fitting Room/dressing-in-order-main/models/base_model.py in _init_tensorboard(self, opt)
146 if os.path.exists(self.tb_dir):
147 shutil.rmtree(self.tb_dir)
--> 148 os.mkdir(self.tb_dir)
149 self.image_dir = os.path.join(self.tb_dir, "images")
150 os.makedirs(self.image_dir, exist_ok=True)

FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/DIOR_64/test'

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

No branches or pull requests

4 participants