Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
467 changes: 467 additions & 0 deletions Neural Style Transfer/Neural_Style_Transfer.ipynb

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions Neural Style Transfer/how-to-use.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Neural Style Transfer

## Table of Contents
1. [Introduction](#introduction)
2. [Project Structure](#project-structure)
3. [Installation](#installation)
4. [How It Works](#how-it-works)
5. [Future Enhancements](#future-enhancements)

---

### Introduction

**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.

- Pretrained Model - https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2
---

### Project Structure

```bash
NeuralStyleTransfer/
├── images/ # Folder containing input content images
│ ├── rabit.jpg
│ └── city.jpg
│ └── ...
├── styles/ # Folder containing input style images
│ ├── style1.jpg
│ └── ...
├── generated/ # Folder for storing generated styled images
│ ├── generated_image_{}.jpg
│ └── ...
├── requirements.txt # List of dependencies
├── how-to-use.md # Project documentation (this file)
└── Neural_Style_Transfer.ipynb # Main script to run the neural style transfer
```
---

### Installation
To run the project locally, follow these steps:
1. Install the required dependencies:
```bash
pip install -r requirements.txt
```
2. Fork and Clone the repository:
```bash
git clone https://github.com/username/machine-learning-repos.git
cd Neural Style Transfer
```

---

### How It Works
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:

1. The content features of the generated image and the content image.
2. The style features of the generated image and the style image.

- Content Image: Preserves the structure and details.
- Style Image: Adds artistic characteristics, such as brush strokes and color patterns.
- Generated Image: The final result that merges content and style.

---
### Sample Output
![PNG image](https://github.com/user-attachments/assets/acbe6b29-5088-4346-8433-216efa604418)

---
### Future Enhancements
Here are some potential improvements for future releases:

- Implement a custom CNN model for a comprehensive output.
- Add more advanced style transfer techniques for real-time processing.
- Enhance the UI or add a GUI for easier use.

---
Binary file added Neural Style Transfer/images/.DS_Store
Binary file not shown.
Binary file added Neural Style Transfer/images/9955.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/images/9961.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/images/9969.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/images/9985.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/images/9990.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/images/city.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/images/rabit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/styles/9955.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/styles/image.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/styles/map4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/styles/style1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Neural Style Transfer/styles/style2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading