aster
aster copied to clipboard
newbie asking for help : how to initialize ASTER in a class constructor
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.