Skip to content

Remove handwritten text generation - #370

Merged
Belval merged 1 commit into
masterfrom
remove-handwritten
Nov 26, 2026
Merged

Belval merged 1 commit into
masterfrom
remove-handwritten

Conversation

@Belval

@Belval Belval commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Handwritten generation (-hw) needs tensorflow>=1.13.1,<1.14 and numpy<1.17, which only install on Python ≤ 3.7. It hasn't worked on any Python trdg supports (3.10–3.15).

  • Delete trdg/handwritten_text_generator.py, the 44 MB trdg/handwritten_model/, and requirements-hw.txt.
  • Keep the -hw CLI flag and the is_handwritten parameter so existing scripts and positional FakeTextDataGenerator.generate calls don't break; using them now fails with a clear "removed in 1.9.0" message instead of a missing-module error.
  • Stop printing "Missing modules for handwritten text generation." on every import.
  • Remove the README section and its five sample images.
  • Tests: -hw exits non-zero with the message; is_handwritten=True raises ValueError.

Verified locally on Python 3.15: 64 tests pass (network tests skipped).

It required TensorFlow 1.13 and numpy<1.17, which only install on
Python <= 3.7, so -hw has not worked on any supported Python version.

- Delete the TensorFlow model (44 MB), its generator, and
  requirements-hw.txt
- Keep the -hw flag and is_handwritten parameter for compatibility; both
  now fail with a clear message instead of a missing-module error
- Drop the 'Missing modules for handwritten text generation.' message
  printed on every import
- Remove the README section and its sample images
@Belval
Belval merged commit 888bcca into master Nov 26, 2026
6 of 7 checks passed
Belval added a commit to Belval/TextRecognitionDataGeneratorDocs that referenced this pull request Nov 26, 2026
The feature is being removed from trdg (Belval/TextRecognitionDataGenerator#370):
it required TensorFlow 1.13, which no supported Python can install.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant