Git Product home page Git Product logo

dolg-tensorflow's Introduction

DOLG-TensorFlow

This is an unofficial implementation of Deep Orthogonal Fusion of Local and Global Features (DOLG) in TensorFlow 2 (Keras). Paper. In this repository, the following architechture has been implemented. Details here.

image

Prerequisites

TensorFlow 2.6 
TensorFlow Addons 

Run

First, reset the config file, config.py

BATCH_SIZE  = 10
IMG_SIZE    = 768
CHANNELS    = 3
LR = 0.003
mixed_precision = False

Next, build the DOLG model with EfficientNetB5.

from config import IMG_SIZE, CHANNELS
from model.DOLG import DOLGNet 

print(model(tf.ones((1, IMG_SIZE, IMG_SIZE, CHANNELS)))[0].shape)
display(tf.keras.utils.plot_model(model.build_graph(), 
                                  show_shapes=True, 
                                  show_layer_names=True,
                                  expand_nested=False))

For better flexibility, please see the following code example section.

Code Example

The DOLG concept can be integrated into any computer vision models i.e. NFNet, ResNeSt, or EfficietNet. Here are some end-to-end code examples.

To Do

  • Implement Sub-center Arcface Head.
  • Fix GeM issue.
  • tf-keras-vis

Citations

@misc{yang2021dolg,
      title={DOLG: Single-Stage Image Retrieval with Deep Orthogonal 
                                         Fusion of Local and Global Features}, 
      author={Min Yang and Dongliang He and Miao Fan and Baorong Shi and 
                                        Xuetong Xue and Fu Li and Errui Ding and Jizhou Huang},
      year={2021},
      eprint={2108.02927},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

dolg-tensorflow's People

Contributors

innat avatar

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.