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

Poor Results #16

Open
k128 opened this issue Sep 27, 2022 · 11 comments
Open

Poor Results #16

k128 opened this issue Sep 27, 2022 · 11 comments

Comments

@k128
Copy link

k128 commented Sep 27, 2022

I'm getting poor results running the pretrained model. For example, with both id and attr as:
id_0
I get a prediction of:
prediction_0

I'm running:
python test.py Name --pretrained_models_path checkpoints --id_dir "testinput" --attr_dir "testtarget" --output_dir "results" --test_func infer_on_dirs
The only change I made to the code was stylegan.py:121, where I changed "_convolution_op" to "convolution_op" since it seems Keras updated the function name.

Additional info:
OS - Windows 11
conda list:
Name Version Build Channel
absl-py 1.2.0 pypi_0 pypi
astunparse 1.6.3 pypi_0 pypi
bzip2 1.0.8 he774522_0
ca-certificates 2022.07.19 haa95532_0
cachetools 5.2.0 pypi_0 pypi
certifi 2022.9.14 py37haa95532_0
charset-normalizer 2.1.1 pypi_0 pypi
cmake 3.22.1 h9ad04ae_0
colorama 0.4.5 pypi_0 pypi
cudatoolkit 11.2.2 h933977f_10 conda-forge
cudnn 8.1.0.77 h3e0f4f4_0 conda-forge
cycler 0.11.0 pypi_0 pypi
dlib 19.24.0 pypi_0 pypi
flatbuffers 2.0.7 pypi_0 pypi
fonttools 4.37.3 pypi_0 pypi
gast 0.4.0 pypi_0 pypi
google-auth 2.11.1 pypi_0 pypi
google-auth-oauthlib 0.4.6 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.48.1 pypi_0 pypi
h5py 3.7.0 pypi_0 pypi
idna 3.4 pypi_0 pypi
imageio 2.22.0 pypi_0 pypi
importlib-metadata 4.12.0 pypi_0 pypi
keras 2.10.0 pypi_0 pypi
keras-preprocessing 1.1.2 pypi_0 pypi
kiwisolver 1.4.4 pypi_0 pypi
libclang 14.0.6 pypi_0 pypi
libuv 1.40.0 he774522_0
lz4-c 1.9.3 h2bbff1b_1
markdown 3.4.1 pypi_0 pypi
markupsafe 2.1.1 pypi_0 pypi
matplotlib 3.5.3 pypi_0 pypi
mtcnn 0.1.1 pypi_0 pypi
networkx 2.6.3 pypi_0 pypi
numpy 1.21.6 pypi_0 pypi
oauthlib 3.2.1 pypi_0 pypi
opencv-python 4.6.0.66 pypi_0 pypi
openssl 1.1.1q h2bbff1b_0
opt-einsum 3.3.0 pypi_0 pypi
packaging 21.3 pypi_0 pypi
pillow 9.2.0 pypi_0 pypi
pip 22.1.2 py37haa95532_0
protobuf 3.19.5 pypi_0 pypi
pyasn1 0.4.8 pypi_0 pypi
pyasn1-modules 0.2.8 pypi_0 pypi
pyparsing 3.0.9 pypi_0 pypi
python 3.7.13 h6244533_0
python-dateutil 2.8.2 pypi_0 pypi
pywavelets 1.3.0 pypi_0 pypi
requests 2.28.1 pypi_0 pypi
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
scikit-image 0.19.3 pypi_0 pypi
scipy 1.7.3 pypi_0 pypi
setuptools 63.4.1 py37haa95532_0
six 1.16.0 pypi_0 pypi
sqlite 3.39.2 h2bbff1b_0
tensorboard 2.10.0 pypi_0 pypi
tensorboard-data-server 0.6.1 pypi_0 pypi
tensorboard-plugin-wit 1.8.1 pypi_0 pypi
tensorflow 2.10.0 pypi_0 pypi
tensorflow-addons 0.18.0 pypi_0 pypi
tensorflow-estimator 2.10.0 pypi_0 pypi
tensorflow-io-gcs-filesystem 0.27.0 pypi_0 pypi
termcolor 2.0.1 pypi_0 pypi
tifffile 2021.11.2 pypi_0 pypi
tqdm 4.64.1 pypi_0 pypi
typeguard 2.13.3 pypi_0 pypi
typing-extensions 4.3.0 pypi_0 pypi
urllib3 1.26.12 pypi_0 pypi
vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
werkzeug 2.2.2 pypi_0 pypi
wheel 0.37.1 pyhd3eb1b0_0
wincertstore 0.2 py37haa95532_2
wrapt 1.14.1 pypi_0 pypi
xz 5.2.5 h8cc25b3_1
zipp 3.8.1 pypi_0 pypi
zlib 1.2.12 h8cc25b3_3
zstd 1.5.2 h19a0ad4_0

@gltanaka
Copy link

I am just getting noise:
prediction_0

I think something is wrong with the h5 files

@arbelhizmi
Copy link

Iv'e got bad results as well. there is any update on this issue?
prediction_0

@YotamNitzan
Copy link
Owner

I suspect the issue is with the environment. Specifically, I see that @k128 is using Tensorflow version 2.10 while I was using 2.0.
Can you try setting up your environment using our environment.yml file and let me know if the issue persists?

@k128
Copy link
Author

k128 commented Jan 1, 2023

I suspect the issue is with the environment. Specifically, I see that @k128 is using Tensorflow version 2.10 while I was using 2.0. Can you try setting up your environment using our environment.yml file and let me know if the issue persists?

When I run "conda create -n environment.yml", it creates a blank environment named "environment.yml". I'm guessing the setup instructions should instead say something like "conda env create --file environment.yml'. However, when I run this, I get the message below, so I'm unable to replicate your environment for testing.

Error message:
Solving environment: failed

ResolvePackageNotFound:

  • libtiff==4.1.0=h4f3a223_6
  • libstdcxx-ng==9.1.0=hdf63c60_0
  • libgcc-ng==9.1.0=hdf63c60_0
  • pywavelets==1.1.1=py37h161383b_3
  • cffi==1.14.3=py37h261ae71_2
  • giflib==5.2.1=h36c2ea0_2
  • lz4-c==1.9.2=he1b5a44_3
  • readline==8.0=h7b6447c_0
  • libedit==3.1.20191231=h14c3975_1
  • libzopfli==1.0.3=he1b5a44_0
  • zstd==1.4.5=h6597ccf_2
  • tensorflow-base==2.0.0=gpu_py37h0ec5d1f_0
  • ld_impl_linux-64==2.33.1=h53a641e_7
  • six==1.15.0=py37h06a4308_0
  • blosc==1.20.1=he1b5a44_0
  • freetype==2.10.4=h7ca028e_0
  • openssl==1.1.1h=h516909a_0
  • ca-certificates==2020.11.8=ha878542_0
  • kiwisolver==1.3.1=py37hc928c03_0
  • multidict==4.7.6=py37h7b6447c_1
  • libwebp-base==1.1.0=h36c2ea0_3
  • grpcio==1.31.0=py37hf8bcb03_0
  • brotlipy==0.7.0=py37h27cfd23_1003
  • chardet==3.0.4=py37h06a4308_1003
  • c-ares==1.17.1=h27cfd23_0
  • yarl==1.6.2=py37h7b6447c_0
  • libpng==1.6.37=h21135ba_2
  • numpy==1.19.2=py37h54aff64_0
  • mkl-service==2.3.0=py37he904b0f_0
  • libffi==3.3=he6710b0_2
  • jpeg==9d=h36c2ea0_0
  • jxrlib==1.1=h516909a_2
  • snappy==1.1.8=he1b5a44_3
  • matplotlib-base==3.3.3=py37h4f6019d_0
  • sqlite==3.33.0=h62c20be_0
  • imagecodecs==2020.5.30=py37hda6ee5b_1
  • setuptools==50.3.1=py37h06a4308_1
  • zlib==1.2.11=h7b6447c_3
  • lcms2==2.11=hcbb858e_1
  • hdf5==1.10.6=hb1b8bf9_0
  • cryptography==3.2.1=py37h3c74f83_1
  • tensorflow==2.0.0=gpu_py37h768510d_0
  • numpy-base==1.19.2=py37hfa32c7d_0
  • tornado==6.1=py37h4abf009_0
  • charls==2.1.0=he1b5a44_2
  • brotli==1.0.9=he1b5a44_3
  • pillow==8.0.1=py37h63a5d19_0
  • scikit-image==0.17.2=py37h10a2094_4
  • wrapt==1.12.1=py37h7b6447c_1
  • scipy==1.5.2=py37h0b6359f_0
  • certifi==2020.11.8=py37h89c1867_0
  • cupti==10.0.130=0
  • aiohttp==3.6.3=py37h7b6447c_0
  • cytoolz==0.11.0=py37h8f50634_1
  • tk==8.6.10=hbc83047_0
  • protobuf==3.13.0.1=py37he6710b0_1
  • libprotobuf==3.13.0.1=hd408876_0
  • libaec==1.0.4=he1b5a44_1
  • markdown==3.3.3=py37h06a4308_0
  • ncurses==6.2=he6710b0_1
  • mkl_random==1.1.1=py37h0573a6f_0
  • absl-py==0.11.0=py37h06a4308_0
  • mkl_fft==1.2.0=py37h23d657b_0
  • h5py==2.10.0=py37hd6299e0_1
  • bzip2==1.0.8=h516909a_3
  • python==3.7.9=h7579374_0
  • yaml==0.2.5=h516909a_0
  • xz==5.2.5=h7b6447c_0
  • pip==20.2.4=py37h06a4308_0
  • libgfortran-ng==7.3.0=hdf63c60_0
  • openjpeg==2.3.1=h981e76c_3

@k128
Copy link
Author

k128 commented Feb 19, 2023

As an update, I tried this on a newer computer and got different, but similarly poor results. I've attempted to get as close to the environment as possible, but tensorflow-addons 0.6.0 is no longer available. It's a strange problem, since usually different package versions simply throw an error. I'm curious whether it still works for you with a newer version of tensorflow.

@pranurs
Copy link

pranurs commented Apr 14, 2023

I am just getting noise: prediction_0

I think something is wrong with the h5 files

I am also getting noise. Did anyone figure out the problem? I am using the environment provided and my TensorFlow version is 2.0.0. Is there something wrong with the h5 files?

@jinchiniao
Copy link

jinchiniao commented Nov 1, 2023

same promblem, results are all noise. And the inference speed of the model is quite slow.

@jinchiniao
Copy link

same promblem, results are all noise. And the inference speed of the model is quite slow.

I discovered that my issue is related to the graphics card model. The 3090 has specific requirements for the CUDA version (CUDA 11 and above), which makes it incompatible with the environment provided by the repository. Using a lower-end graphics card or a previous generation card can resolve this issue. Alternatively, upgrading the CUDA version might also solve the problem.

@pranurs
Copy link

pranurs commented Nov 13, 2023

same promblem, results are all noise. And the inference speed of the model is quite slow.

I discovered that my issue is related to the graphics card model. The 3090 has specific requirements for the CUDA version (CUDA 11 and above), which makes it incompatible with the environment provided by the repository. Using a lower-end graphics card or a previous generation card can resolve this issue. Alternatively, upgrading the CUDA version might also solve the problem.

What is the CUDA version you used @jinchiniao ?

@jinchiniao
Copy link

CUDA10.1 can successfully run this repo

@jadechip
Copy link

jadechip commented Aug 7, 2024

I tested on 3090 and A6000 chips, and unfortunately I am also getting the noisy images. My guess is that the checkpoints were made using past generation chips and are incompatible with the later generation chips. To make it work it would probably require training from scratch on a newer chip :/

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

7 participants