Skip to content

ashesh-0/PdfFromImages

Repository files navigation

BookImageSplitter

Converts list of 2-page book images into 1-page book images.

Using CNNs.

RawImage Image2 Image3

  1. Using transfer learning, CNN is trained to do pixel segmentation of book area vs the background. Notebook
  2. Using transfer learning, CNN is trained to find out the mid line of the two pages. Mid line is the line which divides the left page from the right page. Notebook
  3. Using weighted linear regression (with huber loss so as to ignore outliers), mid line is finetuned. This line is used both to rotate the image so that it becomes vertical in resulting image. Also, this is used to divide the image into left page and right page. Notebook
  4. Using Dense CRF over pixel segmentation of book area output of CNN to improve book boundaries. KL Divergence has improved. Notebook

TODO

  1. Handle rough page edges. Make them smoothe.

Using Traditional Computer Vision Techniques.

RawImage Image1 Image2 Image3

How to use

python run.py IMAGE_DIRECTORY

In IMAGE_DIRECTORY, all images which needs to be separated into two should be present.

TODO

  1. Affine transformation on final output image so as to make the text horizontal.
  2. Automatic detection of page numbers.
  3. High resolution Pdf. Currently, low resolution pdf is getting formed.

About

Converts list of 2 page images into pdf whose one page contains one page of the book.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors