TachibanaYoshino / AnimeGANv2

[Open Source]. The improved version of AnimeGAN. Landscape photos/videos to anime
5.06k stars 709 forks source link

refusing some images, but some not. #40

Open HerXayah opened 2 years ago

HerXayah commented 2 years ago

Everytime i try to use Step 4 e.g python train.py --dataset lilly --epoch 101 --init_epoch 10 i get to the point of generating them etc but it always fails on the checkpoint. I could not find how to generate one. heres my log: https://www.toptal.com/developers/hastebin/raw/udidakecec

I would like to add there is nothing saved in the folder i specified nor anywhere else like you said in #36 on the last comment.

TachibanaYoshino commented 2 years ago

image I think this runtime error has nothing to do with checkpoints. The model will automatically save the checkpoints only after each epoch is completed. Your error here appears in the process of data loading. Please check whether your data is missing, such as whether the style_smooth data exists.

HerXayah commented 2 years ago

image They both exist and are popupated. The files itself are jpgs in both.

HerXayah commented 2 years ago

Ok so Update. It seems like it doesnt like .jpeg. it only takes .jpg although the twitter downloader i used gave me .jpeg. weird. Wouldnt it be easier to convert every image to png or jpg, regardless of what extension they had?

EDIT: So sometimes it straight up refuses images. I converted the tenet trailer into png`s, then ran them over the edge smooth and same error.

EDIT2: Now its just straight up not liking .jpg file too. Ill send you the images im trying with here. Theyre converted from mp4 through ffmpeg via ffmpeg -i input.mp4 -vf fps=5 style/elon%06d.jpg https://drive.google.com/file/d/11nOdlG27C7Z-nwn-SuJsZ2n5o_BwnizY/view?usp=sharing

TachibanaYoshino commented 2 years ago

https://github.com/TachibanaYoshino/AnimeGANv2/blob/e8d48c49e6f46a27ba6801756578ccec76d312b1/tools/data_loader.py#L19 You can see through this code that it supports jpg and jpeg. I don't know how your data is placed. If it is convenient, I can remotely control and check your code and data through teamViewer, and send me the teamViewer account and password via email.

HerXayah commented 2 years ago

https://github.com/TachibanaYoshino/AnimeGANv2/blob/e8d48c49e6f46a27ba6801756578ccec76d312b1/tools/data_loader.py#L19

You can see through this code that it supports jpg and jpeg. I don't know how your data is placed. If it is convenient, I can remotely control and check your code and data through teamViewer, and send me the teamViewer account and password via email.

We can do that sure. Im just git cloning this repo though as far as code goes. using a conda env with python 3.6 with my installed packages here A friend of mine also suggested that its my dataset that is wrong. Yesterday i tried to make a new dataset using only images i got from reddit via rightclick -> download. image Here you can see my dataset,. which in theory, should have worked. Also is there a way to direct message on Github or something for the teamviewer id :D

TachibanaYoshino commented 2 years ago

I think it is very likely that the ImageGenerator class did not read the path of your image, or the path is set incorrectly somewhere.

HerXayah commented 2 years ago

I think it is very likely that the ImageGenerator class did not read the path of your image, or the path is set incorrectly somewhere.

Why does it work with some of them and when i add more it doesnt? Thats whats confusing me the most

TachibanaYoshino commented 2 years ago

I think it is very likely that the ImageGenerator class did not read the path of your image, or the path is set incorrectly somewhere.

Why does it work with some of them and when i add more it doesnt? Thats whats confusing me the most

That's so sad. I don't know your specific situation.

HerXayah commented 2 years ago

I can try and Zip one where it works and then add stuff until it not works and make a seperate folder. Im not using a different version from the one thats in here so we should we able to find out whats the cause in this way

HerXayah commented 2 years ago

It seems i found something. If your smooth directory has more than 10 files it refuses to work. (in this case atleast? i had more files once i think) Ive included a Zip with showcase below. i tried with the last image in the file list and the first one and it always worked, but the moment i add more file so its 11 files, it will stop working and error me https://drive.google.com/file/d/11nOdlG27C7Z-nwn-SuJsZ2n5o_BwnizY/view?usp=sharing

HerXayah commented 2 years ago

any update?

HerXayah commented 2 years ago

any idea?

zobnechopin commented 2 years ago

any idea?

@PrincessAkira @TachibanaYoshino

I found something interesting about this and run the training process successful.For the training process, you need prepare three part dataset: style, smooth and real ,the error shows checkout point error, but indeed the actually error is real data not load. So, the solution is download the whole dataset on Github and put test, read data under your train dataset dir. But after this I meet another error that shows anime dataset 'tuple out of index', I checked all my dataset and source code, and I found nothing...But, after I checked dataset, it works.

HerXayah commented 2 years ago

any idea?

@PrincessAkira @TachibanaYoshino

I found something interesting about this and run the training process successful.For the training process, you need prepare three part dataset: style, smooth and real ,the error shows checkout point error, but indeed the actually error is real data not load. So, the solution is download the whole dataset on Github and put test, read data under your train dataset dir. But after this I meet another error that shows anime dataset 'tuple out of index', I checked all my dataset and source code, and I found nothing...But, after I checked dataset, it works.

I can try that later today! thanks