329 lines
8.9 KiB
HTML
329 lines
8.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
|
|
<head>
|
|
<meta name="generator" content="Hugo 0.95.0" />
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="Monday # Towards the end of last week ( Week 7), I managed to refactor my code in order to make it more portable. This allowed me to train my model on different machines. I ran my training script on the uni’s GPU compute successfully for 20 epochs. The next stage was to train it for longer and analyse the results. On the Monday morning I adjusted the parameters of my training script to train for 2000 epochs instead.">
|
|
<meta name="theme-color" content="#FFFFFF"><meta property="og:title" content="Week 8" />
|
|
<meta property="og:description" content="Monday # Towards the end of last week ( Week 7), I managed to refactor my code in order to make it more portable. This allowed me to train my model on different machines. I ran my training script on the uni’s GPU compute successfully for 20 epochs. The next stage was to train it for longer and analyse the results. On the Monday morning I adjusted the parameters of my training script to train for 2000 epochs instead." />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://mmp.oscar.blue/posts/week-8/" /><meta property="article:section" content="posts" />
|
|
<meta property="article:published_time" content="2022-03-27T13:13:48+01:00" />
|
|
<meta property="article:modified_time" content="2022-03-27T13:13:48+01:00" />
|
|
|
|
<title>Week 8 | MMP | Oscar Pocock</title>
|
|
<link rel="manifest" href="/manifest.json">
|
|
<link rel="icon" href="/favicon.png" type="image/x-icon">
|
|
<link rel="stylesheet" href="/book.min.68be0b7a9674f2a612ce0e9b2e9447ff4b7ac96546e06b642bfd3ded0ca490ef.css" integrity="sha256-aL4LepZ08qYSzg6bLpRH/0t6yWVG4GtkK/097QykkO8=">
|
|
<script defer src="/en.search.min.6bd18a0f048eff9ca273fd5ac40fe7159f145a30edf28a0847cab90265bd241a.js" integrity="sha256-a9GKDwSO/5yic/1axA/nFZ8UWjDt8ooIR8q5AmW9JBo="></script>
|
|
|
|
<script defer src="/sw.min.6f6f90fcb8eb1c49ec389838e6b801d0de19430b8e516902f8d75c3c8bd98739.js" integrity="sha256-b2+Q/LjrHEnsOJg45rgB0N4ZQwuOUWkC+NdcPIvZhzk="></script>
|
|
<!--
|
|
Made with Book Theme
|
|
https://github.com/alex-shpak/hugo-book
|
|
-->
|
|
|
|
|
|
</head>
|
|
|
|
<body dir="ltr">
|
|
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
|
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
|
<main class="container flex">
|
|
<aside class="book-menu">
|
|
<div class="book-menu-content">
|
|
|
|
<nav>
|
|
<h2 class="book-brand">
|
|
<a href="/"><span>MMP | Oscar Pocock</span>
|
|
</a>
|
|
</h2>
|
|
|
|
|
|
<div class="book-search">
|
|
<input type="text" id="book-search-input" placeholder="Search" aria-label="Search" maxlength="64" data-hotkeys="s/" />
|
|
<div class="book-search-spinner hidden"></div>
|
|
<ul id="book-search-results"></ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li class="book-section-flat" >
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://mmp.oscar.blue/docs/developer/" class="">Developer Documentation</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="book-section-flat" >
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://mmp.oscar.blue/docs/user/" class="">User Documentation</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="/posts/" >
|
|
Blog
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://teaching.dcs.aber.ac.uk/mmp" target="_blank" rel="noopener">
|
|
Aberystwyth MMP Site
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://git.oscar.blue" target="_blank" rel="noopener">
|
|
Source Code
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<script>(function(){var e=document.querySelector("aside.book-menu nav");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
<div class="book-page">
|
|
<header class="book-header">
|
|
|
|
<div class="flex align-center justify-between">
|
|
<label for="menu-control">
|
|
<img src="/svg/menu.svg" class="book-icon" alt="Menu" />
|
|
</label>
|
|
|
|
<strong>Week 8</strong>
|
|
|
|
<label for="toc-control">
|
|
|
|
<img src="/svg/toc.svg" class="book-icon" alt="Table of Contents" />
|
|
|
|
</label>
|
|
</div>
|
|
|
|
|
|
|
|
<aside class="hidden clearfix">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#monday">Monday</a></li>
|
|
<li><a href="#tuesday">Tuesday</a>
|
|
<ul>
|
|
<li><a href="#training-and-validation-loss-graphs">Training and validation loss graphs</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#wednesday">Wednesday</a></li>
|
|
<li><a href="#rest-of-week">Rest of week</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<article class="markdown">
|
|
<h1>
|
|
<a href="/posts/week-8/">Week 8</a>
|
|
</h1>
|
|
|
|
<h5>March 27, 2022</h5>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h1 id="monday">
|
|
Monday
|
|
<a class="anchor" href="#monday">#</a>
|
|
</h1>
|
|
<p>Towards the end of last week (
|
|
<a href="../week-7">Week 7</a>), I managed to refactor my code in order to make it more portable. This allowed me to train my model on different machines. I ran my training script on the uni’s GPU compute successfully for 20 epochs. The next stage was to train it for longer and analyse the results. On the Monday morning I adjusted the parameters of my training script to train for 2000 epochs instead.</p>
|
|
<h1 id="tuesday">
|
|
Tuesday
|
|
<a class="anchor" href="#tuesday">#</a>
|
|
</h1>
|
|
<p>Tuesday afternoon the training had finished and I had a model that was trained on 2000 epochs. This gave me a day to analyse the results and do some rough predictions before my mid-project demo on the Wednesday.</p>
|
|
<h2 id="training-and-validation-loss-graphs">
|
|
Training and validation loss graphs
|
|
<a class="anchor" href="#training-and-validation-loss-graphs">#</a>
|
|
</h2>
|
|
<p>
|
|
<img src="/20-epoch-plot.png" alt="training and validation loss 20 epochs" />
|
|
|
|
<img src="/2000-epoch-plot.png" alt="training and validation loss 2000 epochs" /></p>
|
|
<p>As we can see from the 2000 Epochs graph, the loss seems to plateau at around 60 epochs. The training loss seems to even out with more accuracy than the validation loss. This means that our data isn’t fully learning what I want it to. Also it’s overfitting slightly as it’s better at predicting the training set than the validation set. The variance in the validation set shows that the features it’s decided to learn aren’t the right features to confidently predict aesthetics in this dataset.</p>
|
|
<p>For the rest of the day I worked on my prediction script so I could use the model to predict new pictures. I also worked on my architecture diagrams and slides for the mid-project demo.</p>
|
|
<p>
|
|
<img src="/predictions.png" alt="images with prediction scores" /></p>
|
|
<p>Due to the nature of how I processed my images (resizing them to 32x32 and then saving them to a tensor then saving them to disk), my prediction script also displayed those down-sized images. This may have also effected the performance of the model.</p>
|
|
<h1 id="wednesday">
|
|
Wednesday
|
|
<a class="anchor" href="#wednesday">#</a>
|
|
</h1>
|
|
<p>I spent most of Wednesday morning finishing my slides, diagrams and making example predictions using the prediction script.</p>
|
|
<p>
|
|
<img src="/project-model.svg" alt="overall project architecture" /></p>
|
|
<h1 id="rest-of-week">
|
|
Rest of week
|
|
<a class="anchor" href="#rest-of-week">#</a>
|
|
</h1>
|
|
<p>I spent the rest of the week looking at the project’s overall pipeline including the non-machine learning filtering. I also started to implement basic focus detection by looking at blur detection using the Laplacian operator<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>.</p>
|
|
<section class="footnotes" role="doc-endnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn:1" role="doc-endnote">
|
|
<p>
|
|
<a href="https://pyimagesearch.com/2015/09/07/blur-detection-with-opencv/">https://pyimagesearch.com/2015/09/07/blur-detection-with-opencv/</a> <a href="#fnref:1" class="footnote-backref" role="doc-backlink">↩︎</a></p>
|
|
</li>
|
|
</ol>
|
|
</section>
|
|
</article>
|
|
|
|
|
|
|
|
<footer class="book-footer">
|
|
|
|
<div class="flex flex-wrap justify-between">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
<div class="book-comments">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
|
</div>
|
|
|
|
|
|
<aside class="book-toc">
|
|
<div class="book-toc-content">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#monday">Monday</a></li>
|
|
<li><a href="#tuesday">Tuesday</a>
|
|
<ul>
|
|
<li><a href="#training-and-validation-loss-graphs">Training and validation loss graphs</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#wednesday">Wednesday</a></li>
|
|
<li><a href="#rest-of-week">Rest of week</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|