aster icon indicating copy to clipboard operation
aster copied to clipboard

newbie asking for help : how to initialize ASTER in a class constructor

Open Horace89 opened this issue 7 years ago • 0 comments

I'm a complete newbie in Tensorflow. I've been able to run the script aster/demo.py but I'd like to refactor it so that the algorithm is initiated in a class constructor. The class would have only an other method 'recongnize'

class ASTER(object):
  def __init__(self):
  	...

  def recognize(self, image_path):
    ...

I would then use an instance of ASTER with :

recognizer = ASTER()
print("res1:", recognizer.recognize("./image1.jpg"))
print("res2:", recognizer.recognize("./image2.jpg"))

Is it possible to do so? I've tried a couple of things but failed miserably... Thanks in advance.

Horace89 avatar Jan 03 '19 23:01 Horace89