Skip to content
A brand logo detection system using tensorflow object detection API.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
detect_results
query_set_results Update README Jan 27, 2018
LICENSE.txt Add license Aug 11, 2016
README.md
common.py Logo detection Jan 1, 2018
config.py
crop_and_aug.py
detect_logo.py
detection.py Logo Detection in Images Using Tensorflow Object Detection API Aug 29, 2019
flickr_logos_27_label_map.pbtxt Logo Detection in Images Using Tensorflow Object Detection API Aug 29, 2019
gen_bg_class.py Non-max suppression Jan 2, 2018
gen_tfrecord.py Logo Detection in Images Using Tensorflow Object Detection API Aug 29, 2019
gen_train_valid_test.py Increase training size Jan 1, 2018
logo_detection.py
model.py Use xavier initializer Jan 1, 2018
preproc_annot.py Remove duplicate annotations Sep 29, 2019
preprocess.py
ssd_inception_v2.config
test_deep_logo_cnn.py
train.py Logo Detection in Images Using Tensorflow Object Detection API Aug 29, 2019
train_deep_logo_cnn.py fix tf.app.flags.DEFINE_float Apr 14, 2018
util.py Hyper parameter tuning Jan 4, 2018

README.md

DeepLogo

A brand logo detection system using tensorflow object detection API.

Examples

Belows are detection examples.

example1 example2 example3 example4 example5 example6

Usage

  1. Setup the tensorflow object detection API. First of all, clone the tensorflow/models repository.

    $ git clone https://github.com/tensorflow/models.git
    $ cd models/research/object_detection
    $ wget http://download.tensorflow.org/models/object_detection/ssd_inception_v2_coco_2018_01_28.tar.gz
    $ tar zxvf ssd_inception_v2_coco_2018_01_28.tar.gz
    

    For detailed steps to setup, please follow the installation.

  2. Clone the DeepLogo repository.

    $ git clone https://github.com/satojkovic/DeepLogo.git
    
  3. Download dataset from flickr_27_logos_dataset and extract.

    $ cd DeepLogo
    $ wget http://image.ntua.gr/iva/datasets/flickr_logos/flickr_logos_27_dataset.tar.gz
    $ tar zxvf flickr_logos_27_dataset.tar.gz
    $ cd flickr_logos_27_dataset
    $ tar zxvf flickr_logos_27_dataset_images.tar.gz
    $ cd ../
    
  4. Preprocess original annotation file and generate flickr_logos_27_dataset_training_set_annotation_cropped.txt and flickr_logos_27_dataset_test_set_annotation_cropped.txt. These two files are used to generate tfrecord files.

    $ cd DeepLogo
    $ python preproc_annot.py
    
  5. Generate tfrecord files.

    $ python gen_tfrecord.py --csv_input flickr_logos_27_dataset/flickr_logos_27_dataset_training_set_annotation_cropped.txt --img_dir flickr_logos_27_dataset/flickr_logos_27_dataset_images --output_path train.tfrecord
    $ python gen_tfrecord.py --csv_input flickr_logos_27_dataset/flickr_logos_27_dataset_test_set_annotation_cropped.txt --img_dir flickr_logos_27_dataset/flickr_logos_27_dataset_images --output_path test.tfrecord
    
  6. Training logo detector using pre-trained SSD.

    $ python <OBJECT_DETECTION_API_DIR>/legacy/train.py --logtostderr --pipeline_config_path=ssd_inception_v2.config --train_dir=training
    

    <OBJECT_DETECTION_API_DIR> is the absolute path of models/research/object_detection at step1.

  7. Testing logo detector.

    $ python logo_detection.py --model_name logos_inference_graph/ --label_map flickr_logos_27_label_map.pbtxt --test_annot_text flickr_logos_27_dataset/flickr_logos_27_dataset_test_set_annotation_cropped.txt --test_image_dir flickr_logos_27_dataset/flickr_logos_27_dataset_images --output_dir detect_results
    

License

MIT

You can’t perform that action at this time.