GithubHelp home page GithubHelp logo

jnulab / parts-object-context Goto Github PK

View Code? Open in Web Editor NEW

This project forked from agonzgarc/parts-object-context

0.0 1.0 1.0 2.88 MB

Code for "Objects as Context for Part Detection".

Home Page: http://calvin.inf.ed.ac.uk/

License: Other

MATLAB 93.88% C++ 6.12%

parts-object-context's Introduction

Semantic Part Detection with Object Context

Parts-Object-Context implements our work [1] on semantic part detection. This method is an extension of Fast R-CNN [2] to jointly detect objects and their parts. It uses the object appearance and its class as indicators of what parts to expect. Additionally, it also models the expected relative location of parts inside the objects based on their appearance, using a new network module called Offset Net. By combining all these cues, our method detects parts in the context of their objects and significantly outperform part detection approaches using part appearance alone. Code created by Abel Gonzalez-Garcia.

Overview of our model: Overview of our part detection approach

Overview

Dependencies

Installation

  • Install Matlab R2015a (or newer) and Git
  • Clone the repository and its submodules from your shell
    • git clone https://github.com/agonzgarc/matconvnet-calvin.git
    • cd matconvnet-calvin
    • git submodule update --init
  • Execute the following Matlab commands
    • Setup MatConvNet
      • cd matconvnet/matlab; vl_compilenn('EnableGpu', true); cd ../..;
    • Setup MatConvNet-Calvin
      • cd matconvnet-calvin/matlab; vl_compilenn_calvin(); cd ../..;
    • Add files to Matlab path
      • setup();
  • (Optional) Download pretrained models:
    • Parts: downloadModel('parts_baseline'); downloadModel('parts_objappcls'); downloadModel('parts_offsetnet')

Instructions

  • Usage: Run demo_parts()
  • What: This script downloads the datasets (PASCAL VOC2010 and PASCAL-Part), network (AlexNet) and Selective Search code. It creates the structures with all the necessary object and part information. After this, it first trains the baseline model for joint object and part detection and then it trains our model with object appearance and class branches, initialized with the previously trained baseline model. Finally, it trains Offset Net and merges it with the model that contains the object branches to obtain our final model.
  • Model: Training the baseline model takes about 8h on a Titan X GPU. On the same GPU, the model with object appearance and class takes about 10h and Offset Net takes 5h. If you just want to use them you can download the pretrained models in the installation step above. Then run the demo to see the test results.
  • Results: If the program executes correctly, it will print the per-class results in average precision and their mean (mAP) for each of the 105 part classes in PASCAL-Part and 20 objects classes in PASCAL VOC. The baseline model achieves 22.0% mAP for parts (48.7% mAP for objects) on the validation set using no external training data nor bounding-box regression, whereas the model with object appearance and class achieves 25.9% mAP (49.9% mAP for objects). Finally, our full model with relative location achieves 27.3% mAP.
  • Note: The results vary due to the random order of images presented during training. To reproduce the above results we fix the initial seed of the random number generator.

References

Disclaimer

This software is covered by the FreeBSD License. See LICENSE.MD for more details.

Contact

If you run into any problems with this code, please submit a bug report on the Github site of the project. For other inquiries contact a.gonzalez-garcia-at-sms.ed.ac.uk

parts-object-context's People

Contributors

ankush-me avatar hyenal avatar jaderberg avatar jrruijli avatar lanpa avatar lenck avatar mfigurnov avatar nightrome avatar omkarparkhi avatar suhangpro avatar vedaldi avatar

Watchers

 avatar

Forkers

jnu-projxs

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.