Skip to content

fubowen1229/bop_toolkit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Update

By Fu Bowen

  1. Add _init_paths and update lib import

  2. Update metrics: ADD, ADI, etc
    Choose different metrics in eval_bop19.py after line 21

  3. Add underwater_bop dataset
    Add ./scripts/calc_gt_masks_forUnderwaterBOP.py
    Add ./scripts/calc_gt_info_forUnderwaterBOP.py, but the bbox is wrong, not used

There is only 1 object in underwater_bop dataset. No occlusion.
Therefore mask_visib is the same as mask and depth images are not used.

NOTE: Pay attention to TODO!
NOTE: Only calc_gt_masks_forUnderwaterBOP.py are used. There may be bugs in other scripts.

  1. Update ./scripts/remesh_models_for_eval.py on Linux
    Add ./scripts/remesh_model_eval for generating models_eval

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

About

A Python toolkit of the BOP benchmark for 6D object pose estimation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%