GithubHelp home page GithubHelp logo

lotka / detectron2_ros Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidfernandezchaves/detectron2_ros

0.0 1.0 0.0 28 KB

A ROS Node for detecting objects using Detectron2.

License: MIT License

CMake 54.47% Python 45.53%

detectron2_ros's Introduction

Detectron2 Object Detector for ROS

A ROS Node for detecting objects using Detectron2.

Installation

It is necessary to install Detectron2 requirements in a python virtual environment as it requires Python 3.6 and ROS works with Python 2.7

  1. Install python Virtual Environment
sudo apt-get install python-pip
sudo pip install virtualenv
mkdir ~/.virtualenvs
sudo pip install virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
echo '. /usr/local/bin/virtualenvwrapper.sh' >> ~/.bashrc 
  1. Creating Virtual Environment
mkvirtualenv --python=python3 detectron2_ros
  1. Install the dependencies in the virtual environment
pip install -U torch==1.4+cu100 torchvision==0.5+cu100 -f https://download.pytorch.org/whl/torch_stable.html
pip install cython pyyaml==5.1
pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu100/index.html
pip install opencv-python
pip install rospkg

Downloading the Package

  1. Clone the package to the ROS workspace using git tools
git clone https://github.com/DavidFernandezChaves/detectron2_ros.git
cd detectron2_ros
git pull --all
git submodule update --init

Compilation

  1. Attention: DO NOT USE the python virtual environment previously built to compile catking packages.
catkin_make
source $HOME/.bashrc

Running

  1. First launch ROScore into a terminal.

  2. Next, open a new terminal and use the virtual environment created.

workon detectron2_ros
  1. Running the node
roslaunch detectron2_ros detectron2_ros.launch

Arguments

The following arguments can be set on the roslaunch above.

  • input: image topic name
  • detection_threshold: threshold to filter the detection results [0, 1]
  • visualization: True or False to pubish the result like a image
  • publish_rate: Published frequency
  • model: path to the training model file. For example: /detectron2/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml

Citing Detectron

If you use Detectron2 in your research or wish to refer to the baseline results published in the Model Zoo, please use the following BibTeX entry.

@misc{wu2019detectron2,
  author =       {Yuxin Wu and Alexander Kirillov and Francisco Massa and
                  Wan-Yen Lo and Ross Girshick},
  title =        {Detectron2},
  howpublished = {\url{https://github.com/facebookresearch/detectron2}},
  year =         {2019}
}

detectron2_ros's People

Contributors

davidfernandezchaves avatar

Watchers

 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.