Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
TensorFlow Machine Learning Projects

You're reading from   TensorFlow Machine Learning Projects Build 13 real-world projects with advanced numerical computations using the Python ecosystem

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781789132212
Length 322 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Ankit Jain Ankit Jain
Author Profile Icon Ankit Jain
Ankit Jain
Dr. Amita Kapoor Dr. Amita Kapoor
Author Profile Icon Dr. Amita Kapoor
Dr. Amita Kapoor
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Overview of TensorFlow and Machine Learning FREE CHAPTER 2. Using Machine Learning to Detect Exoplanets in Outer Space 3. Sentiment Analysis in Your Browser Using TensorFlow.js 4. Digit Classification Using TensorFlow Lite 5. Speech to Text and Topic Extraction Using NLP 6. Predicting Stock Prices using Gaussian Process Regression 7. Credit Card Fraud Detection using Autoencoders 8. Generating Uncertainty in Traffic Signs Classifier Using Bayesian Neural Networks 9. Generating Matching Shoe Bags from Shoe Images Using DiscoGANs 10. Classifying Clothing Images using Capsule Networks 11. Making Quality Product Recommendations Using TensorFlow 12. Object Detection at a Large Scale with TensorFlow 13. Generating Book Scripts Using LSTMs 14. Playing Pacman Using Deep Reinforcement Learning 15. What is Next? 16. Other Books You May Enjoy

Building a Bayesian neural network


For this project, we will use the German Traffic Sign Dataset (http://benchmark.ini.rub.de/?section=gtsrb&subsection=dataset) to build a Bayesian neural network. The training dataset contains 26,640 images in 43 classes. Similarly, the testing dataset contains 12,630 images.

Note

Please read the README.md file in this book's repository before executing the code to install the appropriate dependencies and for instructions on how to run the code.

The following is an image that's present in this dataset: 

You can see that there are different kinds of traffic sign depicted by different classes in the dataset.

We begin by pre-processing our dataset and making it conform to the requirements of the learning algorithm. This is done by reshaping the images to a uniform size via histogram equalization, which is used to enhance contrast, and cropping them to only focus on the traffic signs in the image. Also, we convert the images to grayscale as traffic signs...

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 $19.99/month. Cancel anytime