willylulu / celeba-hq-modified Goto Github PK
View Code? Open in Web Editor NEWModified h5tool.py make user getting celeba-HQ easier
License: MIT License
Modified h5tool.py make user getting celeba-HQ easier
License: MIT License
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!
Hi, thanks for your work, i wonder what is the delta files for?
and have you get 1024x1024 images using h5tool.py?
Is there a reason that you are excluding the first 7382 items?
Line 608 in 48d26c2
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
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:
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.