Define a neural network to work with full resolution images

Assignment Help Python Programming
Reference no: EM133129674

The PlantVillage dataset consists of healthy and unhealthy leaf images divided into different categories by species and disease.

"We will work with a subset of the dataset, we will be interested on classify leaf images to different species (we don't look to diseases). We provide the functions needed to download and start working with the dataset.

In this CAE you will need to:
 - Classify the images with BoF + SVN approach
 - Classify the images with a CNN algorithm using pytorch
 - Use an AutoML system to train a CNN

Once the previous cell has finished you should see the dataset in Colab. Please explore the left menu to see the Dataset. Particularly you can see the color images that we will use in the notebook in:

Part 1:

Question 1 Analyze the data provided:
 - How many images are in the test and train datasets?
 - How many categories are in the data provided? Which ones?
 - Do we have equal number of samples for each c

Question 2 Please load and display one image using cv2_imshow function:

Part 2:

Question 1 Compute the Bag of Features (BoF) from the **training** dataset, you can use all the code needed from the reference notebook. Use a dictionary of **70 features** to train the BOWKMeansTrainer.

You can create multiple cells to ease the execution of the differents parts involved

Question 2 Use a Support Vector Machines (SVM) classifier from the Scikit-learn library to train a classifier based on the BoW features computed in Question 1.

Question 3 Now load the test dataset and check the performance on the test set of the SVM trained on the previous training set.

Question 4 Analyze the results obtained. Which method obtains better results? It is more important the results obtained in the train or the test dataset?

Question 5 In the Machine Learning chapter we have seen alternatives to SVM to build different kinds of classifiers. Can you use the sklearn library to build a classifier that obtains similar results than the SVM trained before?

Part 3:

Question 1 The reference notebook uses the MNIST dataset that is integrated with pytorch. The Plant Village Dataset that we are using doesn't have the Dataloader prepared.

To be able to do a deep learning classifier with pytorch we have to create the Dataloader. We want to use the same network than the one done in the reference notebook. To do so, we need to design the Dataloader as follow:,
" - Use the CustomImageDataset structure from [pytorch tutorial]
" - We want to reuse the network from the 5_2_imageClassification_CNN_MNIST. To do so the Dataloader has to:,
" - **resize** the images to 28x28,
" - transform them to **grayscale**,
" - convert them to **float 32**,

Question 2 Once we have the dataloader prepared we can train the network from

Question 3 Analize the results obtained until this point. How is the train / test loss evolution? How the CNN results of exercise 2 compare to SVM results from exercise 1

Question 4 Adapt the Dataloader to work with the full resolution image. We expect:,
" - Images with the full resolution 256 x 256 pixels,
" - Work with RGB images ( 3 channels ),
" - Convert the images to float32 tensors"

Question 5 Define a neural network to work with the full resolution images. Train it using the same train and test functions defined above. You can propose any network in this part, whether starting from a known architecture or adding layers manually until getting the correct network shape.

Question 6 Compare the results obtained with the low and high resolution dataset. Does the high resolution dataset improve the results significantly?

Part 4:

Question 1: Study the tutorial on [image classification]. Build an AutoML model using this example as a reference.

Question 2 Analyse the results obtained with autokeras and compare them with the other ML solutions developed in this notebook. Which structure has the model generated with autokeras? Which obtains better results? Would you consider AutoML models for future use before training and personalizing models in other libraries?

Attachment:- Image_classification.rar

Reference no: EM133129674

Questions Cloud

Elastic in a reasonable range : Juniper's best-selling product sells for $75 and, although it currently produces 475,000 of these each year, it has capacity to produce 50,000 more. Its researc
Determine the country foreign exchange rate : Discuss how demand and supply in Jamaica affect and determine the country's foreign exchange rate.
Apartment units in major urban areas : Affordable housing has become one of the most important policy questions facing all levels of government. Some proponents have recommended setting limits to ren
Discussing stereotypes regarding the elderly population : This week, we are discussing stereotypes regarding the elderly population. These stereotypes go both ways, and we see it constantly in today's society (look at
Define a neural network to work with full resolution images : In the Machine Learning chapter we have seen alternatives to SVM to build different kinds of classifiers. Can you use the sklearn library to build a classifier
Summer? abroad-moscow to mumbai : After spending a week in? Moscow, you get an email from your friend in India. He can get you a really good deal on a plane ticket and wants
Article relates to economic concepts : Find a news article that discusses a topic covered in one the first 3 modules (Fundamentals, Demand & Supply, or Market Equilibrium & Policy) and provide the fo
Which error in reasoning did the anchor make : While reporting on the accident Bob witnessed, a news anchor mentions that a lot of accidents lately have involved green cars. He conclues green cars are accide
Estimate the company cost function : The Big Horn Corporation commissioned an economics consultant to estimate the company's cost function. The consultant collected a large amount of data for sever

Reviews

len3129674

4/21/2022 9:57:03 PM

I need to solve this pattern-recognition Please answer all questions whether its python or explanation.

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd