Coder Social home page Coder Social logo

celeba-hq-modified's People

Contributors

davidstap avatar elvisyjlin avatar willylulu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

celeba-hq-modified's Issues

TypeError: float() argument must be a string or number

I finally got the directory tree into the format the h5tool.py script was expecting. Now when I try to run it, I get the following error:

$ python h5tool.py create_celeba_hq 123456.h5 dirA/ dirB/
Loading CelebA data from dirA/
(202599, 5, 2)
Loading CelebA-HQ deltas from dirB/


Worker thread caught an exception:
Traceback (most recent call last):
  File "h5tool.py", line 97, in run
    result = func(*args)
  File "h5tool.py", line 146, in task_func
    return process_func(prepared)

  File "h5tool.py", line 556, in process_func
    img = np.pad(np.float32(img), ((pad[1], pad[3]), (pad[0], pad[2]), (0, 0)), 'reflect')
TypeError: float() argument must be a string or a number

Traceback (most recent call last):
  File "h5tool.py", line 695, in <module>
    execute_cmdline(sys.argv)
  File "h5tool.py", line 690, in execute_cmdline
    func(**vars(args))
  File "h5tool.py", line 596, in create_celeba_hq
    for orig_fn, aimg64, aimg128, aimg256, aimg512, aimg1024 in pool.process_items_concurrently(fields['idx'], process_func=process_func, max_items_in_flight=num_tasks):
  File "h5tool.py", line 161, in process_items_concurrently
    for res in retire_result(): yield res
  File "h5tool.py", line 149, in retire_result
    processed, (prepared, idx) = self.get_result(task_func)
  File "h5tool.py", line 126, in get_result
    raise result.type, result.value
TypeError: float() argument must be a string or a number

It seems that img object is of type 'JpegImageFile' but I'm not familiar with how Numpy works with those.
My python version is 2.7.15.
Can anyone help me resolve this? Thanks!

what is the delta files for?

Hi, thanks for your work, i wonder what is the delta files for?
and have you get 1024x1024 images using h5tool.py?

Invalid Token Error: cryptography.fernet.InvalidToken

Traceback (most recent call last):
File "h5tool.py", line 706, in
execute_cmdline(sys.argv)
File "h5tool.py", line 701, in execute_cmdline
func(**vars(args))
File "h5tool.py", line 607, in create_celeba_hq
aidx, aimg64, aimg128, aimg256, aimg512, aimg1024 = process_func(x)
File "h5tool.py", line 582, in process_func
delta = np.frombuffer(bz2.decompress(cryptography.fernet.Fernet(key).decrypt(delta_bytes)), dtype=np.uint8).reshape(3, 1024, 1024)
File "/home/ubuntu/miniconda3/envs/CelebAHQ2/lib/python2.7/site-packages/cryptography/fernet.py", line 75, in decrypt
return self._decrypt_data(data, timestamp, ttl)
File "/home/ubuntu/miniconda3/envs/CelebAHQ2/lib/python2.7/site-packages/cryptography/fernet.py", line 119, in _decrypt_data
self._verify_signature(data)
File "/home/ubuntu/miniconda3/envs/CelebAHQ2/lib/python2.7/site-packages/cryptography/fernet.py", line 108, in _verify_signature
raise InvalidToken
cryptography.fernet.InvalidToken

Noise on generated high-resolution images

Hi, I have utilized your code to generate images successfully. But I notice that there are some noisy points on the generated images, as the following images shows. Is this phenomenon normal?
image

Sincerely Request.

Recently i want to genetate some celeba_hq image.but the code lacks detail comments on the part of creat_celeba_hq funtcion. If comments are possible, that must be a gift for me .
Thanks a lot.

Worker thread caught an exception: Error -3 while decompressing: invalid code lengths se

Worker thread caught an exception:
Traceback (most recent call last):
File "h5tool.py", line 97, in run
result = func(*args)
File "h5tool.py", line 146, in task_func
return process_func(prepared)
File "h5tool.py", line 573, in process_func
delta_bytes = zip.read('delta%05d.dat' % idx)
File "/home/disanda/anaconda3/envs/py27/lib/python2.7/zipfile.py", line 958, in read
return self.open(name, "r", pwd).read()
File "/home/disanda/anaconda3/envs/py27/lib/python2.7/zipfile.py", line 653, in read
data = self.read1(n)
File "/home/disanda/anaconda3/envs/py27/lib/python2.7/zipfile.py", line 707, in read1
max(n - len_readbuffer, self.MIN_READ_SIZE)
error: Error -3 while decompressing: invalid code lengths set

Traceback (most recent call last):
File "h5tool.py", line 696, in
execute_cmdline(sys.argv)
File "h5tool.py", line 691, in execute_cmdline
func(**vars(args))
File "h5tool.py", line 597, in create_celeba_hq
for orig_fn, aimg64, aimg128, aimg256, aimg512, aimg1024 in pool.process_items_concurrently(fields['idx'], process_func=process_func, max_items_in_flight=num_tasks):
File "h5tool.py", line 161, in process_items_concurrently
for res in retire_result(): yield res
File "h5tool.py", line 149, in retire_result
processed, (prepared, idx) = self.get_result(task_func)
File "h5tool.py", line 126, in get_result
raise result.type, result.value
zlib.error: Error -3 while decompressing: invalid code lengths set

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.