NVIDIA / vid2vid

Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.
Other
8.62k stars 1.2k forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/label2city_single/latest_net_G_1024.pth' #99

Open SimonsLiu opened 5 years ago

SimonsLiu commented 5 years ago

Hi

Sorry to disturb you.

When I wanted to test the model that the author had trained beforehand, it was a single GPU training model, but the program was wrong.

FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/label2city_single/latest_net_G_1024.pth'

I placed the file according to repo. I don't think it's a code error. It's probably a folder error. but after checking the source code of the corresponding location according to the error, I still can't find the problem.

I really need your help. Thank you very much.

echokk11 commented 4 years ago
---------- Networks initialized -------------
-----------------------------------------------
Traceback (most recent call last):
  File "test.py", line 25, in <module>
    model = create_model(opt)
  File "/data/vid2vid/models/models.py", line 76, in create_model
    modelG.initialize(opt)
  File "/data/vid2vid/models/vid2vid_model_G.py", line 53, in initialize
    self.netG_i = self.load_single_G() if self.use_single_G else None
  File "/data/vid2vid/models/vid2vid_model_G.py", line 287, in load_single_G
    netG.load_state_dict(torch.load(load_path))
  File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/serialization.py", line 419, in load
    f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/label2city_single/latest_net_G_1024.pth'

I got the same error

echokk11 commented 4 years ago

when testing the faces

---------- Networks initialized -------------
-----------------------------------------------
./checkpoints/edge2face_256_g1/latest_net_G0.pth not exists yet!
Traceback (most recent call last):
  File "test.py", line 25, in <module>
    model = create_model(opt)
  File "/data/vid2vid/models/models.py", line 76, in create_model
    modelG.initialize(opt)
  File "/data/vid2vid/models/vid2vid_model_G.py", line 51, in initialize
    self.load_network(getattr(self, 'netG'+str(s)), 'G'+str(s), opt.which_epoch, opt.load_pretrain)
  File "/data/vid2vid/models/base_model.py", line 72, in load_network
    raise('Generator must exist!')
TypeError: exceptions must derive from BaseException
thrfdth commented 4 years ago

probably the trained model wasn't saved in the folder. I changed the folder name for trained model and worked fine. add the checkpoints option specifying other folder name python train.py --name pose --dataset_mode fewshot_pose --adaptive_spade --warp_ref --spade_combine --remove_face_labels --add_face_D --niter_single 100 --niter 200 --batchSize 2 --checkpoints_dir './YOUR_FOLDER_NAME'

if that doesn't work yet, manually create the folder including subfolders and run the code above again.

BeahIF commented 3 years ago

Hello, I create the folder manually but I don't know why itsn't create a latest_net_G_512.pth, do you know where I found it ?

SimonsLiu commented 3 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

you have to download “latest_net_G_512.pth ”from the google drive. all of the pre-trained model you can find from the google drive

                            Shihao Liu

                                ***@***.***

    签名由
    网易邮箱大师
    定制

On 4/6/2021 ***@***.***> wrote: 

Hello, I create the folder manually but I don't know why itsn't create a latest_net_G_512.pth, do you know where I found it ?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

BeahIF commented 3 years ago

Hello! Thanks for answer! Where is this drive?

Em ter., 6 de abr. de 2021 às 03:14, Shihao Liu @.***> escreveu:

font{ line-height: 1.6; } ul,ol{ padding-left: 20px; list-style-position: inside; }

you have to download “latest_net_G_512.pth ”from the google drive. all of the pre-trained model you can find from the google drive

Shihao Liu

@.***

签名由 网易邮箱大师 定制

On 4/6/2021 @.***> wrote:

Hello, I create the folder manually but I don't know why itsn't create a latest_net_G_512.pth, do you know where I found it ?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NVIDIA/vid2vid/issues/99#issuecomment-813853254, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIH7OZBEIKVIXHSIL2EDCTTHKRF5ANCNFSM4G3PRLIQ .

SimonsLiu commented 3 years ago

you need read README.txt carefully! In the Testing period, you can find how to download the pre-trained model the python-file download the pre-trained model, you can find some detail in the code

------------------ 原始邮件 ------------------ 发件人: "NVIDIA/vid2vid" @.>; 发送时间: 2021年4月6日(星期二) 晚上8:21 @.>; @.**@.>; 主题: Re: [NVIDIA/vid2vid] FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/label2city_single/latest_net_G_1024.pth' (#99)

Hello! Thanks for answer! Where is this drive?

Em ter., 6 de abr. de 2021 às 03:14, Shihao Liu @.***> escreveu:

> > > > > > > font{ > line-height: 1.6; > } > ul,ol{ > padding-left: 20px; > list-style-position: inside; > } > > > > you have to download “latest_net_G_512.pth ”from the google drive. all of > the pre-trained model you can find from the google drive > > > > > > > > > > > > > > > > > > Shihao Liu > > > > > @. > > > > > > > > > 签名由 > 网易邮箱大师 > 定制 > > > > On 4/6/2021 @.> wrote: > > > > Hello, I create the folder manually but I don't know why itsn't create a > latest_net_G_512.pth, do you know where I found it ? > > —You are receiving this because you authored the thread.Reply to this > email directly, view it on GitHub, or unsubscribe. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/NVIDIA/vid2vid/issues/99#issuecomment-813853254&gt;, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/ADIH7OZBEIKVIXHSIL2EDCTTHKRF5ANCNFSM4G3PRLIQ&gt; > . >

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

pfeducode commented 2 years ago

latest_net_G0.pth

hello, I executed the script download_models.py, but it doesn't work,can you give me a right google driver address?

pfeducode commented 2 years ago

the right google dirver address is following: https://docs.google.com/uc?export=download&id=10LvNw-2lrh-6sPGkWbQDfHspkqz5AKxb

Davicla85 commented 9 months ago

la dirección correcta del directorio de Google es la siguiente: https://docs.google.com/uc?export=download&id=10LvNw-2lrh-6sPGkWbQDfHspkqz5AKxb

y como la agrego bro a la carpeta soy nuevo en esto pero busco la forma de solucionar las cosas