https://github.com/cyberagentailab/mg-gen
Project page for "MG-Gen: Single Image to Motion Graphics Generation with Layer Decomposition"
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.7%) to scientific vocabulary
Repository
Project page for "MG-Gen: Single Image to Motion Graphics Generation with Layer Decomposition"
Basic Info
- Host: GitHub
- Owner: CyberAgentAILab
- License: agpl-3.0
- Language: Python
- Default Branch: main
- Size: 4.59 MB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
MG-Gen: Single Image to Motion Graphics Generation with Layer Decopmosition
This is an official repository for MG-Gen.
MG-Gen is a novel method to generate motion graphics from a single raster image preserving input content consistency with dynamic text motion.
- Paper: https://arxiv.org/abs/2504.02361
- Project Page: https://cyberagentailab.github.io/mggen/
Setup Experimental Environment
Create and activate a Python venv. (Requirements: python >= 3.10)
python -m venv .venv
source .venv/bin/activate
Install dependencies.
pip install -r requirements.txt
playwright install
Download anime.min.js
mkdir src/libs/
curl -o src/libs/anime.min.js https://raw.githubusercontent.com/juliangarnier/anime/3.2.0/lib/anime.min.js
Download the weights from GCS.
If you have not installed gsutil, see the installation instructions.
gsutil -m cp gs://ailab-public/image-to-video/mggen/weights.zip .
unzip weights.zip
Generate motion graphics from images
Set your Gemini APIKEY in .env. You can get an API key for free from Google AI Studio. (20250331)
```
echo "GEMINIAPIKEY=\"your-api-key\"" > .env
```
Start a gradio demo sever.
cd src
python demo.py
Run a generation batch script.
cd src
python inference_batch.py --testset_dir "../example_inputs"
Demo videos

License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
Citation
bibtex
@article{shirakawa2025mg,
title={MG-Gen: Single Image to Motion Graphics Generation with Layer Decomposition},
author={Shirakawa, Takahiro and Suzuki, Tomoyuki and Haraguchi, Daichi},
journal={arXiv preprint arXiv:2504.02361},
year={2025}
}
Owner
- Name: CyberAgent AI Lab
- Login: CyberAgentAILab
- Kind: organization
- Location: Japan
- Website: https://cyberagent.ai/ailab/
- Twitter: cyberagent_ai
- Repositories: 7
- Profile: https://github.com/CyberAgentAILab
GitHub Events
Total
- Watch event: 3
- Member event: 1
- Public event: 1
Last Year
- Watch event: 3
- Member event: 1
- Public event: 1
Dependencies
- einops *
- google-genai >=1.5.0
- gradio *
- imageio-ffmpeg *
- omegaconf *
- opencv-python *
- paddleocr >=2.0.1
- paddlepaddle-gpu *
- pillow *
- playwright >=1.50.0
- pycocotools ==2.0.8
- python-dotenv *
- scikit-image *
- torch ==2.4.1
- torchvision ==0.19.1
- tqdm *
- transformers ==4.45.2
- ultralytics *