Skip to content

Code for acquisition and 6D pose annotations of 3D object detection datasets

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

ilics/homebrewdb

Repository files navigation

The code for creation of a dataset for 6D pose estimation. The code was used to create the HomebrewedDB dataset.

Requirements

The code uses C++17 and has been tested on Windows platform with MS Visual Studio 2017. Here is the list of libraries with the versions the code has been tested with:

For RGB-D images capturing the follwoing SDKs were used:

Building

Having the required libraries installed and respective environment variables set, each sub-project can be built using CMake and further compiled with Visual Studio.

Environment

rgbd_capture

This project is composed of two modules: librgbdcapture and app. First, build librgbdcapture. Then, to build app, place the respective binaries of librgbdcapture into app/librgbdcapture/lib and app/librgbdcapture/bin.

refiner

This project depends on libqtoffscreenrenderer. Build and compile libqtoffscreenrenderer and place its respective binaries into refiner/third-party/librenderer/lib refiner/third-party/librenderer/bin, then build and compile refiner.

gtwriter

This project depends on libqtoffscreenrenderer. Build and compile libqtoffscreenrenderer and place its respective binaries into gtwriter/third-party/librenderer/lib gtwriter/third-party/librenderer/bin, then build and compile gtwriter.

Other subprojects do not require any particular handling to be built.

Usage

rgbd_capture/app

Used to capture sequences of rgb-d images. Captured images are stored into respective directories <out_dir>/rgb and <out_dir>/depth

{help h       |          | help message   }		
{camera       |          | RGB-D camera (kinect, kinect2, realsense or kinect_azure)}
{num_frames   |          | number of frames to capture}
{async_save   |          | save frames asynchronously or store in memory while capturing}
{out_dir      |          | output directory for images}
{timeout      |          | timeout between frames in ms (for non-async capturing)}

sdf_fusion

Used to filter frames with correctly estimated camera poses. Stores correct poses and respective images, and then performs a dense 3D reconstruction of the scene. Outputs camera_poses.txt, images directory with valid rgb and depth images and a dense reconstruction of the scene in model.ply file.

{help h usage ?  |          | help on usage}
{images_dir      |          | input images dir containing /rgb and /depth dirs}
{config_dir      |          | config dir containing board.yml and dict.yml for AruCo markerboard}
{intrinsics_file |          | file containing row-wise intrinsic matrix}
{marker_size     |  0.0491  | marker size of the markerboard (in meters)}
{voxel_size      |  0.002   | voxel size}
{preprocess      |          | do pose estimation and discarding of frames }
{req_num_frames  |          | out number of frames to perform reconstruction}
{out_dir         |          | out directory for storing camera poses, filtered images, reconstructed mesh}

ppfshapematchinghalcon

Used to estimate poses of 3D models in the densely reconstructed scene. Reference models used for refinement must be stored in a format obj_xxxxx.ply in meters. Poses are ouputed into scene out directory <scene_dir>/object_poses in format xxxxxx.txt and stored as a 4x4 matrix. scene_dir must be a directory where the output of sdf_fusion is stored.

{ help h usage ?  |          | help on usage }
{ref_models_dir   |          | reference models directory}
{scene_dir        |          | directory containing the scene}
{model_ids        |          | comma-separated model ids}
{rel_smp_dist     |   0.05   | relative sampling distance}
{kp_frac          |   0.4    | keypoint fraction}

refiner

Use to refine poses using multi-view edge based refinement on rgb images. scene_dir must be the same directory as used by ppfshapematchinghalcon, where the output of sdf_fusion is stored.

{help h usage ? |          | help on usage }
{scene_dir      |          | path to the scene where poses must be refined}
{model_ids      |     -1   | model ids to be refined, default -1, i.e. refinement for all object_poses}
{config_file    |          | path to the json config file (e.g. see refiner/config/config.json}

gtwriter/scene-gt-writer

Used to write pose ground truth labels for scenes.

{help h               |         | help message}
{intrinsics_file      |         | intrinsics file}
{reference_models_dir |         | directory with reference models}
{scenes_dirs          |         | comma separated scene directories, which will be joined}
{out_dir              |         | output directory}
{copy_images          |         | should re-index images and copy the do the output dir}

gtwriter/model-info-writer

Used to compute meta-info for the 3D models.

{help h      |         | help message }
{models_dir  |         | models dir}

refine-depth

A utility used to estimate a first degree polynomial correction function for depth. The correction function treats depth in meters. The images must capture an empty AruCo markerboard at different distances and elevations.

{help h          |         | help message}
{images_dir      |         | input images dir}
{config_dir      |         | configuration dir with board.yml and dict.yml files for AruCo markerboard}
{intrinsics_file |         | intrinsics file}
{marker_size     |         | marker size in meters}

About

Code for acquisition and 6D pose annotations of 3D object detection datasets

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published