IntuitionMachines / OrigamiNet

Public implementation of our CVPR Paper "OrigamiNet: Weakly-Supervised, Segmentation-Free, One-Step, Full Page TextRecognition by learning to unfold"
143 stars 39 forks source link

Inputting text into the model #8

Open mashrurmorshed opened 3 years ago

mashrurmorshed commented 3 years ago

I've been inspecting the code and was wondering, what is the purpose of inputting text into the model?

In the OrigamiNet class in cnv_model.py, the forward method seems to accept a list t=[], or text, that has no apparent use.

In train.py, text is passed into the model in this fashion:

preds = model(image,text).float()

And in validation, an empty string is passed:

preds = model(image, '')