I’m really sorry that this is probably out of place, as it’s not strictly LLAMA, but I couldn’t think of anywhere else to post it where people may be able to help.
**Sadly, my grandma passed away yesterday. **It prompted me to retrieve some old photos that my parents stashed in the loft over a decade ago, and they are just incredible! I’ve found so many pictures of her, going back to when she was really young, to a point where I’ll have to check if they are all definitely her! But there’s amazing ones of my dad and uncles when they were little, even my nan with my dad and me when I’d literally just been born!
There’s lots of really wonderful family moments and slice-of-life history captured there, and I don’t think anyone knows they exist.
Mostly, I have enough funny photos to have birthday cards sorted for the several lifetimes!
I want to get these ALL scanned and digitised. But for now, I’m separating out ones with my nan in them to be top priority. Most of the services available have long turnarounds and, while the prices are far from extortionate, I’m looking for something which prices by the KG. Seriously, there must be over 20Kg of photo in here. They’re mostly 6x4, so you’d want to have them done at a high DPI, the cost would be astronomical, especially as I already plan to spend a lot on printing.
So, I’d like to do this myself. I’ve dabbled with some LLM stuff, but I don’t really know where to start with image manipulation, and I don’t really have time to figure it out, so I’m asking for some guidance.
The rough idea is:
-
Scan photos on high DPI flatbed scanner. Fill up the bed each time with multiple photos for highest speed
-
‘Parse’ the scan into multiple image files by identifying where the bounds are and cropping. This should be pretty simple. I think this may be possible in OpenCV? I’ve never tried before. Otherwise, it has to be one of the simpler jobs for a ML tool. I understand how object recognition works in principle, but not practice.
-
Run select images through an upscaler. Some we may want to display or print larger, and if it’s not unreasonable, if we’re going to digitise them, may as well make them as high res as we can (I’ll keep the originals). I know the usualy ‘zoomify’ caveats, but obviously when I’m starting with 6x4 images, I’ll take all the help I can get.
-
Ideally attempt to ‘clean up’ the images. I don’t think I’d want to colourise anything, but it would be nice to remove obvious stains, creases and such from the print.
-
The plan is to have some albums for people to go through at the wake, print off plenty of extra 6x4 copies so people can just grab them and take them away, but I’ll also stick them all on a google drive or something and make the link available so people can download them in higher res, and more people will be able to see and preserve them
My main concern is 2 and 3. 4 would be a bonus. I suspect the shortlist will be 100-200 photos, but processing everything will be an ongoing process. I just want the shortlist done before the funeral.
I’d really rather run locally if viable. I have a two machines that may be able to contribute:
Workstation
- RTX 3090 -32Gb DDR4 --> 64GB DDR5
- 5600x. --> 7900x
I’m actually planning an upgrade very soon, which I can push through fast if it will help.
R720XD
- 128GB DDR3 RAM
- 2x E5-2630 v2.
Probably not super useful, but has lots of RAM, and can be used as a slow workhorse. My workstation is on CAD for 8 hours a day, and is used for gaming in the evening. I can obviously cut out the gaming, but not the CAD, so there could be some utility in handing off some things to the server, if the workload doesn’t require GPU.
If you can point me in the right direction to get set up, that would be awesome. I’m new at this and learning fast, but I don’t want to under-deliver. I’m very capable of learning the details, but I don’t have enough experience to determine the ‘best way’ of doing something like this.
Any help would be incredible!
Maybe get a different Scanner like an
Epson FastFoto FF-680W
that feeds whole Stacks at once and is supposed to take seconds per photo.
Buy check if that’s a good choice and supports the picture dimensions. I don’t have any experience myself except for a slide scanner. That one came with software that worked pretty alright.
There are services that do the scanning for you. But there are also services who lend you the (consumer-grade) machines to do it yourself for a week or so. Maybe that’s also an option. Or buy one second hand. And then resell it if it’s too expensive.
(Also detecting rectangular things with a known size on a high contrast background, separating and rotating them and saving them seperatly should be quite doable with opencv. that’s is not considerably more complicated than what i read in some opencv tutorials.)
No ML necessary. I’ve done similar jobs like this before, and the workflow is roughly:
-
Identify and crop each photo from the sheet. In my case I did this manually but it should be easy to do with OpenCV (can’t help you there as I’ve never done anything with OpenCV myself). Of course you know the expected resolution and aspect ratio, so you could flag any photos that fall outside of this as “not straight” or “not 6x4” so that you can go back and check what’s up with them. You definitely want to make sure that all your output images are the exact same size (in pixels), which should be the DPI of your scanner multiplied by the size (in inches) of your photos.
-
For black and white photos: Remove any saturation so that they are “true” black and white and don’t have a color tint.
-
For color photos: Do automatic white balance adjustment. If the photos have a strong color tint due to age (e.g. pink) then you may need to tweak it manually (or use software/algorithm/plugin intended specifically to correct this tint).
-
Perform automatic exposure correction.
-
After this, apply any upscaling and noise/damage removal that you want.
I recommend saving your raw sheets, your processed output after step 4, and your final output after step 5. Step 5 is the one to look at or give to people. Step 4 is the one to go back to if you discover a better damage removal algorithm later on. The raw sheets is the one to go back to if you later discover a mistake in your cropping, or if you want to redo the color processing, or anything else that you’ve done to the images after they were scanned. You don’t need to save the outputs of the other steps.
For steps 3 and 4 you should use software that is designed for photographers who are processing digital photos. e.g. Adobe Lightroom, RawTherapee, Darktable. These programs will allow you to open a scanned photo and process it the exact same way that you would process a raw photo taken by a digital camera if you were a photographer. If you aren’t a photographer then you can use the “auto” settings and the program will do (roughly) the same as what your smartphone camera does to the raw image data when you take a photo today (that is, make the lighting and color balance look “correct”).
-