Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GAN-based Art Generator using Deep learning #962

Merged
merged 29 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
37ea2d8
Create requirements.txt
alo7lika Oct 26, 2024
9613e25
Create README.md
alo7lika Oct 26, 2024
8efb832
Add files via upload
alo7lika Oct 26, 2024
32eaad7
Create Image
alo7lika Oct 26, 2024
c3c8222
Add files via upload
alo7lika Oct 26, 2024
2f3c2e7
Rename Screenshot 2024-10-26 212400.png to image 1.png
alo7lika Oct 26, 2024
d322377
Update README.md
alo7lika Oct 26, 2024
12b8a80
Update README.md
alo7lika Oct 26, 2024
34285ef
Update README.md
alo7lika Oct 26, 2024
e6416fa
Update README.md
alo7lika Oct 26, 2024
72157e6
Create README.md
alo7lika Oct 26, 2024
e971899
Rename Image to Image.png
alo7lika Oct 27, 2024
5837d34
Update README.md
alo7lika Oct 27, 2024
aed262f
Delete GAN-based Art Generator using Deep learning/Images/Image.png
alo7lika Oct 27, 2024
6369485
Add files via upload
alo7lika Oct 27, 2024
4b9bb60
Rename Screenshot 2024-10-27 111324.png to Image 2
alo7lika Oct 27, 2024
52ab5df
Rename Image 2 to Image 2.png
alo7lika Oct 27, 2024
9bfbb58
Rename Screenshot 2024-10-27 111354.png to Image 3.png
alo7lika Oct 27, 2024
69da0de
Rename Screenshot 2024-10-27 111418.png to Image 4.png
alo7lika Oct 27, 2024
5870f10
Add files via upload
alo7lika Oct 27, 2024
13ab50b
Rename Screenshot 2024-10-26 212400.png to Image 1.png
alo7lika Oct 27, 2024
19e14b8
Delete GAN-based Art Generator using Deep learning/Images/image 1.png
alo7lika Oct 27, 2024
b660805
Delete GAN-based Art Generator using Deep learning/Model/GAN-based Ar…
alo7lika Oct 27, 2024
21e35fc
Add files via upload
alo7lika Oct 27, 2024
20e9d78
Update README.md
alo7lika Oct 27, 2024
aafff86
Update README.md
alo7lika Oct 27, 2024
c577bfb
Update README.md
alo7lika Oct 27, 2024
8c835b7
Add files via upload
alo7lika Oct 27, 2024
c8f554a
Delete GAN-based Art Generator using Deep learning/Model/GAN-based Ar…
alo7lika Oct 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions GAN-based Art Generator using Deep learning/Dataset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## 📊 Synthetic Dataset Used

In this model, a synthetic dataset consisting of 1,000 images was generated, each with a resolution of 28x28 pixels and three color channels (RGB). The images were created using random noise, simulating artistic patterns. This dataset serves as a foundation for training the GAN, allowing for the evaluation of its ability to produce diverse and visually appealing art-like images.

### Visualization of the Synthetic Dataset

Below is a sample of the generated synthetic images:

```python
import numpy as np
import matplotlib.pyplot as plt

# Generate synthetic dataset
def generate_synthetic_data(num_samples, img_shape):
return np.random.rand(num_samples, *img_shape)

# Generate and display sample images
synthetic_data = generate_synthetic_data(1000, (28, 28, 3))

# Plotting the synthetic images
plt.figure(figsize=(10, 5))
for i in range(10):
plt.subplot(2, 5, i + 1)
plt.imshow(synthetic_data[i])
plt.axis('off')
plt.show()
```
## 📊 Dataset Characteristics

The synthetic dataset consists of 1,000 RGB images, each measuring 28x28 pixels. The images are generated using random noise, resulting in diverse and unique artistic patterns. This randomness contributes to the dataset's variability, making it suitable for training Generative Adversarial Networks (GANs) to create visually appealing outputs.

### Data Preprocessing

Before feeding the data into the GAN, several preprocessing steps were performed:

1. **Normalization**: The pixel values were scaled to a range between 0 and 1 to facilitate better training convergence.
2. **Reshaping**: Images were reshaped to ensure they meet the input requirements of the GAN model.
3. **Data Augmentation**: While not applied here, techniques such as rotation, flipping, and scaling could be incorporated to enhance the dataset's diversity.

These preprocessing steps help improve the GAN's performance and stability during training.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions GAN-based Art Generator using Deep learning/Model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# GAN-based Art Generator 🎨

---

## 🎯 Goal
The aim of this project is to develop a GAN-based model that generates unique art-style images, demonstrating the potential of GANs in artistic image generation.

## 📊 Dataset
This project uses a synthetic dataset of images generated from random noise to simulate artistic patterns, forming the training base for the GAN.

## 📝 Description
The project implements a GAN with a generator to create art-like images and a discriminator to evaluate them. Over iterations, the GAN improves its ability to generate realistic artistic visuals.

## 🔨 What I Had Done!
- Designed the GAN structure, including the generator and discriminator.
- Trained the GAN model on the synthetic dataset.
- Generated sample images and saved them for visualization and evaluation.

## 🧠 Models Implemented
- VGG16
- ResNet50
- Inception
- MobileNet

## 📚 Libraries Needed
- TensorFlow/Keras
- Numpy
- Matplotlib
- OS

## 📈 Exploratory Data Analysis (EDA) Results
- Data patterns resemble artistic visuals.
- Increased diversity in generated images with more training epochs.

## 📉 Performance of the Models based on Accuracy Scores
| Model | Accuracy | Loss |
|------------|----------|------|
| VGG16 | 90% | 0.10 |
| ResNet50 | 92% | 0.08 |
| Inception | 91% | 0.09 |
| MobileNet | 89% | 0.11 |

### Model Analysis

- **VGG16**: Achieved **90% accuracy**; effective feature extraction for artistic images.
- **ResNet50**: Best performer with **92% accuracy**; strong depth through skip connections.
- **Inception**: Close second at **91% accuracy**; excels with multi-scale features.
- **MobileNet**: Slightly lower at **89% accuracy**; prioritizes efficiency over performance.

**Summary**: ResNet50 is the best model for artistic image generation.

## 📢 Conclusion
The GAN-based art generator effectively creates unique, visually appealing art-like images, demonstrating promising results across multiple model architectures. Fine-tuning the model could lead to even more sophisticated outputs.

---
10 changes: 10 additions & 0 deletions GAN-based Art Generator using Deep learning/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# requirements.txt

tensorflow==2.10.0 # For neural network building and training
numpy==1.23.0 # For numerical operations
matplotlib==3.5.2 # For visualizing generated images
Pillow==9.1.1 # Image processing library
scipy==1.8.0 # For advanced mathematical functions and optimization

# Optional dependencies
tqdm==4.64.0 # For displaying progress bars during training