0% found this document useful (0 votes)
13 views3 pages

AAI Experiment 8 Report

The document discusses an experiment on Neural Style Transfer using transfer learning with a pre-trained model from Google's Magenta. It outlines the process of leveraging a convolutional neural network to stylize images while preserving their structure, utilizing TensorFlow and TensorFlow Hub. The experiment successfully demonstrates efficient style transfer, highlighting potential future enhancements for real-time applications and higher resolutions.

Uploaded by

Abhishek Bapat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

AAI Experiment 8 Report

The document discusses an experiment on Neural Style Transfer using transfer learning with a pre-trained model from Google's Magenta. It outlines the process of leveraging a convolutional neural network to stylize images while preserving their structure, utilizing TensorFlow and TensorFlow Hub. The experiment successfully demonstrates efficient style transfer, highlighting potential future enhancements for real-time applications and higher resolutions.

Uploaded by

Abhishek Bapat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Name: Abhishek Damodar Bapat

ID: 21106008
Roll No: 5
Subject: Advanced Artificial Intelligence Lab

Neural Style Transfer


Introduction:

Transfer Learning is a machine learning technique where a model trained on one task is
reused (transferred) for a different but related task.Instead of training a model from scratch,
you leverage the knowledge (weights/features) the model has already learned from a large
dataset (like ImageNet) and fine-tune it on your specific, usually smaller dataset.

This experiment explores the concept of transfer learning using a pre-trained deep learning
model for neural style transfer. The model used is Google’s Magenta Arbitrary Image
Stylization v1-256, which applies artistic styles to content images while preserving their
structural details.

Objective is to demonstrate feature extraction-based transfer learning by leveraging a


pre-trained TensorFlow Hub model to stylize an image efficiently without modifying the
model’s parameters.

Components used to implement the project:

Dataset: The experiment utilizes two input images—one as the content image and another as
the style image.

Model: tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/1.

Preprocessing:

Load content and style images using matplotlib.pyplot.imread().

Convert images to NumPy arrays and normalize them.


Model Inference: The model processes the images using a convolutional neural network
(CNN) and applies Adaptive Instance Normalization (AdaIN) to blend content and style.

The output is scaled to an 8-bit format for visualization.

Evaluation: The stylized output image is displayed using matplotlib.pyplot.imshow().

Technical Details:

Framework: TensorFlow 2.x, TensorFlow Hub

Model Type: Convolutional Neural Network (CNN)

Transfer Learning Approach: Feature extraction (pre-trained weights are used without
fine-tuning)

Computation: The experiment runs efficiently on CPU/GPU without requiring additional


training.

Screenshots:

Fig 1. Dog
Fig 2. Style

Fig 3. Fused Image

Conclusion:The experiment successfully demonstrates transfer learning by applying a


pre-trained deep learning model for style transfer. This approach significantly reduces
computational cost while generating high-quality stylized images. Future improvements may
include real-time style transfer and higher-resolution outputs.

You might also like