Presently, as you have got some insights into deep learning, let us get an overview of what is Caffe.
Let us get familiar with the cycle for training a CNN for classifying pictures. The process comprises of the following steps −
Data Preparation − In this step, we center-crop the pictures and resize them so that all pictures for training and testing would be of the similar size. This is normally done by running a small Python script on the picture data.
Model Definition − In this progression, we characterize a CNN architecture. The configuration is stored in .pb (protobuf) file. A typical CNN architecture is appeared in figure below.
Solver Definition − We characterize the solver configuration file. Solver does the model optimization.
Model Training − We utilize the built-in Caffe utility to train the model. The training may take a considerable amount of time and CPU usage. After the training is finished, Caffe stores the model in a file, which can later on be utilized on test data and final deployment for expectations.
In Caffe2, you would discover many ready-to-use pre-trained models and also leverage the community contributions of new models and algorithms quite frequently. The models that you create can scale up easily utilizing the GPU power in the cloud and also can be brought down to the utilization of masses on mobile with its cross-platform libraries.
The improvements made in Caffe2 over Caffe may be summed up as follows −
The Berkeley Vision and Learning Center (BVLC) site gives demos of their pre- trained networks. One such network for picture classification is available on the link stated herewith https://caffe2.ai/docs/learn-more#null__caffe-neural-network-for-image-classification and is depicted in the screenshot below.
In the screenshot, the picture of a dog is classified and labelled with its prediction accuracy. It also says that it took just 0.068 seconds to classify the picture. You may try a picture of your own choice by specifying the image URL or uploading the picture itself in the options given at the bottom of the screen.