diff --git a/dan/ocr/predict/__init__.py b/dan/ocr/predict/__init__.py index 3500fbed4a860b9e4799feb1f7d56c21d4d06e05..000d7c99536ca2a14697ff7bb03a6d04a19835f1 100644 --- a/dan/ocr/predict/__init__.py +++ b/dan/ocr/predict/__init__.py @@ -31,7 +31,7 @@ def add_predict_parser(subcommands) -> None: parser.add_argument( "--model", type=pathlib.Path, - help="Path to the directory containing the model, the YAML parameters file and the charset file to be used for prediction.", + help="Path to the directory containing the model, the YAML parameters file and the charset file to use for prediction.", required=True, ) parser.add_argument( diff --git a/dan/ocr/predict/inference.py b/dan/ocr/predict/inference.py index 2bea4bee7fb6adf990d87d3b30d66583c009e923..7f463a33bfe798c09d54840bd1646cf528557391 100644 --- a/dan/ocr/predict/inference.py +++ b/dan/ocr/predict/inference.py @@ -437,7 +437,7 @@ def run( Predict a single image save the output :param image: Path to the image to predict. :param image_dir: Path to the folder where the images to predict are stored. - :param model: Path to the directory containing the model, the YAML parameters file and the charset file to be used for prediction. + :param model: Path to the directory containing the model, the YAML parameters file and the charset file to use for prediction. :param output: Path to the output folder where the results will be saved. :param confidence_score: Whether to compute confidence score. :param attention_map: Whether to plot the attention map. diff --git a/docs/usage/predict/index.md b/docs/usage/predict/index.md index 9ab4edaad37821e4e42a0edf6ff25cb420f7c99c..bfa15869ca116997d237cbd2573f0d35ccdd65d7 100644 --- a/docs/usage/predict/index.md +++ b/docs/usage/predict/index.md @@ -9,7 +9,7 @@ Use the `teklia-dan predict` command to apply a trained DAN model on an image. | `--image` | Path to the image to predict. Must not be provided with `--image-dir`. | `pathlib.Path` | | | `--image-dir` | Path to the folder where the images to predict are stored. Must not be provided with `--image`. | `pathlib.Path` | | | `--image-extension` | The extension of the images in the folder. Ignored if `--image-dir` is not provided. | `str` | .jpg | -| `--model` | Path to the directory containing the model, the YAML parameters file and the charset file to be used for prediction | `pathlib.Path` | | +| `--model` | Path to the directory containing the model, the YAML parameters file and the charset file to use for prediction. | `pathlib.Path` | | | `--output` | Path to the output folder. Results will be saved in this directory. | `pathlib.Path` | | | `--tokens` | Path to a yaml file containing a mapping between starting tokens and end tokens. Needed for entities. | `pathlib.Path` | | | `--temperature` | Temperature scaling scalar parameter. | `float` | `1.0` |