Loading

Face De-Blurring

Solution for submission 175266

A detailed solution for submission 175266 submitted for challenge Face De-Blurring

jakub_bartczuk

Getting Started with Face Deblurring Challenge

In this puzzle, we have to de blur the blurred images.

This is a starter kit explaining how to download the data and also submit direcly via this notebook.

We will be submitting the sample prediction directly in the required format.

AIcrowd code utilities for downloading data for Language Classification

Download the files 💾¶

Download AIcrowd CLI

We will first install aicrowd-cli which will help you download and later make submission directly via the notebook.

In [1]:
!pip install aicrowd-cli
%load_ext aicrowd.magic
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: aicrowd-cli in /home/kuba/.local/lib/python3.8/site-packages (0.1.7)
Requirement already satisfied: requests<3,>=2.25.1 in /home/kuba/.local/lib/python3.8/site-packages (from aicrowd-cli) (2.25.1)
Requirement already satisfied: requests-toolbelt<1,>=0.9.1 in /home/kuba/.local/lib/python3.8/site-packages (from aicrowd-cli) (0.9.1)
Requirement already satisfied: gitpython<4,>=3.1.12 in /home/kuba/.local/lib/python3.8/site-packages (from aicrowd-cli) (3.1.12)
Requirement already satisfied: click<8,>=7.1.2 in /home/kuba/.local/lib/python3.8/site-packages (from aicrowd-cli) (7.1.2)
Requirement already satisfied: tqdm<5,>=4.56.0 in /home/kuba/.local/lib/python3.8/site-packages (from aicrowd-cli) (4.56.0)
Requirement already satisfied: rich<11,>=10.0.0 in /home/kuba/.local/lib/python3.8/site-packages (from aicrowd-cli) (10.16.2)
Requirement already satisfied: toml<1,>=0.10.2 in /home/kuba/.local/lib/python3.8/site-packages (from aicrowd-cli) (0.10.2)
Requirement already satisfied: chardet<5,>=3.0.2 in /usr/lib/python3/dist-packages (from requests<3,>=2.25.1->aicrowd-cli) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/lib/python3/dist-packages (from requests<3,>=2.25.1->aicrowd-cli) (2.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3/dist-packages (from requests<3,>=2.25.1->aicrowd-cli) (1.25.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests<3,>=2.25.1->aicrowd-cli) (2019.11.28)
Requirement already satisfied: gitdb<5,>=4.0.1 in /home/kuba/.local/lib/python3.8/site-packages (from gitpython<4,>=3.1.12->aicrowd-cli) (4.0.5)
Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /home/kuba/.local/lib/python3.8/site-packages (from rich<11,>=10.0.0->aicrowd-cli) (0.9.1)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /home/kuba/.local/lib/python3.8/site-packages (from rich<11,>=10.0.0->aicrowd-cli) (2.7.3)
Requirement already satisfied: colorama<0.5.0,>=0.4.0 in /usr/lib/python3/dist-packages (from rich<11,>=10.0.0->aicrowd-cli) (0.4.3)
Requirement already satisfied: smmap<4,>=3.0.1 in /home/kuba/.local/lib/python3.8/site-packages (from gitdb<5,>=4.0.1->gitpython<4,>=3.1.12->aicrowd-cli) (3.0.4)

Login to AIcrowd ㊗¶

In [2]:
%aicrowd login
Please login here: https://api.aicrowd.com/auth/E53lWJ2wMOwpDTc6fp5FiTwEvoQbNFw5MlcXnoRgryk
API Key valid
Saved API Key successfully!

Download Dataset¶

We will create a folder name data and download the files there.

In [3]:
!rm -rf data
!mkdir data
%aicrowd ds dl -c face-de-blurring -o data
In [4]:
!unzip data/train.zip -d data/train > /dev/null
!unzip data/val.zip -d data/val > /dev/null
!unzip data/test.zip -d data/test > /dev/null

Importing Libraries:

In [5]:
import pandas as pd
import numpy as np
import os

Diving in the dataset 🕵️‍♂️

In [6]:
train_blur_images = 'data/train/blur'
train_original_images = 'data/train/original'
val_blur_images = 'data/train/blur'
val_original_images = 'data/val/original'

Generating Prediction File

In this starter kit we will directly be submitting the blurred images. In case you would like to see a submission via baseline model.

In [7]:
!mkdir original
!cp -r data/test/blur/* original/

Submitting our Predictions

Note : Please save the notebook before submitting it (Ctrl + S)

In [9]:
%aicrowd notebook submit -c face-de-blurring -a original --no-verify
Notebook Not Found Error: No jupyter server found. Did you start your jupyter server?
In [ ]:


Comments

You must login before you can post a comment.

Execute