LakshyaKhatri / Bookshelf-Reader-API

A browsable REST API for recognizing book spines in an image.
MIT License
45 stars 17 forks source link

Great job! Thank you. I wish to know why you decided to resize the images to 500 pixels. #5

Open chatulBamagafaeim opened 2 years ago

chatulBamagafaeim commented 2 years ago

Thank you for your great code here. When I tried to use Google Vision API - the results wasn't accurate because of the resize. Is it possible to disable the resize? Changing the width by hand cause the algorithm to be less effective. Thanks.

LakshyaKhatri commented 2 years ago

Hey @chatulBamagafaeim! I think we can. Currently the resizing code is directly applied on the images being saved to the database. We can instead store multiple version of the image as per our need. Although, this will require some work. I would appreciate if you could propose something.

Again, I think it's okay to pass inaccurate text to the scrappers. Since scrapper is doing a google search, it will find the correct book eventually.

chatulBamagafaeim commented 2 years ago

I increased the numbers from 500px to 1500px. Also increased this https://github.com/LakshyaKhatri/Bookshelf-Reader-API/blob/master/spine_detection.py#L47 to 65. It worked fine but I think it's not enough. What do you think?

LakshyaKhatri commented 2 years ago

Thanks for investing and digging deeper in it. At that time 500px worked for me. I'm thinking of going with having different versions of image (155px, 500px, 1500px and so on...). This will give people more control over what kind of result they want.

And I see, the overlapping lines thing is also depending on the image size, probably hardcoding values for each size will do the job for now. We can later find something more robust.