Welcome to the Cartoon Captioning Project! This project aims to generate captions for cartoon images using deep learning or transformer based techniques. You can choose between two model architectures: LSTM-CNN and ViT-GPT2.
- Data Loading and Preprocessing
- Exploratory Data Analysis (EDA)
- Model Training and Evaluation
- Visualization of Results
cartoon_captioning/
โ
โโโ config/
โ โโโ config.yaml
โโโ data/
โ โโโ dataset.py
โ โโโ load_data.py
โโโ eda/
โ โโโ eda.py
โ โโโ plot.py
โโโ models/
โ โโโ lstm_cnn.py
โ โโโ vit_gpt2.py
โ โโโ build_model.py
โ โโโ train_model.py
โ โโโ evaluate_model.py
โโโ utils/
โ โโโ image_processing.py
โ โโโ text_processing.py
โโโ train.py
โโโ requirements.txt
cd cartoon-image-generator
python -m venv cap_env
source cap_env/bin/activate
pip install -r requirements.txt
embedding_dim: 256
units: 256
vocab_size : 10000
image_feature_dim : 100352
batch_size: 32
epochs: 2
model_save_path: 'models/saved_model'
tokenizer_path: 'models/tokenizer.pkl'
max_length: 40
model_type: 'lstm_cnn' # or 'vit_gpt2' for using 'ViT-GPT2' model
python train.py --config config/config.yaml --model_type lstm_cnn
python train.py --config config/config.yaml --model_type vit_gpt2
python app.py --config config/config.yaml
http://127.0.0.1:5000