352 lines
14 KiB
HTML
352 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
|
|
<head>
|
|
<meta name="generator" content="Hugo 0.96.0" />
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="Filming footage # At the start of the week I went into town to film some practise footage to work with later (up until this point I had been experimenting with footage limited by my bedroom walls). I took some basic vertical and horizontal footage of the town - no nature or breach footage yet.
|
|
Gaining more useful information # I used the footage I had recorded at the start of the week and revised my “filesize” code.">
|
|
<meta name="theme-color" content="#FFFFFF"><meta property="og:title" content="Week 3" />
|
|
<meta property="og:description" content="Filming footage # At the start of the week I went into town to film some practise footage to work with later (up until this point I had been experimenting with footage limited by my bedroom walls). I took some basic vertical and horizontal footage of the town - no nature or breach footage yet.
|
|
Gaining more useful information # I used the footage I had recorded at the start of the week and revised my “filesize” code." />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://mmp.oscar.blue/posts/week-3/" /><meta property="article:section" content="posts" />
|
|
<meta property="article:published_time" content="2022-02-20T12:46:55+00:00" />
|
|
<meta property="article:modified_time" content="2022-02-20T12:46:55+00:00" />
|
|
|
|
<title>Week 3 | 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.0c8af0cffc76d081a5a819e52dfdb147c344002d63293b8ad6697c1cbe08a5f2.js" integrity="sha256-DIrwz/x20IGlqBnlLf2xR8NEAC1jKTuK1ml8HL4IpfI="></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 3</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="#filming-footage">Filming footage</a></li>
|
|
<li><a href="#gaining-more-useful-information">Gaining more useful information</a></li>
|
|
<li><a href="#analysing-datasets">Analysing datasets</a></li>
|
|
<li><a href="#11-weekly-meeting">1:1 Weekly meeting</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<article class="markdown">
|
|
<h1>
|
|
<a href="/posts/week-3/">Week 3</a>
|
|
</h1>
|
|
|
|
<h5>February 20, 2022</h5>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h1 id="filming-footage">
|
|
Filming footage
|
|
<a class="anchor" href="#filming-footage">#</a>
|
|
</h1>
|
|
<p>At the start of the week I went into town to film some practise footage to work with later (up until this point I had been experimenting with footage limited by my bedroom walls). I took some basic vertical and horizontal footage of the town - no nature or breach footage yet.</p>
|
|
<h1 id="gaining-more-useful-information">
|
|
Gaining more useful information
|
|
<a class="anchor" href="#gaining-more-useful-information">#</a>
|
|
</h1>
|
|
<p>I used the footage I had recorded at the start of the week and revised my “filesize” code. I made a new function <code>order_frames_by_filesize()</code> which orders the frames by the filesize and prints the name of size of each frame in order.</p>
|
|
<div class="highlight"><div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
|
|
<table style="border-spacing:0;padding:0;margin:0;border:0;"><tr><td style="vertical-align:top;padding:0;margin:0;border:0;">
|
|
<pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 1
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 2
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 3
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 4
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 5
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 6
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 7
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 8
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 9
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">10
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">11
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">12
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">13
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">14
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">15
|
|
</span><span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">16
|
|
</span></code></pre></td>
|
|
<td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
|
|
<pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">order_frames_by_filesize</span>():
|
|
</span></span><span style="display:flex;"><span> <span style="color:#e6db74">"""Order the frames by filesize and print the filenames and their sizes"""</span>
|
|
</span></span><span style="display:flex;"><span> frames <span style="color:#f92672">=</span> os<span style="color:#f92672">.</span>listdir(outputfolder)
|
|
</span></span><span style="display:flex;"><span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># sort the frames by their filesize</span>
|
|
</span></span><span style="display:flex;"><span> frames <span style="color:#f92672">=</span> sorted(frames,
|
|
</span></span><span style="display:flex;"><span> key <span style="color:#f92672">=</span> <span style="color:#66d9ef">lambda</span> x: os<span style="color:#f92672">.</span>stat(os<span style="color:#f92672">.</span>path<span style="color:#f92672">.</span>join(outputfolder, x))<span style="color:#f92672">.</span>st_size, reverse <span style="color:#f92672">=</span> <span style="color:#66d9ef">True</span>)
|
|
</span></span><span style="display:flex;"><span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># print every frame and it's size in a human readable format</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">for</span> frame <span style="color:#f92672">in</span> frames:
|
|
</span></span><span style="display:flex;"><span> filesize <span style="color:#f92672">=</span> os<span style="color:#f92672">.</span>stat(os<span style="color:#f92672">.</span>path<span style="color:#f92672">.</span>join(outputfolder, frame))<span style="color:#f92672">.</span>st_size
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">if</span> filesize <span style="color:#f92672">></span> <span style="color:#ae81ff">1024</span>:
|
|
</span></span><span style="display:flex;"><span> filesize <span style="color:#f92672">=</span> filesize <span style="color:#f92672">/</span> <span style="color:#ae81ff">1024</span>
|
|
</span></span><span style="display:flex;"><span> print(frame <span style="color:#f92672">+</span> <span style="color:#e6db74">": "</span> <span style="color:#f92672">+</span> str(filesize) <span style="color:#f92672">+</span> <span style="color:#e6db74">" KB"</span>)
|
|
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">else</span>:
|
|
</span></span><span style="display:flex;"><span> print(frame <span style="color:#f92672">+</span> <span style="color:#e6db74">": "</span> <span style="color:#f92672">+</span> str(filesize))
|
|
</span></span></code></pre></td></tr></table>
|
|
</div>
|
|
</div><h1 id="analysing-datasets">
|
|
Analysing datasets
|
|
<a class="anchor" href="#analysing-datasets">#</a>
|
|
</h1>
|
|
<p>There’s been a few datasets that I’ve previously looked at which could be useful to use for this project. I wasn’t sure how they would perform with the data I was expecting to use. AVA<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> was trained on data that had been photographed under ideal conditions by profesionals. This won’t reflect the frames extracted by the footage in this project’s use case. I wasn’t sure if this distinction was significant enough to effect the results of a trained model. I had previously found a project<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> which had models pretrained using AVA<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> I could use to predict an aesthetic value from images I provided.</p>
|
|
<h1 id="11-weekly-meeting">
|
|
1:1 Weekly meeting
|
|
<a class="anchor" href="#11-weekly-meeting">#</a>
|
|
</h1>
|
|
<ul>
|
|
<li>We discussed that during week 4 I should be looking at implementing CNNs as training might take a while and therefore should be a priority.</li>
|
|
<li>Look at what other people are doing with aesthetic analysis to get an idea on how the code works.</li>
|
|
<li>Attempt to get a basic CNN working.</li>
|
|
</ul>
|
|
<section class="footnotes" role="doc-endnotes">
|
|
<hr>
|
|
<ol>
|
|
<li id="fn:1" role="doc-endnote">
|
|
<p>N. Murray, L. Marchesotti and F. Perronnin, “AVA: A large-scale database for aesthetic visual analysis,” 2012 IEEE Conference on Computer Vision and Pattern Recognition, 2012, pp. 2408-2415, doi: 10.1109/CVPR.2012.6247954. <a href="#fnref:1" class="footnote-backref" role="doc-backlink">↩︎</a></p>
|
|
</li>
|
|
<li id="fn:2" role="doc-endnote">
|
|
<p>Image Quality Assessment:
|
|
<a href="https://github.com/idealo/image-quality-assessment">https://github.com/idealo/image-quality-assessment</a> - Idealo <a href="#fnref:2" 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="#filming-footage">Filming footage</a></li>
|
|
<li><a href="#gaining-more-useful-information">Gaining more useful information</a></li>
|
|
<li><a href="#analysing-datasets">Analysing datasets</a></li>
|
|
<li><a href="#11-weekly-meeting">1:1 Weekly meeting</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|