awebsite/drafts/2020-01-01-coding.md

4 KiB

+++ title: Coding Examples date: 2022-03-01 14:39:27 +0100 author: Aron Petau excerpt: A selection of coding projects from my Bachelor's in Cognitive Science

header: teaser: /assets/images/sample_lr.png overlay_image : assets/images/sample_lr.png overlay_filter : 0.2 credit : Aron Petau

gallery:

  • url: /assets/images/sample_lr.png image_path: /assets/images/sample_lr.png title: "A low-resolution sample"
  • url: /assets/images/sample_hr.png image_path: /assets/images/sample_hr.png alt: "" title: "A high-resolution sample. This is also called 'ground truth' "
  • url: /assets/images/sample_sr.png image_path: /assets/images/sample_sr.png alt: " " title: "The artificially enlarged image patch resulting from the algorithm"
  • url: /assets/images/sample_loss.png image_path: /assets/images/sample_loss.png alt: "" title: "A graph showing an exemplary loss function applied during training"
  • url: /assets/images/sample_cos_sim.png image_path: /assets/images/sample_cos_sim.png alt: "" title: "One qualitative measurement we used was pixel-wise cosine similarity. It is used to measure how similar the output and the ground truth images are"

tags:

  • ethics
  • computer vision
  • neural nets
  • face detection
  • object recognition
  • GOFAI
  • super resolution
  • jupyter notebook
  • google colab
  • python
  • tensorflow
  • keras
  • machine learning
  • AI
  • MTCNN
  • CNN
  • university of osnabrück created: 2023-07-26T23:59:59+02:00 last_modified_at: 2023-10-01T20:15:26+02:00 +++

Neural Networks and Computer Vision

A selection of coding projects

Although pure coding and debugging are often not a passion of mine, I recognize the importance of neural networks and other recent developments in Computer Vision. From several projects regarding AI and Machine Learning that I co-authored during my Bachelor Program, I picked this one since I think it is well documented and explains on a step-by-step basis what we do there.

Image Super-Resolution using Convolutional Neural Networks (Recreation of a 2016 Paper)

Image Super-Resolution is a hugely important topic in Computer Vision. If it works sufficiently advanced, we could take all our screenshots and selfies and cat pictures from the 2006 facebook-era and even from before and scale them up to suit modern 4K needs.

Just to give an example of what is possible in 2020, just 4 years after the paper here, have a look at this video from 1902: {% include video id="EQs5VxNPhzk" provider="youtube" %}

The 2016 paper we had a look at is much more modest: it tries to upscale only a single Image, but historically, it was one of the first to achieve computing times sufficiently small to make such realtime-video-upscaling as visible in the Video (from 2020) or of the likes that Nvidia uses nowadays to upscale Videogames.

{% include gallery caption="Example of a Super-Resolution Image. The Neural network is artificially adding Pixels so that we can finally put our measly selfie on a billboard poster and not be appalled by our deformed-and-pixelated-through-technology face." %}

The Python notebook for Image super-resolution in Colab{: .btn .btn--large}

MTCNN (Application and Comparison of a 2016 Paper)

Here, you can also have a look at another, much smaller project, where we rebuilt a rather classical Machine learning approach for face detection. Here, we use preexisting libraries to demonstrate the difference in efficacy of approaches, showing that Multi-task Cascaded Convolutional Networks (MTCNN) was one of the best-performing approaches in 2016. Since I invested much more love and work into the above project, I would prefer for you to check that one out, in case two projects are too much.

Face detection using a classical AI Approach (Recreation of a 2016 Paper){: .btn .btn--large}