simoncozens / atokern

Neural network based font kerning
87 stars 7 forks source link

Doesn't run against latest tensorflow #8

Open behdad opened 1 year ago

behdad commented 1 year ago

I had to do this:

diff --git a/kerncritic b/kerncritic
index 9892895..6f9e8f7 100755
--- a/kerncritic
+++ b/kerncritic
@@ -25,7 +25,7 @@ def download_url(url, output_path):
                              miniters=1, desc=url.split('/')[-1]) as t:
         urllib.request.urlretrieve(url, filename=output_path, reporthook=t.update_to)

-tf.logging.set_verbosity(tf.logging.ERROR)
+tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

 if not os.path.exists("badkerndetector.hdf5"):
   print("Downloading bad kern detection model")

And then downloading http://dealer.simon-cozens.org/~simon/badkerndetector.hdf5 fails.

simoncozens commented 1 year ago

I have that file (badkerndetector.hdf5.gz) but I don't know how much good it will do you. I may need to go back and look at the code which generated the model. It's been a long time since I played with this, and I didn't get very far when I was playing...

behdad commented 1 year ago

Okay no worries. Thanks.