It is currently 27 Apr 2024, 18:51




 Page 1 of 1 [ 6 posts ] 
Author Message
 Post subject: Covers Deep Learning experiment (CBIR)
PostPosted: 16 Sep 2023, 11:40 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4551
Location: Tokyo
Has thanked: 295 times
Been thanked: 1147 times
I wanted to try for a long time and finally stumbled upon https://github.com/lucko515/search-book-by-cover-server.

Image


It seems abandoned but basically is trying to match book covers to a dataset of book covers.
It's a https://en.wikipedia.org/wiki/Content-based_image_retrieval system.

That could easily translate into "match LD covers to a dataset of LD covers" -- and a dataset of LD cover is something we have: 43,873 covers to be precise.

So, after fixing a few typos, wrong filenames and python packages dependencies, I am currently deep learning all the covers.
It takes about 24 hours.

80%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████                              | 35000/43873 [20:01:36<4:52:48,  1.98s/it]
82%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍                          | 36000/43873 [20:40:53<5:51:49,  2.68s/it]
84%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▊                       | 37000/43873 [21:15:43<4:22:25,  2.29s/it]
86%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋                     | 37546/43873 [21:34:53<3:17:15,  1.87s/it]


However I tried on a subset of the covers before and the results were... not good :-(

Let's see with the full dataset.

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: Covers Deep Learning experiment (CBIR)
PostPosted: 16 Sep 2023, 14:40 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4551
Location: Tokyo
Has thanked: 295 times
Been thanked: 1147 times
Oh well, process crashed at 96%|(42027/43873) [24:12:59] on a missing cover file but we can use the index up to 42000.

The matching takes an awful lot of time (the index is ~2.9GB).

And... it can't even match itself? (was my mistake)

OK... back to the drawing board.

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: Covers Deep Learning experiment (CBIR)
PostPosted: 17 Sep 2023, 07:40 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4551
Location: Tokyo
Has thanked: 295 times
Been thanked: 1147 times
Tried an easy match with a cover that has not yet been added for testing:

Attachment:
ALR EL.JPG
ALR EL.JPG [ 461.77 KiB | Viewed 1135 times ]


Quite a particular color/shape that should find easy matches.

Loading/analysing the dataset dictionnary takes 130s (more than 2min.) per match. That's not usable in real life.

First 3 are good:

ImageImageImage

But then it gets weird:

ImageImageImageImage

And it completely missed:

ImageImageImageImageImage

I would imagine the heavily colored obis are throwing the RGB histograms completely off, they would have to be removed (masked -- luckily we have been describing the obi location on the cover for years!) from the learning phase. The top banner "widescreen" or "dts" is probably also creating comparison data that put the matching off-rail. Color grading from cover to cover will also be a problem if the cover was shot under natural or artificial lights.

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: Covers Deep Learning experiment (CBIR)
PostPosted: 19 Sep 2023, 04:16 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4551
Location: Tokyo
Has thanked: 295 times
Been thanked: 1147 times
If this ever works, it will require some careful masking to remove all common elements.

Example, trying to match the French PAL Robocop 2 release for other Robocop 2 covers...

Image

... fails to find other Robocop2 but succeeds in matching the common right vertical part:

ImageImageImageImageImage
ImageImageImageImage

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: Covers Deep Learning experiment (CBIR)
PostPosted: 19 Sep 2023, 04:26 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4551
Location: Tokyo
Has thanked: 295 times
Been thanked: 1147 times
Same issue with other cover that share a lot of visual elements.

Example: The Music Disc collection

This cover:

Image

Will match similar designs:

ImageImageImageImage
ImageImageImageImage

and for some reason this one as well:

Image

Oh well, it was an interesting experience but I don't see how it can provide any meaningful added value to the website.

I'm giving up!

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: Covers Deep Learning experiment (CBIR)
PostPosted: 20 Sep 2023, 11:47 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4551
Location: Tokyo
Has thanked: 295 times
Been thanked: 1147 times
I gave it one last round with a full indexation:

100% | 43897/43897 [25:25:15<00:00,  2.31s/it]


But the matching is... what you would get from aiming at a target in the dark.
Totally unable to perform matching if the source material isn't perfect.

I'll revisit the idea someday if I find a better solution.

Google Images does it better, and in less than 1 second.

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: