Giter Site home page Giter Site logo

lxtgh / ovr-cnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alirezazareian/ovr-cnn

0.0 1.0 0.0 3.45 MB

A new framework for open-vocabulary object detection, based on maskrcnn-benchmark

License: MIT License

Dockerfile 0.44% Python 70.34% C++ 3.30% Cuda 13.68% Jupyter Notebook 12.24%

ovr-cnn's Introduction

Open Vocabulary Object Detection

This repository provides an implementation of the CVPR 2021 oral paper Open-Vocabulary Object Detection Using Captions. The code is built on top of Facebook's maskrcnn-benchmark. We have also partially used some code from Facebook's ViLbert and HuggingFace's transformers. We appreciate the work of everyone involved in those invaluable projects.

alt text

Jupyter notebook demo

We provide a simple demo that creates a side-by-side video of a regular Faster R-CNN vs. our open-vocabulary detector. To run, just open any of the notebooks inside the demo folder.

Installation

Check INSTALL.md for installation instructions. For the demo to create the video output, it might be necessary to build OpenCV from source instead of installing using pip.

Perform multimedia self-supervised pre-training on COCO captions dataset

For the following examples to work, you need to download the COCO dataset. We recommend to symlink the path to the coco dataset to datasets/. Refer to path_catalog.py for the names of the required files. After setting up the dataset, run:

python -m torch.distributed.launch --nproc_per_node=8 tools/train_net.py --config-file configs/mmss_v07.yaml --skip-test OUTPUT_DIR ~/runs/vltrain/121

Perform fine-tuning (or training from scratch) on COCO object detection dataset

For the zero-shot experiment to work, you need to first create a new annotation json using this notebook. Then run:

python -m torch.distributed.launch --nproc_per_node=8 tools/train_net.py --config-file configs/zeroshot_v06.yaml OUTPUT_DIR ~/runs/maskrcnn/130

Evaluation

You can evaluate using a similar command as above, by running tools/test_net.py and providing the right checkpoint path to MODEL.WEIGHT

Pretrained Models

Our best model is available for download here, and has been trained using this config.

Additional Notes

We did not test all the functionality of maskrcnn_benchmark under the zero-shot settings, such as instance segmentation, or feature pyramid network. Anything besides the provided config files may not work.

Created and maintained by Alireza Zareian.

ovr-cnn's People

Contributors

alirezazareian avatar lxtgh avatar

Watchers

James Cloos 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.