[Python] When I Try To Train a Tesseract Model I get a Compute CTC targets failed error

Discussão em 'Python' iniciado por Stack, Junho 17, 2025.

  1. Stack

    Stack Membro Participativo

    I am currently using tesseract 5.0 and am training a model. I have generated the png, box and the ground truth files for a thousand images. However, when I run the command:

    make training MODEL_NAME=graphDetector START_MODEL=eng TESSDATA=../tessdata/ MAX_ITERATIONS=500 LEARNING_RATE=0.0001 PSM=11

    I get the error:

    Compute CTC targets failed for data/graphDetector-ground-truth/graph613.lstmf!

    for every one of them.

    Each image is a graph like this:

    img

    The ground truth files (.gt.txt) are like this:

    1,000 2,000 3,000 4,000 5,000 6,000 7,000 8,000 2,000 3,000 4,000 5,000 6,000 7,000

    The box files are like this:

    1 150 55 160 70 0

    , 160 55 169 70 0

    0 169 55 178 70 0

    0 178 55 187 70 0

    0 187 55 196 70 0

    2 203 55 213 70 0

    , 213 55 222 70 0

    0 222 55 231 70 0

    0 231 55 240 70 0

    0 240 55 249 70 0

    3 256 55 266 70 0

    , 266 55 275 70 0

    0 275 55 284 70 0

    0 284 55 293 70 0

    0 293 55 302 70 0

    4 309 55 319 70 0

    , 319 55 328 70 0

    0 328 55 337 70 0

    0 337 55 346 70 0

    0 346 55 355 70 0

    5 362 55 372 70 0

    , 372 55 381 70 0

    0 381 55 390 70 0

    0 390 55 399 70 0

    0 399 55 408 70 0

    6 416 55 425 70 0

    , 425 55 434 70 0

    0 434 55 443 70 0

    0 443 55 452 70 0

    0 452 55 461 70 0

    7 469 55 478 70 0

    , 478 55 487 70 0

    0 487 55 496 70 0

    0 496 55 505 70 0

    0 505 55 514 70 0

    8 522 55 531 70 0

    , 531 55 540 70 0

    0 540 55 549 70 0

    0 549 55 558 70 0

    0 558 55 567 70 0

    2 71 97 81 112 0

    , 81 97 90 112 0

    0 90 97 99 112 0

    0 99 97 108 112 0

    0 108 97 117 112 0

    3 71 153 81 168 0

    , 81 153 90 168 0

    0 90 153 99 168 0

    0 99 153 108 168 0

    0 108 153 117 168 0

    4 71 209 81 224 0

    , 81 209 90 224 0

    0 90 209 99 224 0

    0 99 209 108 224 0

    0 108 209 117 224 0

    5 71 265 81 280 0

    , 81 265 90 280 0

    0 90 265 99 280 0

    0 99 265 108 280 0

    0 108 265 117 280 0

    6 71 321 81 336 0

    , 81 321 90 336 0

    0 90 321 99 336 0

    0 99 321 108 336 0

    0 108 321 117 336 0

    7 71 377 81 392 0

    , 81 377 90 392 0

    0 90 377 99 392 0

    0 99 377 108 392 0

    0 108 377 117 392 0

    These are the png, .gt.txt, and the .box file of graph1

    Continue reading...

Compartilhe esta Página