LSE to Text is a tool for translating Spanish Sign Language (LSE) images to text using deep learning. It provides a simple command line interface (CLI) for training and evaluating models.
- Train a custom model on Spanish Sign Language alphabet images
- Predict text from sign language images using a trained model
- Evaluate model performance using K-Fold Cross Validation
- Easy CLI for training and inference
- Configurable training parameters
-
Clone this repository:
git clone https://github.com/Pacatro/Lse2Text cd Lse2Text -
Run the program (this will install dependencies and create a virtual environment):
uv run src/main.py
The CLI offers three main commands: train, predict and eval.
Usage: main.py [OPTIONS] COMMAND [ARGS]...
Options:
--verbose -v Verbose mode
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the
installation.
--help -h Show this message and exit.
Commands:
train Train a model with the given parameters and save it to the given path.
predict Runs inference with the given model.
eval Runs a K-Fold Cross Validation evaluation.
Train a model with the given parameters and save it in ONNX format.
Usage: main.py train [OPTIONS]
Options:
--out-model -o TEXT Model path in ONNX format [default: model.onnx]
--epochs -e INTEGER Number of train epochs [default: 50]
--batch-size -b INTEGER Batch size [default: 32]
--debug -d Run in debug mode
--metrics-filename -m TEXT Metrics filename without extension [default: None]
--use-logger -l Use a logger
--help -h Show this message and exit.
Example:
uv run src/main.py train -o model.onnx -e 20 -b 64
Run inference with the given model.
Usage: main.py predict [OPTIONS]
Options:
--model-path -m TEXT Model path [default: model.onnx]
--max-preds -p INTEGER Max number of predictions [default: 20]
--help -h Show this message and exit.
Example:
uv run src/main.py predict -m model.onnx -p 10
Run a K-Fold Cross Validation evaluation.
Usage: main.py eval [OPTIONS]
Options:
--folds -k INTEGER The number of folds for CV [default: 5]
--batch-size -b INTEGER Batch size [default: 32]
--epochs -e INTEGER Number of train epochs [default: 50]
--help -h Show this message and exit.
Example:
uv run src/main.py eval -k 10 -b 64
Created by Paco Algar Muñoz.