Research in Deep Learning is often expensive especially due to large computation and storage requirements. GPU computations are cheaper (as compared to the alternative 10 years ago) but they are still not affordable to researchers/programmers who do not have access to advanced research labs. How to get started with understanding Deep Learning if you are in such situations?
I intend to share my experiments through the series of posts about doing DL in frugal way, spending minimum while learning as much as I could. Let us start with experimenting & evaluating the Google Inception code,
As first step towards the experimentation, you need to setup the Caffe framework for image classification. We can benchmark the task of image generation (Google inceptionism/ deep dreams) using the pre-trained bvlc_googlenet which is rained on ImageNet dataset but you can choose other pre-trained models.
I have relied on pre-trained network as I don't have the computational capacity to train big networks. But for any serious experimentation such as training with different parameters/data-sets, you would need to have access to GPU computing.
If you follow the tutorial correctly, you can setup your own demo on Amazon EC2 server and access it with a URL something like this
https://url-of-your-free-tier-instance:8888/notebooks/deepdream/dream.ipynb
You should make changes in the IPython notebook, to better understand how the code works. For example, I changed the default seed image from sky to the image of Pune university building. You can change seed image to any image of your choice.
You can also evaluate image generation by changing activation of either lower or higher layer. You should experiment by generating images with tweaked parameters to visualize how deeper network literally learns low-level features in shallow layers.
Following two images are generated with a customized Inceptionism code. Among the two images, one is produced as a result of giving more importance to lower layers training (maximizing the L2 activation of deep CNN's lower layers) and the second is for higher layers.
As we can see that lower level features such as edges are highlighted. Now if we give the same seed image and generate an image with focus on higher level features, then we see an image like this.
As you would probably notice that you see a lot of apparitions of animals. This is due to the use of model that is pre-trained on ImageNet dataset. ImageNet has predominantly animals pictures. If we use a models that is trained on image dataset with pictures of places or monuments, the apparitions of building, domes etc appear in generated image.
I intend to share my experiments through the series of posts about doing DL in frugal way, spending minimum while learning as much as I could. Let us start with experimenting & evaluating the Google Inception code,
Pre-trained Models For Deep Learning
One of the best options is to use pre-trained models provided by communities such as Caffe Model Zoo. I have used the pre-trained model to visualize CNNs on Amazon free tier EC2 instance. You can find a short tutorial to setup a Google Inception demo on Amazon EC2 here.As first step towards the experimentation, you need to setup the Caffe framework for image classification. We can benchmark the task of image generation (Google inceptionism/ deep dreams) using the pre-trained bvlc_googlenet which is rained on ImageNet dataset but you can choose other pre-trained models.
I have relied on pre-trained network as I don't have the computational capacity to train big networks. But for any serious experimentation such as training with different parameters/data-sets, you would need to have access to GPU computing.
If you follow the tutorial correctly, you can setup your own demo on Amazon EC2 server and access it with a URL something like this
https://url-of-your-free-tier-instance:8888/notebooks/deepdream/dream.ipynb
You should make changes in the IPython notebook, to better understand how the code works. For example, I changed the default seed image from sky to the image of Pune university building. You can change seed image to any image of your choice.
You can also evaluate image generation by changing activation of either lower or higher layer. You should experiment by generating images with tweaked parameters to visualize how deeper network literally learns low-level features in shallow layers.
Following two images are generated with a customized Inceptionism code. Among the two images, one is produced as a result of giving more importance to lower layers training (maximizing the L2 activation of deep CNN's lower layers) and the second is for higher layers.
As we can see that lower level features such as edges are highlighted. Now if we give the same seed image and generate an image with focus on higher level features, then we see an image like this.
As you would probably notice that you see a lot of apparitions of animals. This is due to the use of model that is pre-trained on ImageNet dataset. ImageNet has predominantly animals pictures. If we use a models that is trained on image dataset with pictures of places or monuments, the apparitions of building, domes etc appear in generated image.
Comments
Post a Comment