XifengGuo / CapsNet-Keras

A Keras implementation of CapsNet in NIPS2017 paper "Dynamic Routing Between Capsules". Now test error = 0.34%.
MIT License
2.47k stars 652 forks source link

length prediction per image > 1 #122

Open leven101 opened 4 years ago

leven101 commented 4 years ago

Hello @XifengGuo ,

Thanks for your code. I'm trying to modify your toolkit to multiple labels per input image. The use case is OCR. If I pass in a image with a string of digits I want to get a prediction for each digit in the image. We right pad to make each prediction the same length.

How can I modify the code so the prediction for each input image output by your CapsNet architecture has a length > 1? So instead of predicting for a single output from 10 choices (0-9) we are predicting for multiple outputs each of them with a chance of being 0-9?

Thank you.