Closed little-misfit closed 2 years ago
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:
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.
Thanks for your answer o( ̄▽ ̄)ブ
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
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
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)
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'
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