Git Product home page Git Product logo

coco_loss's Introduction

COCO Loss

Update: we have an updated version of this work, which we call COCO_v2 [arXiv] and is accepted to NIPS 2017. The difference from v1 to v2 is that, in a short story, we (a) propose an optimal scale factor imposed on the input feature before COCO loss; (b) experiments are extended to large-scale face recognition datasets beyond PIPA.

The codebase is UPGRADED to COCO_v2. :)

Codebase for Learning Deep Features via Congenerous Cosine Loss for Person Recognition (COCO_v1), [arXiv]. In the paper, we use the newly proposed PIPA dataset for evaluation; it is a large-scale dataset for person recognition.

We provide a sample code for generating distributions of COCO Loss, Softmax Loss and Center Loss as Figure 3 in our paper. Please follow the steps below:

Runing sample code

  1. Compile CaffeMex_v2 with matlab interface

  2. Link (Linux) or copy (Windows) the path CaffeMex_v2/matlab/+caffe to the root directory in this project

  3. Run script_show_minist.m

  4. It takes just few seconds to generate three figures as:

Notice that the distributions are generated based on caffemodels in model/[LOSS_NAME]. You can reproduce the result by using network definition files in model/train_prototxts/.

The proposed COCO loss layer (known as center_projection_layer.cu here) and the normalized layer (here) are two operations related wiht COCO. The gradient derivation in the initial release (v1) on arXiv is wrong; please resort to v2 (latest version): Eqn.(8) in v2 paper corresponds to the implementation around lines here.

Q&A

Here we list some commonly asked questions we received from the public. Thanks for your engagement to make our work matter!

  • Relationship of person recognition task with face recognition, person Re-ID.

    Face recognition is the traditional vision task to recognize a person's identify based solely on face (often with some setting constraints, like frontal faces); whereas the context of person recognition carries more. The main difference between person recognition and re-id resides in the data logistics. The former is to identify the same person across places and time. In most cases, the identity varies a lot in appearance under different occasions. The latter is to detect person in a consecutive video, meaning that the appearance and background do not vary much in terms of time.

  • Training curve looks weird. Any tricks to make COCO work?

    Hah, good question. There are mainly two. First is we initialize the network with a pre-trained model for the re-id task in order for the loss to converge well in a large-scale dataset like PIPA; second is we do not normalize the feature to 1. There are some numerical problems for gradients of centroids if we normalize all features and weights to 1. In MNIST, we initialize the scaler to 1 for weights and 2 for features while in PAPA we set 30 and 100, respectively.

Still having questions?

Feel free to drop us an email sharing your ideas.

Related work

Please refer to the paper for details.

  • Feature Incay for Representation Regularization, [link], arXiv, 2017.
  • Pose-Aware Person Recognition, [link], CVPR, 2017.
  • Cosine Normalization: Using Cosine Similarity Instead of Dot Product in Neural Networks, [link], arXiv, 2017.
  • Large-Margin Softmax Loss for Convolutional Neural Networks, [link], ICML, 2016.

Citation

Please kindly cite our work in your publications if it helps your research:

@proceedings{liu_2017_coco_v2,
  Author = {Liu, Yu and Li, Hongyang and Wang, Xiaogang},
  Title = {Rethinking Feature Discrimination and Polymerization for Large-scale Recognition},
      Conference = {NIPS},
      Year = {2017}
}

@article{liu_2017_coco_v1,
  Author = {Liu, Yu and Li, Hongyang and Wang, Xiaogang},
  Title = {Learning Deep Features via Congenerous Cosine Loss for Person Recognition},
  Journal = {arXiv preprint: 1702.06890},
  Year = {2017}
}

coco_loss's People

Contributors

hli2020 avatar liuyuisanai avatar

Watchers

 avatar  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.