COMP 0137作业代做、Python实验作业代写、代做Python语言程序作业、代写Machine Vision作业
COMP 0137 Machine Vision: Homework #1Due 19th November 2018 at 23:55pmWorth 10% of your overall gradeSubmit online, through MoodleFor this homework, we’ll revisit the practical from the 3rd week: Mixtures of Gaussians.There are two parts (plus optional extra credit), so please read the instructions carefully.Everything you turn in must be YOUR OWN WORK, with one exception (in this case): thenew images and their ground truth mask images. See below for more details, but as always,list names/references for anything you’re submitting that is not your own work.Late Policy: We must follow the official UCL late-policy, and this gets applied *after* yourcoursework is marked on Moodle, based on the Moodle timestamps. The instructor/TA’shave no control over this – at all:https://www.ucl.ac.uk/academic-manual/chapters/chapter-4-assessment-framework-taught-programmes/section-3-module-assessmentWhat to turn in (all inside one folder, zip’ed inside a single .zip file):- Three jupyter notebooks: for practicalMixGaussA.ipynb; also for B and C, but not D.- Your jupyter notebook for practicalMixGauss_Apples.ipynb- One folder containing your photos of apples- One folder containing image masks for your applesCode/Hints: All code must be python, submitted as jupyter python notebook files (.ipynb),with your explanations interspersed within the notebooks. Do not use other libraries beyond:os, time, sys, numpy, matplotlip, scipy.io, glob, and pillow and/or opencv if you need it.Please use Python 3.6.Part I: A), B), C)Do all the TO DO’s in parts A, B, and C of the Mixtures of Gaussians practical. Some of theTO DO’s are tagged a-j.For every figure or plot that is generated in the code, write 1-3 sentences (maximum)explaining what the figure shows or pros/cons of what is happening, good or bad.It IS NOT SUFFICIENT to just say things like "update the variable." Ok, some things aredeterministic, but explain, to demonstrate you understand why those steps are happening.Examples of things to talk about, in the 1-3 sentences:- Give some analysis about code working/not working out, especially when stochastic.- Discuss where/which results don’t match your expectations. Why? Be specific.- Describe what EACH figure or plot is showing, what it would look like ideally.- Discuss ways some step or experiment could be better / more robust. Validating yourprocess means being thorough, and what would you need to be more thorough?You do NOT need to do the 4th part, practicalMixGaussD.Part II Make a new file, practicalMixGauss_Apples.ipynb.A) Download and unzip the file apples.zip. Notice that for every color photo containingapples, there is a corresponding binary image mask. In a mask image, white pixels indicate(continued on next page…)locations where the corresponding photo is an apple. In floating point, you may need tothreshold to get binary values. Note that these mask images are inexact! While a perfectground-truth mask image’s black pixels should correspond to non-apples, these masks werepainted in a hurry, so the white areas were painted conservatively.# You may want to use this example code, for loading in yourjpg’s and png’s:import globimport numpy as npimport matplotlib.pyplot as pltfiles = glob.glob("apples/*.jpg")ColorImgs = []for myFile in files: im = plt.imread(myFile) ColorImgs.append(im)B) Train a mixture of Gaussians model for distinguishing apple vs. non-apple pixels. Use red,green, and blue as your dimensions for now. Make any other decisions you need to, anddocument them in your jupyter notebook.C) Download the file testApples.zip. Generate figures for your notebook, showing eachpixel’s posterior probability of being “apple.” Comment on the outcomes.D) For the test image with a ground-truth mask, quantify and report your result. Hint:consider applying a range of thresholds to the posterior to produce sets of {True Positives(TP), True Negatives (TN), False Positives (FP), and False Negatives (FN)} and using anROC curve. Learn about ROC on Wikipedia or see Peter Flach’s chapter on the subject.E) Download two non-copyrighted photos with apples (maybehttp://search.creativecommons.org/ or some other source of images that are not copyrighted).Make good ground-truth masks for them. You can use Windows Paint, or more sophisticatedprograms like Gimp (free). Use these as extra test-images. Report your qualitative andquantitative results.F) We should really be using three separate sets of files: a training set, a validation set, and atest set! Explain why.Extra Credit: Put this section at the end of the practicalMixGauss_Apples.ipynb notebook(extra points help you reach a perfect score for the two courseworks only, so a maximum of20% of the overall grade).- Consider manipulating the photographs’ colors to improve the classification- Consider running 2D Gabor filters on the photos to get additional channels of data, inplace or in addition to red, green, and blue.- Consider using an alternate model to mixture of Gaussians, and compare to MoG.因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:
微信:codinghelp