vloison/Handwritten_Text_Recognition

AttributeError: Can't get attribute 'RCNN' on <module 'network'

kingstontan opened this issue · 6 comments

I'm getting the following error while trying to make predictions.
I fixed it temporarily by changing the class name in network.py from CRNN to RCNN.
Should I be changing the class name?

Also I managed to run the command after this change but my output in predictions.txt is empty.

Thanks a bunch

image
from CRNN
image
to RCNN
image
image

When we trained the model, we named the network as RCNN. Later we changed it to CRNN. That's where the problem comes from. Thanks a lot, we will fix it very soon. May I take a look at your test image ?

Got it. So I should leave it as RCNN for now?

Here is the test image and here's the command I used.

python line_predictor.py --data_path images/ --model_path trained_networks/ICFHR2014_model_imgH64.pth --imgH 89 --save_model_path tesdir/

a01-000u-00

I have fixed these issues. Please update the code and now use the command line python lines_predictor.py --data_path datapath --model_path ./trained_networks/IAM_model_imgH64.pth --imgH 64 to test the image. Hope it will work well.

Hi Hux, I tried the new code with the following command, but the predictions were still empty. Using back the same test images.
python line_predictor.py --data_path iam/ --model_path ./trained_networks/IAM_model_imgH64.pth --imgH 64

The only 2 changes I made were

  1. the added map_location=torch.device('cpu') while loading model as I don't have an Nvidia gpu
  2. I removed self.time in params.py
    image

Thank you so much for your time :)

image
image

Please make sure that the folder of data_path contains images in .jpg form.

Got it, that was the issue. Thanks for your replies.