-
Notifications
You must be signed in to change notification settings - Fork 454
Description
I notice there is no requirement about python version in readme. But actually besides common import of print and absolute import from future, there are still some issues need to be resolved when I try to run the demo in python3. Including:
-
I find relative path doesn't work wherever the directory I'm in. Is this alright in python2, or just because I use it in wrong way?
-
Some string format problem, like
captionindrawCaptionand the pattern insave_super_images. -
dict.iteritem,dict.haskeymethod has been deprecated in python3, insteaddict.itemsandinare used. So some code inconfig.pyneed to be modified. -
the result
torchfile.loadreturns doesn't support access values through fetching attribute, likeeasydict. So I use[]( e.g.t_file[b'raw_txt']) to access values, for a workaround. -
in
drawCaption,fnt = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 50)is used, but I have no clue where the font is, and it doesn't work with any luck. So I use a font in/usr/share/fonts/(Linux). -
xrange, inpreprocess_birds.py.
At last I run the demo successfully, with a lot of temporary workaround, but I would prefer a indication about python version in the README.