Book Image

Hands-On Computer Vision with Julia

By : Dmitrijs Cudihins
Book Image

Hands-On Computer Vision with Julia

By: Dmitrijs Cudihins

Overview of this book

Hands-On Computer Vision with Julia is a thorough guide for developers who want to get started with building computer vision applications using Julia. Julia is well suited to image processing because it’s easy to use and lets you write easy-to-compile and efficient machine code. . This book begins by introducing you to Julia's image processing libraries such as Images.jl and ImageCore.jl. You’ll get to grips with analyzing and transforming images using JuliaImages; some of the techniques discussed include enhancing and adjusting images. As you make your way through the chapters, you’ll learn how to classify images, cluster them, and apply neural networks to solve computer vision problems. In the concluding chapters, you will explore OpenCV applications to perform real-time computer vision analysis, for example, face detection and object tracking. You will also understand Julia's interaction with Tesseract to perform optical character recognition and build an application that brings together all the techniques we introduced previously to consolidate the concepts learned. By end of the book, you will have understood how to utilize various Julia packages and a few open source libraries such as Tesseract and OpenCV to solve computer vision problems with ease.
Table of Contents (11 chapters)
9
Assessments

Multiclass classification with the CIFAR-10 dataset

The CIFAR-10 dataset consists of 60,000 32x32 colorful images in 10 classes, with 6,000 images per class. There are 50,000 training images and 10,000 test images.

Getting and previewing the dataset

Similar to the preceding example, we will use the MLDatasets package to retrieve the CIFAR10 dataset. Let's start by loading the package and having a quick look at the data:

using Images, ImageView, MLDatasets, MXNet

train_x, train_y = CIFAR10.traindata()
test_x, test_y = CIFAR10.testdata()
size(train_x)
# Main> (32, 32, 3, 50000)

size(train_y)
# Main> (50000,)

join(unique(train_y), ", ")
# Main> "6, 9, 4, 1, 2, 7, 8, 3, 5, 0"

We have used the size function...