Img2Name Model
This repository contains a Torch model for generating character names from images.
Files
- maps.pkl: Mapping data (e.g., label mappings).
- params.pkl: Model parameters and architecture configuration.
- weights.pt: Trained model weights.
- model.py: Defines the
Img2NameModel class and provides a load_model() function.
- utils.py: Image-related utils functions.
- inference.py: Command-line inference script. It loads the model, preprocesses an input image, and outputs a predicted character name.
Inference
To run inference, execute:
python inference.py path/to/your/image.jpg --min_name_length 2 --diversity 1.2