Introduction
Keras is a popular deep learning api. It can run on top of Tensorflow, CNTK and Theano frameworks. Keras provides an easy to use interface which makes deep learning practice straight forward. It is widely used thus resources are easily accessible.
Objective
This article aims to give an introductory information about using a Keras trained CNN model for inference. This article does not contain information about CNN training.Audience
This article assumes introductory information about python and Convolutional Neural Networks. For those who lack information may first begin with information from following resources.- For python use Python For Beginners
- For Convolutional Neural Networks use CS231n Convolutional Neural Networks for Visual Recognition
Software Installation
Keras is a high level API. It requires a back-end framework to be installed. In this article, Tensorflow is used. Keras can transparently select CPU or GPU for processing. If use of GPU is desired, assuming presence of a proper graphics card with a decent GPU, relevant drivers needs to be installed.Installation is not a simple procedure. Prepare a Ubuntu System for Deep Learning can be read for installation details.
Trained Models
Training a CNN model requires specialization, a lot of data and decent hardware. Transfer learning may simplify those requirements but it is not in the scope of this article.Keras provides already trained models. Trained models and information about how to use them can be found in Keras Applications. Those models are trained using Imagenet dataset.
Additional models can be found in my GitHub page which are created as part of my emotion recognition study. Model files can be found at deep-emotion-recognition repository. Those models are trained using FER-13 dataset which contains 7 emotions. Rest of the article uses emotion recognition models from my GitHub page.
Application Code
Processing Pipeline |
For dataset either original dataset can be downloaded from original Kaggle page or from repository under dataset directory. Also note that the application only uses images found under Val directory.
Additional emotion datasets can be used. Some example datasets are:
- SFEW dataset which can be obtained upon request. For details see https://cs.anu.edu.au/few/AFEW.html.
- CK/CK+ dataset which can be obtained freely after accepting terms of use. For details see http://www.consortium.ri.cmu.edu/ckagree/.
this blog is very good.sharing more like this type of blog.many important points are there.thank you.
ReplyDeletePython Training Institute in Chennai
Amazon web services Training in Chennai
Python Training in Anna nagar
Python Training in T nagar
It's helpful for me my friend. Also great blog here with all of the valuable information you have.
ReplyDeleteCyber Security Training Course in Chennai | Certification | Cyber Security Online Training Course | Ethical Hacking Training Course in Chennai | Certification | Ethical Hacking Online Training Course |
CCNA Training Course in Chennai | Certification | CCNA Online Training Course | RPA Robotic Process Automation Training Course in Chennai | Certification | RPA Training Course Chennai | SEO Training in Chennai | Certification | SEO Online Training Course