Comments (4)
Thanks! I ran a variation of the code from the link you posted (pasted below) and it didn't detect any corrupt images. I'll look into this a bit more tomorrow and update you if I work out the cause.
from PIL import Image
from pathlib import Path
for p in Path(f'./images').glob('*.jpg'):
try:
im = Image.open(p)
im2 = im.convert('RGB')
except OSError:
print("Cannot load : {}".format(p))
from stylegan2-pytorch.
Okay, I think I see what happened here. I was testing the images on my host OS, and it wasn't finding any corruption, but the images I'm training on are inside the docker container, so there must have been a corruption during the docker cp
process. I've started a new container and am up to 49k and no errors. Thanks for your help! This is a lot of fun!
from stylegan2-pytorch.
Okay this time it errored at 5599/90000 with the same error message.
Also, the stylegan2_pytorch --generate
command throws an error for me:
Traceback (most recent call last):
File "/home/user/miniconda/envs/py36/bin/stylegan2_pytorch", line 53, in <module>
fire.Fire(train_from_folder)
File "/home/user/miniconda/envs/py36/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/user/miniconda/envs/py36/lib/python3.6/site-packages/fire/core.py", line 471, in _Fire
target=component.__name__)
File "/home/user/miniconda/envs/py36/lib/python3.6/site-packages/fire/core.py", line 675, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/home/user/miniconda/envs/py36/bin/stylegan2_pytorch", line 31, in train_from_folder
lr = learning_rate
File "/home/user/miniconda/envs/py36/lib/python3.6/site-packages/stylegan2_pytorch/stylegan2_pytorch.py", line 398, in __init__
self.dataset = Dataset(folder, image_size)
File "/home/user/miniconda/envs/py36/lib/python3.6/site-packages/stylegan2_pytorch/stylegan2_pytorch.py", line 115, in __init__
raise Exception(f'no images found at {folder}')
Exception: no images found at ./data
In case it's useful info: The ./models/default
folder contains: model_0.pt
and model_1.pt
, and it looks like the ./results/default
folder contains one N.jpg
image per thousand training images processed (along with N-ema.jpg
and N-me.jpg
).
from stylegan2-pytorch.
Hi Joseph! Thanks for your interest in this project! I've uploaded a fix so that it auto resizes all images in the folder to at least the target size being trained. You can also set image sizes to smaller than 128 with the --image-size
flag. I've also fix the problem with --generate
, it should work now.
I did some googling on your issue with the truncated
error and it seems likely that one of your images may be corrupted, even if it passes the imagemagick tests. https://discuss.pytorch.org/t/oserror-image-file-is-truncated-28-bytes-not-processed-during-learning/36815/21 Could you go through that forum and try some of the suggestions there?
from stylegan2-pytorch.
Related Issues (20)
- Parameters for generating faces HOT 1
- Performance on MNIST
- Out of memory after exactly 5024 iterations? HOT 1
- Web application for generating content while reloading.
- Tesla V100 GPU - 2600 Image - Too Slow Training HOT 1
- Uneven GPU utilization.
- Trainning on images with one (single) channel HOT 1
- Bug: random_hflip function HOT 1
- where can i download train data?
- Bug: gradient_accumulate_contexts function HOT 1
- Generate full resolution images 1024x1024 HOT 1
- generate all seeds of latent space
- ability to calculate Perpectual Path Length (PPL)? HOT 1
- Save Interval Flag
- /torch_utils/custom_ops.py - _find_compiler_bindir: incorrect Visual Studio Path
- Inconsistent evaluation of self.av HOT 2
- How to Train on a Single Image
- Examples on save_every and evaluate_every in README section needed.
- 3D adaptation for medical imaging HOT 1
- Training on t4 gpu HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylegan2-pytorch.