- Team Name : kv1
- Project ID : 39
- 2018801010 - Karnati Venkata Kartheek
- 2018900014 - Arun Kumar Subramaniam
-
Install virtualenv, virtualenvwrapper
sudo pip3 install virtualenv virtualenvwrapper
-
Create a UWIE Virtual environment and activate it
mkvirtualenv UWIE
workon UWIE
-
Install required Python Packages
pip3 install -r requiremnts.txt
- Contrast Stretching Generally Require (r1,s1) and (r2,s2) as the input
- Here r1, r2 are determined by the Differential Evolution algorithm as specified in the research paper. s1 and s2 are our choice.
- We tried Three models,
- In Model1, we set s1 = 0 and s2 = 255
- In Model2, s1 and s2 are also considered as variables and will be determined by DE Algo
- In Model3, Objective Function is changed to Entropy + Variance (within Lower and Upper Limits)
- We showed the results for Images Given In the research paper
- We applied algo on a Milk DataSet given in Another research paper
- We proposed a modification to Objective Function To improve results on this dataset
- We performed grid search to determine the best parameters
- We applied the algo on different images and compared the PSNR ratio with subjective ratings by calculating the correlation between them.
-
UWIEf_MODEL1.ipynb
implements Model1 on the Images Given in the associated research paper. It takes input from thePaperImages
Folder and displays the given and enhanced Images in the Notebook Itself. -
UWIEf_MODEL2.py
implements Models2. As more number of variable are involved in optimization problem. This need multiprocessing. Thus this file is ran on ADA. This file takes input fromPaperImages
and outputs the enhanced images. The FolderModel2_UWIE_OutputImages
contain the images enhanced by this method.Model2_UWIE_Output.txt
file contains the shell output while running on ADA -
Model1_TRBD.py
apply's Model1 on TurbidityDataSetImages. These images are present inTurbidityDataSetInputImages
Folder. This file takes input from here and outputs Enhanced Images. Since images are of large size multiprocessing is needed here. This code is also ran on ADA. The output images are in the FolderEnhancedAndGivenImagesTurbidDataSetUsingOriginalMethod
.Model1_TRBD_Output.txt
contains the shell output while running on ADA. The notebookModel1_TRBD_RESULTS.ipynb
displays both given and enhanced images for comparision. -
Model3_TRBD.py
is similar toModel1_TRBD.py
. But here we use Model3 instead. It takes input fromTurbidityDataSetInputImages
Folder.Since images are of large size multiprocessing is needed here. This code is also ran on ADA. The output images are in the FolderEnhancedAndGivenImagesTurbidDataSetUsingVarianceApproach
.Model3_TRBD_Output.txt
contains the shell output while running on ADA. The notebookModel3_TRBD_RESULTS.ipynb
displays both given and enhanced images for comparision. -
The file
gridSearch.py
contains the code for grid search. Here mutation and cross overconstants are the hyperparameters. Since generally its better to have highter population size. We fix population size as 40. Thus remaining only two hyperparameters in range 0 to 1. We choose values in steps of 0.1. We computer the objective value for (9*9 = 81) combinations. And select a combination of mutation and crossover coefficients which maximize the objective value. The ouput isgridSearch.csv
. The filegridSearchOutput.txt
contains shell output. Here in this file we take a sub image to make the calculation faster. Input is taken from the `PaperImages' Folder. -
The notebook
PSNRvsSubjectiveRatings.ipynb
is where we claculate PSNR(Peak Signal to Noise Ratio) between Given and EnhancedImages. This file takes the input images fromOtherImages
Folder. Here We calculate the correlation between PSNR ratio and Hardcoded Subjective ratings collected from 5 people.