Trystan  Doyle

Trystan Doyle

1598625480

OCR: Handwriting recognition with OpenCV, Keras, and TensorFlow

In this tutorial, you will learn how to perform OCR handwriting recognition using OpenCV, Keras, and TensorFlow.

#tensorflow #keras #opencv

What is GEEK

Buddha Community

OCR: Handwriting recognition with OpenCV, Keras, and TensorFlow
Trystan  Doyle

Trystan Doyle

1598625480

OCR: Handwriting recognition with OpenCV, Keras, and TensorFlow

In this tutorial, you will learn how to perform OCR handwriting recognition using OpenCV, Keras, and TensorFlow.

#tensorflow #keras #opencv

Hello Jay

Hello Jay

1594439145

Keras vs. OpenCV - Differences Between Keras and OpenCV

OpenCV is the open-source library for computer vision and image processing tasks in machine learning. OpenCV provides a huge suite of algorithms and aims at real-time computer vision. Keras, on the other hand, is a deep learning framework to enable fast experimentation with deep learning. In this Keras Tutorial, we will learn about Keras Vs OpenCV.

Keras Vs OpenCV

First, we will see both the technologies, their application, and then the differences between keras and OpenCv.

About OpenCV

Computer Vision is defined for understanding meaningful descriptions of physical objects from the image.

OpenCV was built to provide an infrastructure for computer vision. This library has a huge range of optimized machine learning and computer vision algorithms. These algorithms include object identification, detecting and recognizing faces, object movement tracking, etc. OpenCV provides support for C++, Python, Java and MATLAB programming languages and works on Windows, Linux, Android and Mac Operating Systems.

The common features in OpenCV are read and write images, save and capture images/videos, filter or transform the image, detecting faces,eyes,cars in images or videos, perform feature detection, background subtraction, and tracking objects.

Applications of OpenCV

  • In Robotics, OpenCV is useful in domains like navigation, obstacle avoiding, and in human-robot interaction.
  • In the medical industry it is useful for classification and detection of diseases, for analyzing brain MRI scans and in surgeries.
  • For security purposes, like in biometric scan and video surveillance.
  • In transportation and autonomous vehicles, self-driving cars.

#keras tutorials #keras vs opencv #keras #opencv

Hello Jay

Hello Jay

1594525380

Keras vs. Tensorflow - Difference Between Tensorflow and Keras

Keras and Tensorflow are two very popular deep learning frameworks. Deep Learning practitioners most widely use Keras and Tensorflow. Both of these frameworks have large community support. Both of these frameworks capture a major fraction of deep learning production.

Which framework is better for us then?

This blog will be focusing on Keras Vs Tensorflow. There are some differences between Keras and Tensorflow, which will help you choose between the two. We will provide you better insights on both these frameworks.

What is Keras?

Keras is a high-level API built on the top of a backend engine. The backend engine may be either TensorFlow, theano, or CNTK. It provides the ease to build neural networks without worrying about the backend implementation of tensors and optimization methods.

Fast prototyping allows for more experiments. Using Keras developers can convert their algorithms into results in less time. It provides an abstraction overs lower level computations.

Major Applications of Keras

  • The performance of Keras is smooth on both CPU and GPU.
  • Keras provides modularity, flexibility to code, extensibility, and has an adaptation for innovation and research.
  • The pythonic nature of Keras makes it easy to explore and debug the code.

What is Tensorflow?

Tensorflow is a tool designed by Google for the deep learning developer community. The aim of TensorFlow was to make deep learning applications accessible to the people. It is an open-source library available on Github. It is one of the most famous libraries to experiment with deep learning. The popularity of TensorFlow is because of the ease of building and deployment of neural net models.

Major area of focus here is numerical computation. It was built keeping the processing computation power in mind. Therefore we can run TensorFlow applications on almost kind of computer.

Major applications of Tensorflow

  • From mobiles to embedded devices and distributed servers Tensorflow runs on all the platforms.
  • Tensorflow is the enterprise of solving real-world and real-time problems like image analysis, robotics, generating data, and NLP.
  • Developers are implementing tools for translation languages and the detection of skin cancers using Tensorflow.
  • Major projects using TensorFlow are Google translate, video detection, image recognition.

#keras tutorials #keras vs tensorflow #keras #tensorflow

Face Mask Detection System Using OpenCV and Tensorflow

Face Mask Detection

Face Mask Detection System built with OpenCV, Keras/TensorFlow using Deep Learning and Computer Vision concepts in order to detect face masks in static images as well as in real-time video streams.

Motivation

Amid the ongoing COVID-19 pandemic, there are no efficient face mask detection applications which are now in high demand for transportation means, densely populated areas, residential districts, large-scale manufacturers and other enterprises to ensure safety. The absence of large datasets of ‘with_mask’ images has made this task cumbersome and challenging.

Features

Our face mask detector doesn't use any morphed masked images dataset and the model is accurate. Owing to the use of MobileNetV2 architecture, it is computationally efficient, thus making it easier to deploy the model to embedded systems (Raspberry Pi, Google Coral, etc.).

This system can therefore be used in real-time applications which require face-mask detection for safety purposes due to the outbreak of Covid-19. This project can be integrated with embedded systems for application in airports, railway stations, offices, schools, and public places to ensure that public safety guidelines are followed.

Dataset

The dataset used can be downloaded here - Click to Download

This dataset consists of 4095 images belonging to two classes:

  • with_mask: 2165 images
  • without_mask: 1930 images

The images used were real images of faces wearing masks. The images were collected from the following sources:

Prerequisites

All the dependencies and required libraries are included in the file requirements.txt See here

🚀  Installation

  1. Clone the repo
$ git clone https://github.com/chandrikadeb7/Face-Mask-Detection.git

2.    Change your directory to the cloned repo

$ cd Face-Mask-Detection

3.     Create a Python virtual environment named 'test' and activate it

$ virtualenv test
$ source test/bin/activate

4.    Now, run the following command in your Terminal/Command Prompt to install the libraries required

$ pip3 install -r requirements.txt

Working

  1. Open terminal. Go into the cloned project directory and type the following command:
$ python3 train_mask_detector.py --dataset dataset

2.    To detect face masks in an image type the following command:

$ python3 detect_mask_image.py --image images/pic1.jpeg

3.    To detect face masks in real-time video streams type the following command:

$ python3 detect_mask_video.py 

Results

Our model gave 98% accuracy for Face Mask Detection after training via tensorflow-gpu==2.5.0

 

We got the following accuracy/loss training curve plot

Streamlit app

Face Mask Detector webapp using Tensorflow & Streamlit

command

$ streamlit run app.py 

Images

Upload Images

Results

Internet of Things Device Setup

Expected Hardware

Getting Started

Raspberry Pi App Installation & Execution

Run these commands after cloning the project

CommandsTime to completion
sudo apt install -y libatlas-base-dev liblapacke-dev gfortran1min
sudo apt install -y libhdf5-dev libhdf5-1031min
pip3 install -r requirements.txt1-3 mins
wget "https://raw.githubusercontent.com/PINTO0309/Tensorflow-bin/master/tensorflow-2.4.0-cp37-none-linux_armv7l_download.sh"less than 10 secs
./tensorflow-2.4.0-cp37-none-linux_armv7l_download.shless than 10 secs
pip3 install tensorflow-2.4.0-cp37-none-linux_armv7l.whl1-3 mins

Awards

Awarded Runners Up position in Amdocs Innovation India ICE Project Fair

Cited by:

  1. https://osf.io/preprints/3gph4/
  2. https://link.springer.com/chapter/10.1007/978-981-33-4673-4_49
  3. https://ieeexplore.ieee.org/abstract/document/9312083/
  4. https://link.springer.com/chapter/10.1007/978-981-33-4673-4_48
  5. https://www.researchgate.net/profile/Akhyar_Ahmed/publication/344173985_Face_Mask_Detector/links/5f58c00ea6fdcc9879d8e6f7/Face-Mask-Detector.pdf

👏 Appreciation

Selected in Devscript Winter Of Code

Selected in Script Winter Of Code

Seleted in Student Code-in

:+1: Credits

:handshake: Contribution

Please read the Contribution Guidelines here

Feel free to file a new issue with a respective title and description on the the Face-Mask-Detection repository. If you already found a solution to your problem, I would love to review your pull request!

:handshake: Our Contributors

 

Code of Conduct

You can find our Code of Conduct here.

Citation

You are allowed to cite any part of the code or our dataset. You can use it in your Research Work or Project. Remember to provide credit to the Maintainer Chandrika Deb by mentioning a link to this repository and her GitHub Profile.

Follow this format:

  • Author's name - Chandrika Deb
  • Date of publication or update in parentheses.
  • Title or description of document.
  • URL.

Live Demo

Download Details:
Author: chandrikadeb7
Source Code: https://github.com/chandrikadeb7/Face-Mask-Detection
License: MIT License

#python  #opencv #deep-learning #opencv #tensorflow #keras #computervision 

Keras Tutorial - Ultimate Guide to Deep Learning - DataFlair

Welcome to DataFlair Keras Tutorial. This tutorial will introduce you to everything you need to know to get started with Keras. You will discover the characteristics, features, and various other properties of Keras. This article also explains the different neural network layers and the pre-trained models available in Keras. You will get the idea of how Keras makes it easier to try and experiment with new architectures in neural networks. And how Keras empowers new ideas and its implementation in a faster, efficient way.

Keras Tutorial

Introduction to Keras

Keras is an open-source deep learning framework developed in python. Developers favor Keras because it is user-friendly, modular, and extensible. Keras allows developers for fast experimentation with neural networks.

Keras is a high-level API and uses Tensorflow, Theano, or CNTK as its backend. It provides a very clean and easy way to create deep learning models.

Characteristics of Keras

Keras has the following characteristics:

  • It is simple to use and consistent. Since we describe models in python, it is easy to code, compact, and easy to debug.
  • Keras is based on minimal substructure, it tries to minimize the user actions for common use cases.
  • Keras allows us to use multiple backends, provides GPU support on CUDA, and allows us to train models on multiple GPUs.
  • It offers a consistent API that provides necessary feedback when an error occurs.
  • Using Keras, you can customize the functionalities of your code up to a great extent. Even small customization makes a big change because these functionalities are deeply integrated with the low-level backend.

Benefits of using Keras

The following major benefits of using Keras over other deep learning frameworks are:

  • The simple API structure of Keras is designed for both new developers and experts.
  • The Keras interface is very user friendly and is pretty optimized for general use cases.
  • In Keras, you can write custom blocks to extend it.
  • Keras is the second most popular deep learning framework after TensorFlow.
  • Tensorflow also provides Keras implementation using its tf.keras module. You can access all the functionalities of Keras in TensorFlow using tf.keras.

Keras Installation

Before installing TensorFlow, you should have one of its backends. We prefer you to install Tensorflow. Install Tensorflow and Keras using pip python package installer.

Starting with Keras

The basic data structure of Keras is model, it defines how to organize layers. A simple type of model is the Sequential model, a sequential way of adding layers. For more flexible architecture, Keras provides a Functional API. Functional API allows you to take multiple inputs and produce outputs.

Keras Sequential model

Keras Functional API

It allows you to define more complex models.

#keras tutorials #introduction to keras #keras models #keras tutorial #layers in keras #why learn keras