Re:Show HN: Imagededup – Finding duplicate images made easy
by tanujjain on Monday October 07, 2019 @05:57AM
(#21179081)
Retrieval using CNNs requires computing a cosine similarity matrix. So, for 'n' images, a matrix of size n x n would need to be stored in the memory. As you can see, the storage requirements blow up quadratically as 'n' increases. We have already made some optimizations to reduce the memory footprint but there would be clear upper limits to it (We haven't experimented). As for the numbers, the cifar10 dataset example present in the repo was carried out on google colab notebook. The dataset has 60k images and ended up consuming about 6G of RAM using CNN. However, since there hasn't yet been a principled benchmarking done on the package, I would consider these numbers as only marginally indicative of the capabilities. A better way to figure out if it works for you would be to try it out with your own dataset, starting out at a small scale and increasing the dataset size gradually.
Re:Show HN: Imagededup – Finding duplicate images made easy
by dgacmu on Monday October 07, 2019 @07:04AM
(#21179438)
Use approximate nearest neighbor. The FAISS library is good.
Re:Show HN: Imagededup – Finding duplicate images made easy
by tanujjain on Monday October 07, 2019 @08:30AM
(#21179975)
Thanks for the pointer, will check it out.
Re:Show HN: Imagededup – Finding duplicate images made easy
by jonatron on Monday October 07, 2019 @07:45AM
(#21179668)
Couldn't you add images>threshold to a dict/map as you iterate, rather than building a complete matrix, then iterating through that?
Re:Show HN: Imagededup – Finding duplicate images made easy
by tanujjain on Monday October 07, 2019 @08:24AM
(#21179933)
We tried that approach, but it was way too slow.
Re:Show HN: Imagededup – Finding duplicate images made easy
by jayalpha on Monday October 07, 2019 @06:39AM
(#21179288)
"The tricky part is the retrieval of duplicates, which on the same 10K dataset takes a few minutes"
"Doesn't sound too bad."
I doesn't? As a word of caution: If a 10k dataset takes a few minutes I would be careful how long 10MM pictures take. I predict it does not take 10MM/10k times a few minutes.
How much memory would you need for ~2000 images, how slow does it get, etc.
Thx