Putting it all together

In the following code block, you can find the code that has been used in this section:

using Images, MXNet, ImageView# Loading a single image from the folderIMAGES_PATH = "data/train"single_img = load(joinpath(IMAGES_PATH, "cat.1.jpg"))size(single_img)imshow(single_img)preview_img = zeros(100, 0);for i = 1:10    seq_x_img = vcat(        imresize(load(joinpath(IMAGES_PATH, "cat.$i.jpg")), (50, 50)),        imresize(load(joinpath(IMAGES_PATH, "dog.$i.jpg")), (50, 50))    )    preview_img = hcat(preview_img, seq_x_img)endimshow(preview_img)### PREPARING THE DATASETfiles = readdir(IMAGES_PATH);data_x = zeros((32, 32, 3, size(files, 1)));data_y = zeros(size(files, 1));for idx = 1:size(files, 1)    file_name = joinpath(IMAGES_PATH, files[idx]) if ...

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.