GithubHelp home page GithubHelp logo

ilmonteux / logohunter Goto Github PK

View Code? Open in Web Editor NEW
170.0 170.0 36.0 37.94 MB

Deep learning tool to find brand logos in everyday pictures

License: MIT License

Python 6.80% Shell 0.03% Jupyter Notebook 93.17%
computer-vision logo-detection

logohunter's People

Contributors

ilmonteux avatar orjwanzaafarani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

logohunter's Issues

Logos it has not seen before

Hi ilmonteux!

Thanks for this repo! It is awesome.

I just finished spinning up a demo environment following your instructions. Very clean, everything is working!

I do have a conceptual question on how this model behaves, specifically on logos the model has never seen before. I ran my own test using images I pulled of Toyota cars (similar to your Lexus example, but using Toyota cars and logo instead).

The model was able to accurately point out what it thought were logos, but it only identified the logo as "toyota" twice (out of like 8 logos). Reviewing the text output, it said something like:

../logohunter/data/test/toyota/t4.jpg
../logohunter/data/test/toyota/t2.jpg
../logohunter/data/test/toyota/t6.jpg 31,531,301,584,toyota,0.20,0.948 740,71,821,131,toyota,0.97,0.998
../logohunter/data/test/toyota/t1.jpg

And then I realized that I never quite outright told the model the logo was toyota. I imagine toyota was part of the training dataset, so it knows. (Note: these other images were flagged as logos, but just not toyota)

But what happens if I were to give it some random niche logo that it probably never saw before? I imagine it would still identify it as a logo, but would not produce a log entry like above?

Edit: this data output: 31,531,301,584,toyota,0.20,0.948, I assume what this means is that the 0.20 is how confident that it is a "toyota" logo (compared to the training dataset), and 0.948 is how similar it is to the input image I gave? -> this was why I wanted to ask, what if the input image was something it doesn't have a label for?

Trying with YOLOv4

Hi ilmonteux, this approach for similarity detection is perfect. Great work.

I just wanna try your approach with YOLOv4 model weights which is trained for my own case. How can I do this?

Thanks.

Optimizing Algorithm

  1. There is a total of 871 brands , 25000 brand images. So It takes a lot of time approx 10 minutes to compute cosine similarities(0.95 similarity threshold) for 10 - 12 input images. And for 1 input image, it also takes the same time.

  2. Inception feature extractor with 25000 brand images, is not working due to memory error(on 16 GB RAM ). but it works on 12000 brand images.

  3. VGG feature extractor works with 25000 brand images.

All experiments I have done on AWS c2.2xlarge with 16 GB RAM.

Question is that, How we can optimize or minimize computation cost

Where is the yolo pre-trained model?

Hi, ilmonteux. I really like your idea for the general purpose logo detection! And it seems it works perfect based on your example. I tried rerun it and use it with c++. I didn't find the pre-trained yolo model? Could you please show me? If you have time, could we have a short talk about this? BTW, I am also a student of UCI, Zot!

Asking for the dataset

Hello, I did contact the authors to ask for the dataset, but I could not contact them. Could you please share the dataset with me?

Using src/data_all_classes.txt to detect specific brands

How can we use src/data_all_classes.txt? Most of the code in this repo uses src/data_classes.txt and when I try to give a path to a yolo class file with multiple classes, I get a dimension error when trying to build the yolo model.

Rather than detecting generic logos first and then matching them to sample brand images, I was wondering if we could directly access some of the data classes within src/data_all_classes.txt. For instance, maybe I want to detect Nike and Adidas logos directly.

Can we use your pre-trained yolo model (src/keras_yolov3/yolo_weights_logos.h5) with modifications? How would we do this?

tensorflow issue

I was trying to use the logohunter but got error when I run python logohunter.py --test
but seems had a problem with the tensorflow version. What tf version I need to run this script? is it possible run with non-GPU tensorflow?

Thank you

re-training the model

Hi ilmonteux,

I was just wondering, for the re-training instructions you specified here and here. Would following this process with my own dataset produce both the YOLOv3 and INCEPTIONv3 models? Or only the YOLOv3?

I'm primarily asking, because from my testing (with my own random images), your pre-trained model is doing very well in identifying a logo. But seems to be underperforming in rating the level of similarity to the input image. So I was wondering fi a retrain of the INCEPTIONv3 would resolve this.

Thank you!

Use case on new Logo

If I want to use logohunter to identify a completely new logo on images, will it work?
if yes, then which part should I tune?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.