In principle looking up the barcodes would not just find duplicates but let you look up bibliographic records and make a catalog of your books.
I did a short pilot project for scanning barcodes on books in my collection and gave up quickly because many of the books I have are too old to have an ISBN. This doesn't have to be very old, I just took this 1985 book off the shelf
https://monoskop.org/images/a/a0/Foster_Hal_Recodings_Art_Sp...
and it has no barcode or ISBN. If you look on page 4 of the PDF, however, you will find the "Library of Congress Cataloging In Progress Data" and find a mini biblographic record, the number 85-70184 is the LoC catalog number and points to this record
https://catalog.loc.gov/vwebv/search?searchCode=LCCN&searchA...
you can download all the MARC records from the LoC so this is a good way to get metadata, I took a 1966 book off the shelf and found it also had a LCCN.
With ISBN I had other problems too. Some books turned up no records, also I have some books from South End Press (I knew somebody who knew the people there) and they notoriously reuse ISBN numbers as a way to "stick it to the man".
I think OCRing the LoC record at the start of books though would be a better approach.
The LCCN is supposed to identify a "book" but not an edition,
https://oldmatemedia.com/guides/how-to-get-a-lccn/
for instance the number is the same for the hardcover or softcover. It's probably still non-trivial to find "duplicates" (do you count the many different editions of a Shakespeare play as "duplicates?) but you'd have good metadata to do the task.