On Fri, Nov 20, 2009 at 9:54 PM, Christoph Burgmer <
cbur...@ira.uka.de> wrote:
> I am currently experimenting with providing several character instances to the
> training step [1].
Nice work. Seems like we've got the new default models for next release then :)
I also liked your idea of using the KanjiVG data as evaluation data.
It's pretty dangerous to do the evaluation with the few samples that
we have in tegaki-lab/. Since the amount of data is so small, the
improvements that we may get by tweaking our algorithms or models
against this data may well be pure luck and not reproduce on larger
data.
KanjiVG has only one sample per character but it has over 6000
characters so evaluation results are much more reliable. Even though
KanjiVG is for Japanese, we can reasonably assume that the
improvements we get also apply to Chinese. Using KanjiVG for
evaluation data means that we should refrain from using it for
training data as well otherwise our evaluation results will be biased.
> This increases the number of Character objects by factor 5
> to 10, in my latest set 55103 instances. I seem to hit a memory limit, with
> the systems starting to trash once python uses 70% of memory. While I
> currently run scripts on a 2 gig machine, my local system is pretty old with
> less ram, so I can't even view the resulting XML files with tegaki-train.
>
> I wonder if there's any possibility to decrease the memory footprint of
> scripts working with character collections. It's only an issue for
> development, end users only work with resulting model files. Still it might be
> necessary once working with larger collections. So feel free to suggest
> optimizations ;)
I definitely agree that this needs to be reworked. Currently, the
entire XML file is read and a Character instance is kept in memory for
each character in the collection... This approach makes certain things
easier: combining collections together (the + operator), modifying
character instances in the collection (tegaki-train), searching for
characters... We need to make the code more lazy, i.e. access
characters only when necessary. Python generators (the yield operator)
may be helpful here. However, I think this involves a major rewrite of
the class :-/
Mathieu