ssudholt / phocnet

BSD 3-Clause "New" or "Revised" License
38 stars 28 forks source link

PHOCNet pretrained on IAM produces PHOCs of size 555 #8

Closed budang closed 6 years ago

budang commented 6 years ago

Running predict_phocs.py with phocnet_iam.binaryproto and default PHOC size of 604 in deploy_phocnet.prototxt gives the following error:

F0219 19:04:09.373934 23 net.cpp:757] Cannot copy param 0 weights from layer 'fc8'; shape mismatch. Source param shape is 555 4096 (2273280); target param shape is 604 4096 (2473984). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer.

How is this PHOC calculated? Why is it size 555 rather than 604?

ssudholt commented 6 years ago

The PHOC is calculated using the Levels 1,2,3,4,5 and using only the unigrams. Adding bigrams does not make a difference performance-wise. For calculating the PHOC, I used all unigrams, i.e., characters, present in the training set. There are 37 different characters in the IAM annotation which gives a totoal PHOC size of 555 for the aforementioned levels.

budang commented 6 years ago

Thank you! Would you mind sharing these 37 unigrams if you have them readily available?

ssudholt commented 6 years ago

-- 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z

So simply the Latin characters, the digits and the dash Edit: The dash can't be displayed properly here, it's not a double but a single dash only in the unigrams list

budang commented 6 years ago

Great, thanks again :)