Style Transfer Application
This project implements a style transfer application that transforms images by combining the content of one image with the style of another using a pre-trained model from TensorFlow Hub.
To run this project, you will need:
- Python 3.7+
- TensorFlow 2.x+
- TensorFlow Hub
- Numpy
- Matplotlib
- Pillow
Clone the repository:
git clone https://github.com/your-repo/style-transfer.git
cd style-transfer
Install dependencies:
Install the required Python packages using pip:
pip install tensorflow tensorflow-hub numpy matplotlib pillow
Prepare the images:
Place the content and style images you want to process in the project directory. Ensure that the paths in the script point to these image files.
Run the script:
To run the style transfer application, use the following command:
python style_transfer.py
The script will apply the style of the style image to the content image and display the result.
The resulting image will display the content of the content image with the style of the style image applied.
.
├── style_transfer.py # Main script to run style transfer
├── content_image.jpg # Sample content image (replace with your own)
├── style_image.jpg # Sample style image (replace with your own)
└── README.md # This file
The application uses the following pre-trained model from TensorFlow Hub:
- Arbitrary Image Stylization Model:
The model outputs an image that combines the content from the content image with the artistic style from the style image.
The output will be displayed using Matplotlib, showcasing the transformed image in a separate window.