DCGAN Tensorflow implementation of Deep Convolutional Generative Adversarial Networks was done by Kim Taehoon. Also the huge part of this README is copied from his repo.
- Brandon Amos wrote an excellent blog post and image completion code based on this repo.
- To avoid the fast convergence of D (discriminator) network, G (generator) network is updated twice for each D network update, which differs from original paper.
- Python 2.7 or Python 3.3+
- Tensorflow 0.12.1
- SciPy
- pillow
- (Optional) moviepy (for visualization)
- (I faced issue while using 1.16.0, so I rolled back to 1.15.4)[NumPy]
To training purposes I compiled 3 datasets (TSRD (I suppose with Japanies signs), Belgium-TSC, German-GTSRB) and extracted only speed limit signs with various numbers, stop sign, road closed, no entry for vehicular traffic.
To train a model with downloaded dataset:
$ python main.py --dataset DATASET_NAME --input_height=28 --output_height=28 --train
or
$ python main.py --dataset DATASET_NAME --input_height=108 --train --crop
To test with an existing model:
$ python main.py --dataset DATASET_NAME --input_height=28 --output_height=28
or
$ python main.py --dataset DATASET_NAME --input_height=108 --crop
Progress of training
Basic dataset | Blue Cirle dataset | Blue Circle with preprocessing |
---|---|---|
Basic dataset | Blue Cirle dataset | Blue Circle with preprocessing |
---|---|---|
After 6th epoch:
After 10th epoch:
After 17th epoch:
After 24th epoch:
[DONE] Remove mnist related code
- Preprocessing of dataset: apply auto crop and [DONE] brightness/contrast adjustment
- Play around with networks architecture
- Add traffic sign classifier and compare result on "real" signes and DCGAN-generated
Aleksander Lukashou / @va9abund with reference to @carpedm20