Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Python Artificial Intelligence Projects for Beginners

You're reading from  Python Artificial Intelligence Projects for Beginners

Product type Book
Published in Jul 2018
Publisher Packt
ISBN-13 9781789539462
Pages 162 pages
Edition 1st Edition
Languages
Author (1):
Dr. Joshua Eckroth Dr. Joshua Eckroth
Profile icon Dr. Joshua Eckroth

Identifying handwritten mathematical symbols with CNNs


This sections deals with building a CNN to identify handwritten mathematical symbols. We're going to use the HASYv2 dataset. This contains 168,000 images from 369 different classes where each represents a different symbol. This dataset is a more complex analog compared to the popular MNIST dataset, which contains handwritten numbers.

The following diagram depicts the kind of images that are available in this dataset:

 

And here, we can see a graph showing how many symbols have different numbers of images:

It is observed that many symbols have few images and there are a few that have lots of images. The code to import any image is as follows:

 

We begin by importing the Image class from the IPython library. This allows us to show images inside Jupyter Notebook. Here's one image from the dataset:

This is an image of the alphabet A. Each image is 30 x 30 pixels. This image is in the RGB format even though it doesn't really need to be RGB. The...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}