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
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 ?
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
- the added
map_location=torch.device('cpu')
while loading model as I don't have an Nvidia gpu - I removed self.time in params.py
Thank you so much for your time :)
Please make sure that the folder of data_path contains images in .jpg
form.
Got it, that was the issue. Thanks for your replies.