This repository has been archived on 2023-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
mmp-site/public/en.search-data.min.3cdd632708ab5b87a1949e77a4e8038d26de63339156f8be996cb82fdd8a42dd.js
2022-03-28 16:46:12 +01:00

1 line
No EOL
8.4 KiB
JavaScript

'use strict';(function(){const t={cache:!0};t.doc={id:"id",field:["title","content"],store:["title","href","section"]};const e=FlexSearch.create("balance",t);window.bookSearchIndex=e,e.add({id:0,href:"/docs/developer/",title:"Developer Documentation",section:"Docs",content:"This is the developer documentation. (Work-in-progress)\n"}),e.add({id:1,href:"/docs/user/",title:"User Documentation",section:"Docs",content:"This is the user documentation. (Work-in-progress)\n"}),e.add({id:2,href:"/posts/week-4/",title:"Week 4",section:"Blog",content:"This week\u0026hellip;\nWork # Created blog Weekly 1:1 meeting # "}),e.add({id:3,href:"/posts/week-3/",title:"Week 3",section:"Blog",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.\nGaining more useful information # I used the footage I had recorded at the start of the week and revised my \u0026ldquo;filesize\u0026rdquo; code. I made a new function order_frames_by_filesize() which orders the frames by the filesize and prints the name of size of each frame in order.\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 def order_frames_by_filesize(): \u0026#34;\u0026#34;\u0026#34;Order the frames by filesize and print the filenames and their sizes\u0026#34;\u0026#34;\u0026#34; frames = os.listdir(outputfolder) # sort the frames by their filesize frames = sorted(frames, key = lambda x: os.stat(os.path.join(outputfolder, x)).st_size, reverse = True) # print every frame and it\u0026#39;s size in a human readable format for frame in frames: filesize = os.stat(os.path.join(outputfolder, frame)).st_size if filesize \u0026gt; 1024: filesize = filesize / 1024 print(frame + \u0026#34;: \u0026#34; + str(filesize) + \u0026#34; KB\u0026#34;) else: print(frame + \u0026#34;: \u0026#34; + str(filesize)) Analysing datasets # There\u0026rsquo;s been a few datasets that I\u0026rsquo;ve previously looked at which could be useful to use for this project. I wasn\u0026rsquo;t sure how they would perform with the data I was expecting to use. AVA1 was trained on data that had been photographed under ideal conditions by profesionals. This won\u0026rsquo;t reflect the frames extracted by the footage in this project\u0026rsquo;s use case. I wasn\u0026rsquo;t sure if this distinction was significant enough to effect the results of a trained model. I had previously found a project2 which had models pretrained using AVA1 I could use to predict an aesthetic value from images I provided.\n1:1 Weekly meeting # 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. Look at what other people are doing with aesthetic analysis to get an idea on how the code works. Attempt to get a basic CNN working. N. Murray, L. Marchesotti and F. Perronnin, \u0026ldquo;AVA: A large-scale database for aesthetic visual analysis,\u0026rdquo; 2012 IEEE Conference on Computer Vision and Pattern Recognition, 2012, pp. 2408-2415, doi: 10.1109/CVPR.2012.6247954.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n Image Quality Assessment: https://github.com/idealo/image-quality-assessment - Idealo\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n "}),e.add({id:4,href:"/posts/week-2/",title:"Week 2",section:"Blog",content:"This week I set up my repositories and starting writing some basic code.\nSet up # Before starting any coding, I wanted to set up my remote git repositories. I had already decided I wanted the project mirrored over two remote git repositories from different providers as a safety precaution. My intial plan was to use the university\u0026rsquo;s GitLab instance but as it\u0026rsquo;s recently been moved behind the firewall it would have made mirroring quite difficult. Instead, I decided to use my personal Gitea instance and mirror it to my personal account on the official GitLab instance.\n Gitea → GitLab\nGitea will periodically push to GitLab.\nCode # Towards the end of the week I put together some simple code to reduce the frame set. I used the OpenCV Python module to export the frames of a given video to an output/ folder. The path of this folder is also stored in the outputfolder variable we see used on line 7.\nAlthough this code is a first step at reducing the frames set - it doesn\u0026rsquo;t give us much feedback about the frames that have been deleted or kept.\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 def display_file_sizes(): \u0026#34;\u0026#34;\u0026#34;Calculates the average frame filesize and deletes the frames lower than the average \u0026#34;\u0026#34;\u0026#34; # create an array storing the filesize of each frame filesizes = [] for filename in os.listdir(outputfolder): filepath = outputfolder + \u0026#34;/\u0026#34; + filename filesize = os.path.getsize(filepath) print(filepath + \u0026#34;: \u0026#34; + str(filesize)) filesizes.append(filesize) # work out average average = sum(filesizes)/len(filesizes) print (\u0026#34;Average is: \u0026#34; + str(average)) # delete files below average count = 0 for filename in os.listdir(outputfolder): filepath = outputfolder + \u0026#34;/\u0026#34; + filename if filesizes[count] \u0026lt; average: # print(filepath + \u0026#34;: \u0026#34; + str(filesizes[count])) os.remove(filepath) count += 1 I didn\u0026rsquo;t end up doing as much as I would have liked this week. I found myself preoccupied in other areas of my life and not putting enough emphasis on this project.\n1:1 Weekly meeting # As I didn\u0026rsquo;t do as much as I would like to have done there wasn\u0026rsquo;t much to discuss on my part I needed to produce more code to have some basic functionality. Discussed my concerns with a machine learning approach "}),e.add({id:5,href:"/posts/week-1/",title:"Week 1",section:"Blog",content:"This week is the first week of the project. I researched academic papers, existing code and dataset relating to the topic of determining aesthetics.\nPapers # Photo Aesthetics Analysis via DCNN Feature Encoding1 - Predicting aesthetic performance using a bespoke CNN solution\n AVA: A large-scale database for aesthetic visual analysis2 - Making of an aestehtic visual analysis dataset\nCode # Image Quality Assessment - Convolutional Neural Networks to predict the aesthetic and technical quality of images.\nDatasets # AADB\nAVA: https://github.com/imfing/ava_downloader, https://github.com/ylogx/aesthetics/tree/master/data/ava\nProject idea from research # Based on the research, I decided a machine learning approach would result in higher quality outputs. Although, I was slightly concerned that following a deep-learning would limit interesting discussion in my report.\nThe idea was to create a program that can take a video, break it down into frames and use a trained CNN to predict the most aesthetic frames and return them to the user.\nWeekly 1:1 meeting # During the meeting I mentioned my concerns following a deep learning approach. Although this approach might provide quality results, it doesn\u0026rsquo;t provide much room to discuss or develop interesting solutions. Instead, as Hannah put, it mostly depends on throwing the problem at powerful hardware to get the best output which doesn\u0026rsquo;t make for an interesting project. Hannah suggested I take a hybrid approach where I could use deep-learning for the last step in the pipeline, depending more on conventional engineering techniques to reduce the input data before passing it to the deep-learning stage.\nShe mentioned \u0026lsquo;dumb\u0026rsquo; ways in which I could reduce the set of input frames:\n Comparing file sizes and removing the small ones (might infer single colour images / less complex images) Fourier frequency analysis Brightness and contrast analysis H. -J. Lee, K. -S. Hong, H. Kang and S. Lee, \u0026ldquo;Photo Aesthetics Analysis via DCNN Feature Encoding,\u0026rdquo; in IEEE Transactions on Multimedia, vol. 20, no. 8, pp. 1921-1932, Aug. 2017, doi: 10.1109/TMM.2017.2687759.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n N. Murray, L. Marchesotti and F. Perronnin, \u0026ldquo;AVA: A large-scale database for aesthetic visual analysis,\u0026rdquo; 2012 IEEE Conference on Computer Vision and Pattern Recognition, 2012, pp. 2408-2415, doi: 10.1109/CVPR.2012.6247954.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n "})})()