Design a CNN based deep learning model which classify both blurred and not blurred version of a data set where atleast one class is extremely rare i.e it is a highly unbalanced dataset and deploy it in a web app
-
Take any publicly available unbalanced Image dataset with atleast 8-10 categories in the target variable
-
Make the dataset extremely skewed (.i,e frequently occurring categories should contribute to around 80-90% od total observations). There must be atleast one category which is a rare category( .i.e less than 3% of total observations fall under this category)
-
Now use any CV algorithms to reduce the Sharpness in the Image(feel free to use any other methods too) and make them blurry - atleast 30% of images in each category should be blurred
-
Using Flask and Ngrok Deploy it as a webapp
-
Use any model of your choice to make predictions
-
Conduct an analysis of how the accuracy of the model is varying on the Frequently occurring categories with the non frequent categories (rare)
-
Conduct an analysis on how the model is performing on the non blurry images and blurry images across all categories
- Define a function which can detect whether an image is blurry or not. I used Laplacian filter to detect whether the image is blurry or not with a threshold value 100. Generally blurry images laplacian filer values are too much low below 10 and not blurry values are way bigger like 1000.
-
First detect whether the image is blurry or not.
-
If it is not blurry then it use Canny edge filerting directly upon it.
-
But it is blurry then we can not use canny edge filtering directly because Canny edge filter take the image then first use a gaussian kernel to blur the image. So, first step is already done for this steps. So I implement other steps as functions which are
- Non maximum supression
- Thresholding
- Hystersis thresholding