#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 14:50:12 2020

@author: am2806
"""

#img_name= 'Snow'
f = open('HTML_Report_Paper_ID_10510.html','w')

start = """<html>
<head></head>
<body><p style="font-size: 30px">Training a Better Loss Function for Image Restoration</p></body>
<body><p style="font-size: 30px">Anonymous ICCV 2021 Submission: Paper ID 10510</p></body>
<body><p>Due to size limitations, we include the first 30 images from each test set (out of 100). Images are stores as JPEGs with a quality 90 to ensure that coding distortions do not distort the results.</p></body>
"""

f.write(start)

f.write("<body><p style=\"font-size: 24px\">Applications</p></body>")

f.write("<body><p>In this report we provide a comprehensive comparison of qualitative results for different loss functions across different applications. To begin with, we show results for two Single Image Super-Resolution (SISR) networks, namely, Enhanced Deep Super-Resolution (EDSR) and Super-Resolution ResNet (SR-ResNet). Further, we show the results for the applications of image denoising and JPEG artefact removal. </p></body>")

f.write("<body><p style=\"font-size: 22px\">Single Image Super-Resolution (SISR)</p></body>")

f.write("<a href=\"Images/EDSR_BSD/test.html\">Enhanced Deep Super-Resolution (EDSR)</a>")
f.write("<br>")
f.write("<a href=\"Images/SR_ResNet/test.html\">Super-Resolution ResNet (SR-ResNet)</a>")
f.write("<br>")

start1 = """

<body><p>Additionally, we provide results for SISR on the General 100 Dataset. The images
in this dataset are from different scenes and of different dimensions.</p></body>
"""

#f.write(start1)

#f.write("<body><h2>Noisy Image Reconstruction!</h2></body>")

#f.write("<a href=\"Images/EDSR_General_100/test.html\">Enhanced Deep Super-Resolution (EDSR) on General 100 Dataset</a>")
#f.write("<br>")

f.write("<body><p style=\"font-size: 22px\">Image denoising</p></body>")
start2 = """
<body><p></p></body>
"""
f.write(start2)

f.write("<a href=\"Images/Denoising/test.html\">Image denoising</a>")
f.write("<br>")

f.write("<body><p style=\"font-size: 22px\">JPEG artefact removal</p></body>")
start3 = """
<body><p>We compare the performance of different losses for two codec compression qualities.</p></body>
"""
f.write(start3)

f.write("<a href=\"Images/Jpeg_Quality_7/test.html\">Compression qualiy = 7</a>")
f.write("<br>")
f.write("<a href=\"Images/Jpeg_Quality_10/test.html\">Compression qualiy = 10</a>")

f.write("<br>")

#Ablation Study
#f.write("<body><h2>Ablation Study</h2></body>")
#start3 = """
#<body><h4>In this section, we provide comprehensive ablation results for our proposed Multi-Scale Discriminative Feature (MDF) loss function.
#More specifically, we study how the performance of the loss function changes with the number of scales at which features are extracted, and the
#effect of changing the seed image.</h4></body>
#"""
#f.write(start3)
#
#f.write("<a href=\"Images/Ablation_Inference_EDSR/Ablation_EDSR.html\">Scales of Discriminators</a>")
#f.write("<br>")
#f.write("<a href=\"Images/Inference_Outputs_Different_Disc/test.html\">Seed Image</a>")
#f.write("<br>")
#
#start3 = """
#<body><h4>Further, we conducted experiments for SISR (EDSR model)
#with different types of model initializations. The dataset used for training and testing the performance of the network is
#Berkeley Segmentation Dataset (BSD)</h4></body>
#"""
#f.write(start3)
#
#f.write("<a href=\"Images/Inference_Outputs_Different_Inits/test.html\">Different Model Initializations</a>")
#f.write("<br>")
#f.write("<a href=\"Noisy_Snow.html\">Snow Image!</a>")
#f.write("<br>")

#Alpha
f.write("<body><p style=\"font-size: 24px\">Hyper-parameter tuning for VGG and LPIPS</p></body>")
start3 = """
<body><p>To find the best weightage, we conduct a hyper-parameter search over controlling the weightage sum of of VGG/LPIPS 
and MSE feature-wise loss fucntions: MSE + weight * VGG/LPIPS.</p></body>
"""
f.write(start3)

f.write("<a href=\"Images/Alpha_New/test.html\">Hyper-parameter tuning</a>")
f.write("<br>")

#Plots




f.write("</html>")
f.close()
