https://github.com/pd-mera/handwritting-digit-number-generator
Super basic GAN pipeline to generate Handwritting MNIST Number
https://github.com/pd-mera/handwritting-digit-number-generator
Last synced: 3 months ago
JSON representation
Super basic GAN pipeline to generate Handwritting MNIST Number
- Host: GitHub
- URL: https://github.com/pd-mera/handwritting-digit-number-generator
- Owner: PD-Mera
- Created: 2023-03-28T10:07:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T04:27:33.000Z (about 2 years ago)
- Last Synced: 2025-01-08T19:46:49.075Z (5 months ago)
- Language: Python
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Generate Handwritting MNIST Number with Basic GAN
Super basic GAN pipeline to generate Handwritting MNIST Number

## Environments
- Python 3.10.6
Install environments with
``` bash
bash scripts/setup_environments
```## Data
You can download MNIST dataset from [here](https://drive.google.com/file/d/1JimUxm4tpbsg2zOqbGnbJDzJHwgp6by7/view?usp=share_link), use torch dataset or simply run this script
``` bash
bash scripts/download_data.sh
```## Checkpoint
You can download pretrained weight from [here](https://drive.google.com/file/d/1eeG9hb1GtF7BDjkyfj76oSz5TnEPWwNc/view?usp=share_link), train with default config. But I recommend you to retrain from scratch
## Train
You can modify config in `cfg/cfg.py` and run
``` bash
python tools/train.py
```## Infer
After training, you get weight for model in `training_runs/exp...`, set weight in `best_checkpoint` of config and run
``` bash
python tools/infer.py
```## Reference
- MNIST dataset in `.png`: [myleott/mnist_png](https://github.com/myleott/mnist_png)