Answers.Body: <p>This is an interesting question.</p>
  <p>Let's make the problem more abstract:</p>
  <p>Suppose we have n docs(each page in the PDF is one doc). How can we classify these docs?</p>
  <p>My approach:</p>
  <p>This could be treated as an NLP task; my approach is. First, you have to extract texts from each doc, then compute the similarity between each doc, if the similarity is great than the threshold you give, they should be considered as same docs.</p>
  <p>Useful link:</p>
  <p>Compute similarity: <a href="https://towardsdatascience.com/calculating-document-similarities-using-bert-and-other-models-b2c1a29c9630" rel="nofollow noreferrer">https://towardsdatascience.com/calculating-document-similarities-using-bert-and-other-models-b2c1a29c9630</a></p>
  <p>OCR: <a href="https://nanonets.com/blog/attention-ocr-for-text-recogntion/" rel="nofollow noreferrer">https://nanonets.com/blog/attention-ocr-for-text-recogntion/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-20T23:01:26.127Z
Answers.LastActivityDate: 2022-10-20T23:01:26.127Z
Answers.UserDisplayName: Allonsy Jia
Body: <p>I need to solve a problem whereas a scan of multiple documents (contracts, invoices, bank extracts) is stored into a PDF and I need to identify how many individual documents are contained in the PDF and which pages of the PDF belong to which document.</p>
  <p>This scenario presents itself, for example, when a person feeds a bunch of documents into an automatic scanner that then creates a single PDF from these documents. Each document is just an image and might have one or more pages and may have different layouts.</p>
  <p>What would be an intelligent AI approach to attacking this problem?</p>
  
Tags: <computer-vision>
Title: Detecting individual multiple documents in a pdf
UserDisplayName: Jorge Rodrigues dos Santos
ThreadText: # Detecting individual multiple documents in a pdf
  
  (Asked by: username_0 on 2022-10-19)
  
  I need to solve a problem whereas a scan of multiple documents (contracts, invoices, bank extracts) is stored into a PDF and I need to identify how many individual documents are contained in the PDF and which pages of the PDF belong to which document.
  
  This scenario presents itself, for example, when a person feeds a bunch of documents into an automatic scanner that then creates a single PDF from these documents. Each document is just an image and might have one or more pages and may have different layouts.
  
  What would be an intelligent AI approach to attacking this problem?
  
  **Tags:** computer-vision
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-10-20. Score: 0
  
  This is an interesting question.
  
  Let's make the problem more abstract:
  
  Suppose we have n docs(each page in the PDF is one doc). How can we classify these docs?
  
  My approach:
  
  This could be treated as an NLP task; my approach is. First, you have to extract texts from each doc, then compute the similarity between each doc, if the similarity is great than the threshold you give, they should be considered as same docs.
  
  Useful link:
  
  Compute similarity: <https://towardsdatascience.com/calculating-document-similarities-using-bert-and-other-models-b2c1a29c9630>
  
  OCR: <https://nanonets.com/blog/attention-ocr-for-text-recogntion/>
  
  
  ---
  
  