So Sorry for the late reply… Still, I’m not able to run that demo.py with extract multiple words,  2,3 words, and its associated probabilities.

  
      github.com
  
  
    meijieru/crnn.pytorch/blob/master/demo.py 6
import torch
from torch.autograd import Variable
import utils
import dataset
from PIL import Image

import models.crnn as crnn


model_path = './data/crnn.pth'
img_path = './data/demo.png'
alphabet = '0123456789abcdefghijklmnopqrstuvwxyz'

model = crnn.CRNN(32, 1, 37, 256)
if torch.cuda.is_available():
    model = model.cuda()
print('loading pretrained model from %s' % model_path)
model.load_state_dict(torch.load(model_path))

converter = utils.strLabelConverter(alphabet)


  This file has been truncated. show original

  
  
    
    
  
  


Not sure where to start,  from my understanding, CTC has softmax, and score.  from where we could extract the sum of probabilities for each word1, word2
CTC code

  
      github.com
  
  
    meijieru/crnn.pytorch/blob/4850b736fc8186b98c864a0c95c032a887e7c537/utils.py 14
#!/usr/bin/python
# encoding: utf-8

import torch
import torch.nn as nn
from torch.autograd import Variable
import collections


class strLabelConverter(object):
    """Convert between str and label.

    NOTE:
        Insert `blank` to the alphabet for CTC.

    Args:
        alphabet (str): set of the possible characters.
        ignore_case (bool, default=True): whether or not to ignore all of the case.
    """



  This file has been truncated. show original

  
  
    
    
  
  


Thanks for your help in advance!