EAST
EAST copied to clipboard
Fixed readme, and fixed the flag error, of - to _
Fixed flag naming convention, that causes python to throw an error when running. See below from a hyphen - to underscore _.
Why did you change ‘-’ to '_'?
#66
@zxytim because when '-' is used, the demo program will fail as
File "/home/xxxxx/anaconda2/envs/EAST/lib/python3.5/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/xxxxx/anaconda2/envs/EAST/lib/python3.5/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/xxxxx/EAST/run_demo_server.py", line 204, in index_post
rst = get_predictor(checkpoint_path)(img)
File "/home/xxxxx/EAST/run_demo_server.py", line 47, in get_predictor
f_score, f_geometry = model.model(input_images, is_training=False)
File "/home/xxxxx/EAST/model.py", line 78, in model
geo_map = slim.conv2d(g[3], 4, 1, activation_fn=tf.nn.sigmoid, normalizer_fn=None) * FLAGS.text_scale
File "/home/xxxxx/.local/lib/python3.5/site-packages/tensorflow/python/platform/flags.py", line 84, in __getattr__
wrapped(_sys.argv)
File "/home/xxxxx/.local/lib/python3.5/site-packages/absl/flags/_flagvalues.py", line 630, in __call__
name, value, suggestions=suggestions)
absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'checkpoint-path'. Did you mean: checkpoint_path ?
(when the dubug mode of flask is on it will show such traceback message)
it seems in somewhere the program needs "checkpoint_path" not "checkpoint-path". And after I replace "checkpoint-path" in run_demo_server.py as "checkpoint_path", the error is gone and program works.
so not only the readme needs modification, "run_demo_server.py" needs it too.