INNER CODE UNIT · Python

process_model

Nain57/Smart-AutoClicker · scripts/ocr-models/build_models.py:34

def process_model(model, output_root, mode):
    name = model["name"]
    mtype = model["type"]
    alphabet = model.get("alphabet", "all")
    
    # Determine the directory where download_models.py placed the files
    if mtype == "det":
        model_dir = os.path.join(output_root, "det")
    else:
        model_dir = os.path.join(output_root, "rec", alphabet)

    print(f"\n\n========================================")
    print(f"PROCESSING: {name} ({mtype})")
    print(f"========================================")

    # 1. Convert using the unified converter
    # This handles Paddle -> ONNX -> Simplify -> NCNN and moves files to model_dir
    paddle_to_ncnn.run_conversion(model_dir, mtype)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…