Code Monkey home page Code Monkey logo

bop_toolkit_cosypose's Introduction

BOP Toolkit

A Python toolkit of the BOP benchmark for 6D object pose estimation (http://bop.felk.cvut.cz).

  • bop_toolkit_lib - The core Python library for i/o operations, calculation of pose errors, Python based rendering etc.
  • docs - Documentation and conventions.
  • scripts - Scripts for evaluation, rendering of training images, visualization of 6D object poses etc.

Installation

Python Dependencies

To install the required python libraries, run:

pip install -r requirements.txt

In the case of problems, try to first run: pip install --upgrade pip setuptools

Python Renderer

The Python based renderer is implemented using Glumpy which depends on freetype and GLFW. Glumpy is installed using the pip command above. On Linux, freetype and GLFW can be installed by:

apt-get install freetype
apt-get install libglfw3

To install freetype and GLFW on Windows, follow these instructions.

GLFW serves as a backend of Glumpy. Another backend can be used but were not tested with our code.

C++ Renderer

For fast CPU-based rendering on a headless server, we recommend installing bop_renderer, an off-screen C++ renderer with Python bindings.

Usage

1. Get the BOP datasets

Download the BOP datasets and make sure they are in the expected folder structure.

2. Run your method

Estimate poses and save them in one .csv file per dataset (format description).

3. Configure the BOP Toolkit

In bop_toolkit_lib/config.py, set paths to the BOP datasets, to a folder with results to be evaluated, and to a folder for the evaluation output. The other parameters are necessary only if you want to visualize results or run the C++ Renderer.

4. Evaluate the pose estimates

python scripts/eval_bop19.py --renderer_type=python --result_filenames=NAME_OF_CSV_WITH_RESULTS

--renderer_type: Either "python" or "cpp" (you need to install the C++ Renderer for the latter). --result_filenames: Comma-separated filenames with pose estimates in .csv (examples).

bop_toolkit_cosypose's People

Contributors

martinsmeyer avatar thodan avatar ylabbe avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

yuliangguo

bop_toolkit_cosypose's Issues

The error "AttributeError: module 'collections' has no attribute 'Iterable' "

When I tried to install bop_toolkit, I used pip install -r requirements.txt. However, I found the error information even though I tried pip install --upgrade pip setuptools. The information is as following:

error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [56 lines of output]
      Unable to find pgen, not compiling formal grammar.
      running egg_info
      creating /tmp/pip-pip-egg-info-9dymxhru/Cython.egg-info
      writing /tmp/pip-pip-egg-info-9dymxhru/Cython.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-9dymxhru/Cython.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-pip-egg-info-9dymxhru/Cython.egg-info/entry_points.txt
      writing top-level names to /tmp/pip-pip-egg-info-9dymxhru/Cython.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-9dymxhru/Cython.egg-info/SOURCES.txt'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-cprtfazi/cython_6623ddb2d0bc4d2cb056878928354717/setup.py", line 228, in <module>
          setup(
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/__init__.py", line 104, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 321, in run
          self.find_sources()
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
          mm.run()
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 550, in run
          self.add_defaults()
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
          sdist.add_defaults(self)
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
          super().add_defaults()
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
          build_ext = self.get_finalized_command('build_ext')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command
          cmd_obj.ensure_finalized()
        File "/home/glasgow/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/tmp/pip-install-cprtfazi/cython_6623ddb2d0bc4d2cb056878928354717/Cython/Distutils/build_ext.py", line 20, in finalize_options
          self.distribution.ext_modules[:] = cythonize(
                                             ^^^^^^^^^^
        File "/tmp/pip-install-cprtfazi/cython_6623ddb2d0bc4d2cb056878928354717/Cython/Build/Dependencies.py", line 960, in cythonize
          module_list, module_metadata = create_extension_list(
                                         ^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-cprtfazi/cython_6623ddb2d0bc4d2cb056878928354717/Cython/Build/Dependencies.py", line 754, in create_extension_list
          elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
                                                                            ^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'collections' has no attribute 'Iterable'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

What can I do for this? I will appreciate it if someone can kindly help me!

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.