/CMVCG

Primary LanguagePythonApache License 2.0Apache-2.0

CMVCG Model

This is the implementation of CMVCG model for Live Video Comment Generation based on PyTorch and Huggingface's Transformers.

This model is a Transformer based model to generate live video comments non-autoregressively by their context comments and visual frames.

Requirment

Install Transformers:

pip install git+https://github.com/huggingface/transformers.git@7b75aa9fa55bee577e2c7403301ed31103125a35

Dataset

You can download our Bili-22 dataset at here

Another Livebot dataset be found at here. This dataset is based on Livebot and the raw data can be found at livebot.

Config

All the parameters can be set at: \MyCMVCG\config.

Train

Praining step:

python pretrain.py 

Generate fine-tuning step:

python fine_tuning_CMVCG.py

Test:

Generate comments:

python test_generate_CMVCG.py