Releases: knaw-huc/loghi-htr
1.2.10
Release Notes for Loghi-HTR Version 1.2.3 -> 1.2.10
Date: 2023-10-27
Overview
Version 1.2.10 brings a suite of bug fixes, API improvements, and functional enhancements. This update focuses on increased flexibility in model training, improved normalization processes, added image processing augmentations, and enhanced multi-GPU support in the API.
New Features
-
Normalization File: Introduced the
--normalization_file
argument, replacing--normalize
. Characters to be replaced can now be specified in a JSON file, where the key is the character to replace, and the value is the replacement character. This facilitates training models with a focus on reducing or changing uncommon characters to more common, similar ones.
Example:{ "ø": "o", "æ": "ae" }
-
Sauvola and Otsu Binarizations: Reintroduced these methods for image preprocessing.
-
New Image Augmentations: Added blur (
--do_blur
) and invert (--do_invert
) augmentations. -
Silent Training: Added
--training_verbosity_mode
with options[auto, 0, 1, 2]
for controlling training output verbosity.
API Enhancements
- Multi-GPU Support: Enhanced to support multiple GPUs.
- Improved Logging: Added process IDs for easier debugging and enhanced overall logging.
- GPU Usage: Improved GPU usage handling, including the use of mixed_float16 policy if supported.
- Image Preparation: Moved all image preparation tasks to a dedicated worker.
- Batch Queue Size: Adjusted the prepared max queue size to reflect batches instead of individual images.
- API Response Codes: Updated to align more closely with Laypa and Tooling standards.
Bug Fixes
- Freezing Layers Capitalization: Fixed an issue where capitalization was ignored when setting layers to non-trainable.
- Charlist Inference: The
charlist
is no longer required when replacing the final layer; it can now be inferred from texts. - Normalization in Multi-Character Spaces: When a normalization file is used, all multi-character spaces are now replaced with a single space.
- Config.json githash: Ensured that
githash
in theconfig.json
file does not contain spaces. - Existing Model Naming: Fixed an issue where setting a new name for an existing model using
--existing_model
and--model_name
didn't work as expected. - Random Shear in Augmentation: Corrected an issue where the random shear augmentation incorrectly applied elastic transform.
- Prediction Padding Value: Resolved a bug in prediction due to an incorrect padding value.
- Multiprocessing with Gunicorn/Flask: Moved multiprocessing outside of the gunicorn/flask apps.
Docker Image
The Docker image for version 1.2.10 can be obtained using the following command:
docker pull loghi/docker.htr:1.2.10
Contributors
- @MMaas3: Key contributions in reintroducing binarizations, adding extra augmentations, and fixing the githash issue in the
config.json
file. - @rvankoert: Significant work in addressing the capitalization issue for freezing layers and the charlist inference.
- @TimKoornstra: Major contributions across various aspects including enhancements, bug fixes, and general improvements in the application.
Full Changelog: 1.2.3...1.2.10
1.2.3
Release Notes for Loghi-HTR Version 1.2.3
Date: 2023-10-02
Overview
This release introduces significant refactoring, added VGSL Spec functionality, unit tests, and upgraded dependencies. It also brings improvements to the documentation and cleanups in the file structure.
New Features
- VGSL Spec Implementation: Added VGSL spec-type model creation functionality.
- Unit Tests: Introduced unittests for the most-used classes and additional functionalities.
- Custom VGSL Model Names: Models can now be named using the
--model_name
argument. - VGSL Spec String Conversion: Models can now be converted to a VGSL spec string using the
VGSLSpecGenerator.model_to_string(model)
function.
Enhancements
- Improved Documentation: Enhanced the
README.md
with a FAQ section, API usage section, and more accurate and consistent information. - GitHub Actions Integration: Setup GitHub Actions to run unittests on push/pull requests.
- Confidence Interval: Added a 95% confidence interval feature.
- Dependency Upgrades: Upgraded various dependencies and set Python requirement to > 3.8.
Deprecations and Removals
- Old Model Creation Method Deprecated: The previous method of creating models is no longer supported. Models must now be created either from the model library or using a VGSL spec string. This change facilitates rapid and structured prototyping among other benefits. For details on transitioning from the old to the new method, see the "Upgrading" section of these release notes.
- File Cleanup: Removed many unused files and arguments.
- Requirements.txt Moved: Moved
requirements.txt
out of thesrc
folder.
Upgrading
- New models must now be created with either a VGSL spec string, or "model" + the version number corresponding to the "old" way of creating models. For example,
--model new17
becomes--model model17
. - Old models can be converted to VGSL spec by running the following command:
This command will be helpful for users who have old models and want to convert them to the new VGSL spec format, making the upgrading process smoother.
python3 src/vgsl_spec_generator.py --model_dir /path/to/model/dir/
Docker Image
The Docker image for version 1.2.3 can be obtained using the following command:
docker pull loghi/docker.htr:1.2.3
Contributors
- @TimKoornstra: Major contributions including refactoring, VGSL Spec implementation, documentation improvements, and more.
- @Thelukepet: Significant contributions including writing most of the VGSL spec string, updating the corresponding README documentation, file cleanup, and implementing the 95% confidence interval feature.