def METHOD_NAME(config, image, timestamp, print_result, save_img, save_log):
    if save_img:
        basename = os.path.basename(image)
    detection_list, img, boxes = Detection_txt(config,image,config.net)
    # print(detection_list)
    t = time.time()
    device = config.device
    #print("config device", device)
    model = config.model
    converter = config.converter
    # 32 * 100
    AlignCollate_demo = AlignCollate(imgH=config.imgH, imgW=config.imgW, keep_ratio_with_pad=config.PAD)
    # demo_data = RawDataset(root=image, opt=config)  # use RawDataset
    demo_data = RawDataset_wPosition(root=detection_list, opt=config)  # use RawDataset
    demo_loader = torch.utils.data.DataLoader(
        demo_data, batch_size=config.batch_size,
        shuffle=False,
        num_workers=int(config.workers),
        collate_fn=AlignCollate_demo, pin_memory=True)
    #(< PIL.Image.Image image mode=L size=398x120 at 0x7F376DAF30B8 >, './demo_image/demo_12.png')
    # predict
    model.eval()
    with torch.no_grad():
        if save_log: log = open(f'{config.logfilepath}', 'a')
        dashed_line = '-' * 80
        head = f'{"coordinates":25s}\t{"predicted_labels":25s}\tconfidence score'
        #if save_img: print(f'{dashed_line}\n{head}\n{dashed_line}')
        if save_log: log.write(f'{dashed_line}\n{head}\n{dashed_line}\n')
        if print_result: print(f'{dashed_line}\n{head}\n{dashed_line}')
        pred_list = []
        new_boxes = []
        for image_tensors, coordinate_list in demo_loader:
            batch_size = image_tensors.size(0)
            # print(image_tensors.shape)
            image = image_tensors.to(device)
            # For max length prediction
            length_for_pred = torch.IntTensor([config.batch_max_length] * batch_size).to(device)
            text_for_pred = torch.LongTensor(batch_size, config.batch_max_length + 1).fill_(0).to(device)
            preds = model(image, text_for_pred, is_train=False)
            # select max probabilty (greedy decoding) then decode index to character
            _, preds_index = preds.max(2)
            preds_str = converter.decode(preds_index, length_for_pred)
            preds_prob = F.softmax(preds, dim=2)
            preds_max_prob, _ = preds_prob.max(dim=2)
            for coordinate, pred, pred_max_prob in zip(coordinate_list, preds_str, preds_max_prob):
                pred_EOS = pred.find('[s]')
                pred = pred[:pred_EOS]  # prune after "end of sentence" token ([s])