Skip to content

Commit 8e7a848

Browse files
authored
Merge pull request #1275 from ChitteshKumar/neural-style-transfer
Neural Style Transfer Project Added (new folder)
2 parents d7d1a6b + 0da8707 commit 8e7a848

File tree

16 files changed

+546
-0
lines changed

16 files changed

+546
-0
lines changed

Neural Style Transfer/Neural_Style_Transfer.ipynb

Lines changed: 467 additions & 0 deletions
Large diffs are not rendered by default.
74.6 KB
Loading

Neural Style Transfer/how-to-use.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Neural Style Transfer
2+
3+
## Table of Contents
4+
1. [Introduction](#introduction)
5+
2. [Project Structure](#project-structure)
6+
3. [Installation](#installation)
7+
4. [How It Works](#how-it-works)
8+
5. [Future Enhancements](#future-enhancements)
9+
10+
---
11+
12+
### Introduction
13+
14+
**Neural Style Transfer** is a project that applies the artistic style of one image (style image) to another image (content image) using deep learning techniques. For this project, I have chosen a pre-trained model from TensorFlow Hub, which allows for efficient and effective style transfer. The project leverages this model to create new images by merging the content of one image with the style of another, enabling users to transform their photos into unique artistic expressions.
15+
16+
- Pretrained Model - https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2
17+
---
18+
19+
### Project Structure
20+
21+
```bash
22+
NeuralStyleTransfer/
23+
24+
├── images/ # Folder containing input content images
25+
│ ├── rabit.jpg
26+
│ └── city.jpg
27+
│ └── ...
28+
29+
├── styles/ # Folder containing input style images
30+
│ ├── style1.jpg
31+
│ └── ...
32+
33+
├── generated/ # Folder for storing generated styled images
34+
│ ├── generated_image_{}.jpg
35+
│ └── ...
36+
37+
├── requirements.txt # List of dependencies
38+
├── how-to-use.md # Project documentation (this file)
39+
└── Neural_Style_Transfer.ipynb # Main script to run the neural style transfer
40+
```
41+
---
42+
43+
### Installation
44+
To run the project locally, follow these steps:
45+
1. Install the required dependencies:
46+
```bash
47+
pip install -r requirements.txt
48+
```
49+
2. Fork and Clone the repository:
50+
```bash
51+
git clone https://github.com/username/machine-learning-repos.git
52+
cd Neural Style Transfer
53+
```
54+
55+
---
56+
57+
### How It Works
58+
The Neural Style Transfer algorithm works by combining the content of one image with the style of another using a deep neural network. It minimizes the differences between:
59+
60+
1. The content features of the generated image and the content image.
61+
2. The style features of the generated image and the style image.
62+
63+
- Content Image: Preserves the structure and details.
64+
- Style Image: Adds artistic characteristics, such as brush strokes and color patterns.
65+
- Generated Image: The final result that merges content and style.
66+
67+
---
68+
### Sample Output
69+
![PNG image](https://github.com/user-attachments/assets/acbe6b29-5088-4346-8433-216efa604418)
70+
71+
---
72+
### Future Enhancements
73+
Here are some potential improvements for future releases:
74+
75+
- Implement a custom CNN model for a comprehensive output.
76+
- Add more advanced style transfer techniques for real-time processing.
77+
- Enhance the UI or add a GUI for easier use.
78+
79+
---
6 KB
Binary file not shown.

Neural Style Transfer/images/9955.jpg

1.6 KB
Loading

Neural Style Transfer/images/9961.jpg

1.48 KB
Loading

Neural Style Transfer/images/9969.jpg

1.41 KB
Loading

Neural Style Transfer/images/9985.jpg

1.4 KB
Loading

Neural Style Transfer/images/9990.jpg

1.67 KB
Loading

Neural Style Transfer/images/city.jpg

24.3 KB
Loading

0 commit comments

Comments
 (0)