Coder Social home page Coder Social logo

hosnahoseini / neural_style_transfer Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 3.71 MB

Neural style transfer is an optimization technique that allows you to transfer the artistic style of one image to another image. This can be used to create a variety of artistic effects, such as turning a photograph into a painting or a sketch.

Jupyter Notebook 100.00%
style-transfer

neural_style_transfer's Introduction

Neural Style Transfer

Inputs:

image

Result:

image

Introduction

Neural style transfer is an optimization technique that allows you to transfer the artistic style of one image to another image. This can be used to create a variety of artistic effects, such as turning a photograph into a painting or a sketch.

Learning Objectives

In this project, I implement neural style transfer using the VGG-19 convolutional neural network. I also learn how to compute the content and style loss functions and minimize them using optimization techniques.

Steps

1- Load pretrained VGG-19 model: Download the pretrained VGG-19 model from TensorFlow Hub.

2- Extract content and style features: Extract content features from the content image and style features from the style image using the VGG-19 model.

3- Create style and content loss function: Define the content loss function and the style loss function. The content loss function measures the difference between the content features of the content image and the content features of the generated image. The style loss function measures the difference between the style features of the style image and the style features of the generated image.

4- Minimize the total loss: Minimize the total loss, which is the sum of the content loss and the style loss, using an optimization technique such as Adam.

5- Generate artistic style image: Save the generated image.

Library we used in this project:

  • TensorFlow
  • NumPy

neural_style_transfer's People

Contributors

hosnahoseini avatar

Stargazers

Matvey Sudomoykin avatar Fatemeh Rafiee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.