Skip to content

korjusk/Brighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Brighter

Input / Output / Manually brightened input image

imgs/test_result.png

Sometimes there's something wrong with the image. Let's call these images 'low quality'. (For example watermark on the image, blurry images, red eyes, black and white photos etc)

If I can convert the good images to low-quality images then I can reverse the process and improve the low-quality photos.

To archive this I created a custom loss function which incorporates feature loss (also known as perceptual loss), along with gram loss.

Goal

  1. Improve dark image quality
  2. Improve OCR from the dark image

Data

From this list I choosed MSRA Text Detection 500 Database (MSRA-TD500).

I ignored text boundix boxes and resized images to 512px.

Lower the images quality

With python Pillow I changed the image resolution, brightness, contrast, sharpness and quality. Samples are in /imgs/ directory.

Then I combined all the changes and made 2 datasets

Crappy quality vs normal

Results

Disclaimer: I trained it less than an hour and the whole project took 4 hours to make.

Notebook

Whats next?

Try to detect text from the crappy images, manually improved images, images improved with ML and original images. Compare the results and conclude if its something to invest more time in.

About

Improve image quality

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published