feat(ocr): full OCR pipeline with polygon annotations, training, and guided mode #232
@@ -465,7 +465,15 @@ async def segtrain_model(
|
||||
"-N", "10",
|
||||
]
|
||||
if os.path.exists(blla_model_path):
|
||||
cmd += ["-i", blla_model_path]
|
||||
cmd += ["-i", blla_model_path, "--resize", "both"]
|
||||
else:
|
||||
# No pretrained model — train from scratch with reduced height (800px)
|
||||
# to keep peak RAM under ~200 MB on CPU (default 1800px uses ~500 MB+)
|
||||
cmd += [
|
||||
"-s",
|
||||
"[1,800,0,3 Cr7,7,64,2,2 Gn32 Cr3,3,128,2,2 Gn32 Cr3,3,128 Gn32 "
|
||||
"Cr3,3,256 Gn32 Cr3,3,256 Gn32 Lbx32 Lby32 Cr1,1,32 Gn32 Lby32 Lbx32]",
|
||||
]
|
||||
cmd += xml_files
|
||||
|
||||
log.info("Running: %s", " ".join(cmd[:5]) + " ...")
|
||||
|
||||
Reference in New Issue
Block a user