[CVPR2021 Oral] FFB6D: A Full Flow Bidirectional Fusion Network for 6D Pose Estimation.

Overview

FFB6D

This is the official source code for the CVPR2021 Oral work, FFB6D: A Full Flow Biderectional Fusion Network for 6D Pose Estimation. (Arxiv)

Table of Content

Introduction & Citation

FFB6D is a general framework for representation learning from a single RGBD image, and we applied it to the 6D pose estimation task by cascading downstream prediction headers for instance semantic segmentation and 3D keypoint voting prediction from PVN3D(Arxiv, Code, Video). At the representation learning stage of FFB6D, we build bidirectional fusion modules in the full flow of the two networks, where fusion is applied to each encoding and decoding layer. In this way, the two networks can leverage local and global complementary information from the other one to obtain better representations. Moreover, at the output representation stage, we designed a simple but effective 3D keypoints selection algorithm considering the texture and geometry information of objects, which simplifies keypoint localization for precise pose estimation.

Please cite FFB6D & PVN3D if you use this repository in your publications:

@InProceedings{He_2021_CVPR,
author = {He, Yisheng and Huang, Haibin and Fan, Haoqiang and Chen, Qifeng and Sun, Jian},
title = {FFB6D: A Full Flow Bidirectional Fusion Network for 6D Pose Estimation},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2021}
}

@InProceedings{He_2020_CVPR,
author = {He, Yisheng and Sun, Wei and Huang, Haibin and Liu, Jianran and Fan, Haoqiang and Sun, Jian},
title = {PVN3D: A Deep Point-Wise 3D Keypoints Voting Network for 6DoF Pose Estimation},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020}
}

Installation

  • Install CUDA 10.1 / 10.2

  • Set up python3 environment from requirement.txt:

    pip3 install -r requirement.txt 
  • Install apex:

    git clone https://github.com/NVIDIA/apex
    cd apex
    export TORCH_CUDA_ARCH_LIST="6.0;6.1;6.2;7.0;7.5"  # set the target architecture manually, suggested in issue https://github.com/NVIDIA/apex/issues/605#issuecomment-554453001
    pip3 install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
    cd ..
  • Install normalSpeed, a fast and light-weight normal map estimator:

    git clone https://github.com/hfutcgncas/normalSpeed.git
    cd normalSpeed/normalSpeed
    python3 setup.py install --user
    cd ..
  • Install tkinter through sudo apt install python3-tk

  • Compile RandLA-Net operators:

    cd ffb6d/models/RandLA/
    sh compile_op.sh

Code Structure

[Click to expand]
  • ffb6d
    • ffb6d/common.py: Common configuration of dataset and models, eg. dataset path, keypoints path, batch size and so on.
    • ffb6d/datasets
      • ffb6d/datasets/ycb
        • ffb6d/datasets/ycb/ycb_dataset.py: Data loader for YCB_Video dataset.
        • ffb6d/datasets/ycb/dataset_config
          • ffb6d/datasets/ycb/dataset_config/classes.txt: Object list of YCB_Video dataset.
          • ffb6d/datasets/ycb/dataset_config/radius.txt: Radius of each object in YCB_Video dataset.
          • ffb6d/datasets/ycb/dataset_config/train_data_list.txt: Training set of YCB_Video datset.
          • ffb6d/datasets/ycb/dataset_config/test_data_list.txt: Testing set of YCB_Video dataset.
        • ffb6d/datasets/ycb/ycb_kps
          • ffb6d/datasets/ycb/ycb_kps/{obj_name}_8_kps.txt: ORB-FPS 3D keypoints of an object in the object coordinate system.
          • ffb6d/datasets/ycb/ycb_kps/{obj_name}_corners.txt: 8 corners of the 3D bounding box of an object in the object coordinate system.
    • ffb6d/models
      • ffb6d/models/ffb6d.py: Network architecture of the proposed FFB6D.
      • ffb6d/models/cnn
        • ffb6d/models/cnn/extractors.py: Resnet backbones.
        • ffb6d/models/cnn/pspnet.py: PSPNet decoder.
        • ffb6d/models/cnn/ResNet_pretrained_mdl: Resnet pretraiend model weights.
      • ffb6d/models/loss.py: loss calculation for training of FFB6D model.
      • ffb6d/models/pytorch_utils.py: pytorch basic network modules.
      • ffb6d/models/RandLA/: pytorch version of RandLA-Net from RandLA-Net-pytorch
    • ffb6d/utils
      • ffb6d/utils/basic_utils.py: basic functions for data processing, visualization and so on.
      • ffb6d/utils/meanshift_pytorch.py: pytorch version of meanshift algorithm for 3D center point and keypoints voting.
      • ffb6d/utils/pvn3d_eval_utils_kpls.py: Object pose esitimation from predicted center/keypoints offset and evaluation metrics.
      • ffb6d/utils/ip_basic: Image Processing for Basic Depth Completion from ip_basic.
      • ffb6d/utils/dataset_tools
        • ffb6d/utils/dataset_tools/DSTOOL_README.md: README for dataset tools.
        • ffb6d/utils/dataset_tools/requirement.txt: Python3 requirement for dataset tools.
        • ffb6d/utils/dataset_tools/gen_obj_info.py: Generate object info, including SIFT-FPS 3d keypoints, radius etc.
        • ffb6d/utils/dataset_tools/rgbd_rnder_sift_kp3ds.py: Render rgbd images from mesh and extract textured 3d keypoints (SIFT/ORB).
        • ffb6d/utils/dataset_tools/utils.py: Basic utils for mesh, pose, image and system processing.
        • ffb6d/utils/dataset_tools/fps: Furthest point sampling algorithm.
        • ffb6d/utils/dataset_tools/example_mesh: Example mesh models.
    • ffb6d/train_ycb.py: Training & Evaluating code of FFB6D models for the YCB_Video dataset.
    • ffb6d/demo.py: Demo code for visualization.
    • ffb6d/train_ycb.sh: Bash scripts to start the training on the YCB_Video dataset.
    • ffb6d/test_ycb.sh: Bash scripts to start the testing on the YCB_Video dataset.
    • ffb6d/demo_ycb.sh: Bash scripts to start the demo on the YCB_Video_dataset.
    • ffb6d/train_log
      • ffb6d/train_log/ycb
        • ffb6d/train_log/ycb/checkpoints/: Storing trained checkpoints on the YCB_Video dataset.
        • ffb6d/train_log/ycb/eval_results/: Storing evaluated results on the YCB_Video_dataset.
        • ffb6d/train_log/ycb/train_info/: Training log on the YCB_Video_dataset.
  • requirement.txt: python3 environment requirements for pip3 install.
  • figs/: Images shown in README.

Datasets

  • YCB-Video: Download the YCB-Video Dataset from PoseCNN. Unzip it and link the unzippedYCB_Video_Dataset to ffb6d/datasets/ycb/YCB_Video_Dataset:

    ln -s path_to_unzipped_YCB_Video_Dataset ffb6d/datasets/ycb/

Training and evaluating

Training on the YCB-Video Dataset

  • Start training on the YCB-Video Dataset by:

    # commands in train_ycb.sh
    n_gpu=8  # number of gpu to use
    python3 -m torch.distributed.launch --nproc_per_node=$n_gpu train_ycb.py --gpus=$n_gpu

    The trained model checkpoints are stored in train_log/ycb/checkpoints/

    A tip for saving GPU memory: you can open the mixed precision mode to save GPU memory by passing parameters opt_level=O1 to train_ycb.py. The document for apex mixed precision trainnig can be found here.

Evaluating on the YCB-Video Dataset

  • Start evaluating by:
    # commands in test_ycb.sh
    tst_mdl=train_log/ycb/checkpoints/FFB6D_best.pth.tar  # checkpoint to test.
    python3 -m torch.distributed.launch --nproc_per_node=1 train_ycb.py --gpu '0' -eval_net -checkpoint $tst_mdl -test -test_pose # -debug
    You can evaluate different checkpoints by revising the tst_mdl to the path of your target model.
  • Pretrained model: We provide our pre-trained models on onedrive, here. Download the pre-trained model, move it to train_log/ycb/checkpoints/ and modify tst_mdl for testing.

Demo/visualization on the YCB-Video Dataset

  • After training your model or downloading the pre-trained model, you can start the demo by:
    # commands in demo_ycb.sh
    tst_mdl=train_log/ycb/checkpoints/FFB6D_best.pth.tar
    python3 -m demo -checkpoint $tst_mdl -dataset ycb
    The visualization results will be stored in train_log/ycb/eval_results/pose_vis.

Results

  • Evaluation result without any post refinement on the YCB-Video dataset:

    PoseCNN PointFusion DenseFusion PVN3D Our FFF6D
    ADDS ADD(S) ADDS ADD(S) ADDS ADD(S) ADDS ADD(S) ADDS ADD(S)
    ALL 75.8 59.9 83.9 - 91.2 82.9 95.5 91.8 96.6 92.7
  • Evaluation result on the LineMOD dataset:

    RGB RGB-D
    PVNet CDPN DPOD PointFusion DenseFusion(iterative) G2L-Net PVN3D FFF6D
    MEAN 86.3 89.9 95.2 73.7 94.3 98.7 99.4 99.7
  • Robustness upon occlusion:

  • Model parameters and speed on the LineMOD dataset (one object / frame) with one 2080Ti GPU:
    Parameters Network Forward Pose Estimation All time
    PVN3D 39.2M 170ms 20ms 190ms
    FFF6D
    33.8M 57ms 18ms 75ms

Adaptation to New Dataset

  • Install and generate required mesh info following DSTOOL_README.

  • Modify info of your new dataset in FFB6D/ffb6d/common.py

  • Write your dataset preprocess script following FFB6D/ffb6d/datasets/ycb/ycb_dataset.py. Note that you should modify or call the function that get your model info, such as 3D keypoints, center points, and radius properly.

  • (Very Important!) Visualize and check if you process the data properly, eg, the projected keypoints and center point, the semantic label of each point, etc. For example, you can visualize the projected center point (red point) and selected keypoints (orange points) as follow by running python3 -m datasets.ycb.ycb_dataset.

  • For inference, make sure that you load the 3D keypoints, center point, and radius of your objects in the object coordinate system properly in FFB6D/ffb6d/utils/pvn3d_eval_utils.py.

  • Check that all setting are modified properly by using the ground truth information for evaluation. The result should be high and close to 100 if everything is correct. For example, testing ground truth on the YCB_Video dataset by passing -test_gt parameters to train_ycb.py will get results higher than 99.99:

    tst_mdl=train_log/ycb/checkpoints/FFB6D_best.pth.tar
    python3 -m torch.distributed.launch --nproc_per_node=1 train_ycb.py --gpu '0' -eval_net -checkpoint $tst_mdl -test -test_pose -test_gt
    

To Do

  • Scripts and pre-trained models for LineMOD dataset.

License

Licensed under the MIT License.

Comments
  • bugs in compile

    bugs in compile

    Hi,

    When I try to compile the normalSpeed, I got the error: (FFB6D) lzl@lzl:~/Desktop/FFB6D/normalSpeed/normalSpeed$ python3 setup.py install --user running install running bdist_egg running egg_info creating normalSpeed.egg-info writing normalSpeed.egg-info/PKG-INFO writing dependency_links to normalSpeed.egg-info/dependency_links.txt writing top-level names to normalSpeed.egg-info/top_level.txt writing manifest file 'normalSpeed.egg-info/SOURCES.txt' reading manifest file 'normalSpeed.egg-info/SOURCES.txt' writing manifest file 'normalSpeed.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenCV: /usr/local (found suitable version "3.4.5", minimum required is "3") -- Found PythonLibs: /home/lzl/miniconda3/envs/FFB6D/lib/libpython3.6m.so (found suitable version "3.6.13", minimum required is "3") -- Found PythonInterp: /home/lzl/miniconda3/envs/FFB6D/bin/python3 (found version "3.6.13") -- Found PythonLibs: /home/lzl/miniconda3/envs/FFB6D/lib/libpython3.6m.so -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- Found pybind11: /home/lzl/.local/include (found version "2.9.2") -- Found NumPy: /home/lzl/.local/lib/python3.6/site-packages/numpy/core/include (found version "1.19.5") -- Configuring done -- Generating done -- Build files have been written to: /home/lzl/Desktop/FFB6D/normalSpeed/normalSpeed/build/temp.linux-x86_64-3.6 Scanning dependencies of target normalSpeed [ 25%] Building CXX object CMakeFiles/normalSpeed.dir/normal.cpp.o [ 50%] Building CXX object CMakeFiles/normalSpeed.dir/pybind11.cpp.o In file included from /home/lzl/Desktop/FFB6D/normalSpeed/normalSpeed/normal.cpp:1:0: /home/lzl/Desktop/FFB6D/normalSpeed/normalSpeed/normal.hpp:5:10: fatal error: opencv2/rgbd.hpp: No such file or directory #include <opencv2/rgbd.hpp> ^~~~~~~~~~~~~~~~~~ compilation terminated. CMakeFiles/normalSpeed.dir/build.make:62: recipe for target 'CMakeFiles/normalSpeed.dir/normal.cpp.o' failed make[2]: *** [CMakeFiles/normalSpeed.dir/normal.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /home/lzl/Desktop/FFB6D/normalSpeed/normalSpeed/pybind11.cpp:4:0: /home/lzl/Desktop/FFB6D/normalSpeed/normalSpeed/normal.hpp:5:10: fatal error: opencv2/rgbd.hpp: No such file or directory #include <opencv2/rgbd.hpp> ^~~~~~~~~~~~~~~~~~ compilation terminated. CMakeFiles/normalSpeed.dir/build.make:86: recipe for target 'CMakeFiles/normalSpeed.dir/pybind11.cpp.o' failed make[2]: *** [CMakeFiles/normalSpeed.dir/pybind11.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/normalSpeed.dir/all' failed make[1]: *** [CMakeFiles/normalSpeed.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 Traceback (most recent call last): File "setup.py", line 67, in <module> zip_safe=False, File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup return distutils.core.setup(**attrs) File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 164, in run cmd = self.call_command('install_lib', warn_dir=0) File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command self.run_command(cmdname) File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/command/install_lib.py", line 107, in build self.run_command('build_ext') File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "setup.py", line 33, in run self.build_extension(ext) File "setup.py", line 58, in build_extension subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) File "/home/lzl/miniconda3/envs/FFB6D/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.

    I have installed Opencv3.4.5.

    opened by LZL-CS 20
  • Evaluating on the LineMOD Dataset,“TypeError: must be real number, not list”

    Evaluating on the LineMOD Dataset,“TypeError: must be real number, not list”

    When I evaluate LineMOD by sh test_lm.sh, I have met this question.

    kps_pth in get_kps: datasets/linemod/kps_orb9_fps/ape_8_kps.txt loss_rgbd_seg 0.0031760090761374505 loss_kp_of 0.48176388206936066 loss_ctr_of 0.038992881453817796 loss_all 0.527108782359532 loss_target 0.527108782359532 acc_rgbd 99.66883713858469 obj_id: 1 0.1 diameter: 0.010209865663 1 ape ***************add auc: 64.65965404030123 ***************adds auc: 87.38284107699322 ***************add(-s) auc: 64.65965404030123 ***************add < 0.1 diameter: 1.5238095238095237 ***************adds < 0.1 diameter: 85.90476190476191 Traceback (most recent call last): File "train_lm.py", line 694, in train() File "train_lm.py", line 676, in train test_loader, is_test=True, test_pose=args.test_pose File "train_lm.py", line 413, in eval_epoch seg_res_fn += '_%s%.2f' % (k, v) TypeError: must be real number, not list

    There anyone else have the some question? Or can help me solve this question. Please! thanks a lot!

    opened by d-serafly 7
  • undefined symbol: PyThread_tss_get

    undefined symbol: PyThread_tss_get

    This issue comes from sh demo_ycb.sh apex and normalSpeed were successfully installed. full error message

    Traceback (most recent call last):
      File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/home/halodi/test_2_venv/FFB6D/ffb6d/demo.py", line 19, in <module>
        from datasets.ycb.ycb_dataset import Dataset as YCB_Dataset
      File "/home/halodi/test_2_venv/FFB6D/ffb6d/datasets/ycb/ycb_dataset.py", line 11, in <module>
        from utils.basic_utils import Basic_Utils
      File "/home/halodi/test_2_venv/FFB6D/ffb6d/utils/basic_utils.py", line 9, in <module>
        import normalSpeed
    ImportError: /home/halodi/.local/lib/python3.6/site-packages/normalSpeed-0.0.1-py3.6-linux-x86_64.egg/normalSpeed.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyThread_tss_get
    
    
    opened by an99990 6
  • bugs when compile

    bugs when compile

     Could not find a configuration file for package "OpenCV" that is compatible
      with requested version "3".
    
      The following configuration files were considered but not accepted:
    
        /usr/lib/x86_64-linux-gnu/cmake/opencv4/OpenCVConfig.cmake, version: 4.2.0
        /lib/x86_64-linux-gnu/cmake/opencv4/OpenCVConfig.cmake, version: 4.2.0
    

    I installed Opencv3 as your requirement.txt

    opened by cuge1995 6
  • Visualization: Wrong Translation & Rotation

    Visualization: Wrong Translation & Rotation

    I seem to have a problem with the visualization of my data. The center and keypoints are placed correctly over my object. However, it does not take into account the real position and translation. I add an image for easier explanation:

    image

    As you can see the mask is placed correctly over the object. However, the pose as translation of the placed object does not match the actual one a bit. I am confused on how this is possible, since I got the annotations and everything from blenderproc, it should be correct.

    However, to create rendered and fused data, I used premade sampled RTs poses from other objects, since i couldn't find where in pvnet-rendering to produce them myself. I am not sure if this causes the error?

    Maybe I did something wrong with the .ply export? I am not sure what it means to export it in meters. I just modeled the real thing and scaled it up to be 1000 times as big in blender. The measurements of distance etc were then correct.

    opened by MiriamJo 5
  •  module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cuda:2

    module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cuda:2

    Traceback (most recent call last):
    File "train_ycb.py", line 672, in train() File "train_ycb.py", line 663, in train clr_div=clr_div File "train_ycb.py", line 468, in train _, loss, res = self.model_fn(self.model, batch, it=it) File "train_ycb.py", line 229, in model_fn end_points = model(cu_dt) File "/home/xxx/anaconda3/envs/gorilla/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/home/xxx/anaconda3/envs/gorilla/lib/python3.7/site-packages/torch/nn/parallel/distributed.py", line 447, in forward output = self.module(*inputs[0], **kwargs[0]) File "/home/xxx/anaconda3/envs/gorilla/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/home/xxx/anaconda3/envs/gorilla/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 146, in forward "them on device: {}".format(self.src_device_obj, t.device)) RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cuda:2

    How could I solve this bug? Thank you!

    opened by aragakiyui611 5
  • weighted loss (different from paper PVN3d)

    weighted loss (different from paper PVN3d)

    Hi Yisheng,

    You indicated that you followed the previous work PVN3D to set the weights to 1,1,1 in paper FFB6D. In fact, it is 2,1,1. It is a mistake or do you find these weights would lead to better performance?

    loss_lst = [
                    (loss_rgbd_seg, 2.0), (loss_kp_of, 1.0), (loss_ctr_of, 1.0),
                ]
                loss = sum([ls * w for ls, w in loss_lst])
    
    opened by MinWang1997 4
  • error when install apex and compile normalSpeed

    error when install apex and compile normalSpeed

    Hi all,

    I create a conda .yml file and another requirements.txt for creating conda environment because I followed the tutorial of my administrator of GPU cluster to use conda install at first and only use pip when the packages are not available on conda.

    However, I got some errors when I install apex as the following:

    apex install

    After that, I add apex into .yml file and install NormalSpeed but I got the same error as this issue.

    Could you help me fix it?

    These are my .yml and .txt files . conda_yml pip requrements

    Best, Min

    opened by MinWang1997 4
  • normalSpeed compile error

    normalSpeed compile error

    First of all, congratulations on your excellent work, but I encountered a compilation error when using your open source code. I hope you can help. For this, I am grateful.

    root@6ff4287af8c0:/mnt/txf/codes/FFB6D/normalSpeed/normalSpeed# python setup.py install --user running install running bdist_egg running egg_info writing normalSpeed.egg-info/PKG-INFO writing dependency_links to normalSpeed.egg-info/dependency_links.txt writing top-level names to normalSpeed.egg-info/top_level.txt reading manifest file 'normalSpeed.egg-info/SOURCES.txt' writing manifest file 'normalSpeed.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

    Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

    CMake Deprecation Warning at Cmake/FindNumPy.cmake:6 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

    Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. Call Stack (most recent call first): CMakeLists.txt:14 (include)

    -- Configuring done -- Generating done -- Build files have been written to: /mnt/txf/codes/FFB6D/normalSpeed/normalSpeed/build/temp.linux-x86_64-3.6 [ 25%] Building CXX object CMakeFiles/normalSpeed.dir/pybind11.cpp.o [ 50%] Building CXX object CMakeFiles/normalSpeed.dir/normal.cpp.o In file included from /mnt/txf/codes/FFB6D/normalSpeed/normalSpeed/normal.cpp:1:0: /mnt/txf/codes/FFB6D/normalSpeed/normalSpeed/normal.hpp:5:28: fatal error: opencv2/rgbd.hpp: No such file or directory #include <opencv2/rgbd.hpp> ^ compilation terminated. In file included from /mnt/txf/codes/FFB6D/normalSpeed/normalSpeed/pybind11.cpp:4:0: /mnt/txf/codes/FFB6D/normalSpeed/normalSpeed/normal.hpp:5:28: fatal error: opencv2/rgbd.hpp: No such file or directory #include <opencv2/rgbd.hpp> ^ compilation terminated. CMakeFiles/normalSpeed.dir/build.make:75: recipe for target 'CMakeFiles/normalSpeed.dir/normal.cpp.o' failed make[2]: *** [CMakeFiles/normalSpeed.dir/normal.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... CMakeFiles/normalSpeed.dir/build.make:89: recipe for target 'CMakeFiles/normalSpeed.dir/pybind11.cpp.o' failed make[2]: *** [CMakeFiles/normalSpeed.dir/pybind11.cpp.o] Error 1 CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/normalSpeed.dir/all' failed make[1]: *** [CMakeFiles/normalSpeed.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: *** [all] Error 2 Traceback (most recent call last): File "setup.py", line 67, in zip_safe=False, File "/usr/local/lib/python3.6/dist-packages/setuptools/init.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/bdist_egg.py", line 172, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/local/lib/python3.6/dist-packages/setuptools/command/bdist_egg.py", line 158, in call_command self.run_command(cmdname) File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/usr/lib/python3.6/distutils/command/install_lib.py", line 109, in build self.run_command('build_ext') File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "setup.py", line 33, in run self.build_extension(ext) File "setup.py", line 58, in build_extension subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.

    opened by small-beebee 4
  • Use test dataset as validation set

    Use test dataset as validation set

    Hi Yisheng,

    How did you validate the model and tune hyper parameter? I found that you used test dataset as validation set and also used test set for testing, i.e., you use test data during training.

    I learned from Machine learning course that a learning curve of loss on training and validation datasets will indicate overfitting if the curve of training data drops and may plateau and the curve for validation set will drops at first and then begins to rise.

    It's important to use new data when evaluating our model to prevent the likelihood of overfitting to the training set. However, sometimes it's useful to evaluate our model as we're building it to find that best parameters of a model - but we can't use the test set for this evaluation or else we'll end up selecting the parameters that perform best on the test data but maybe not the parameters that generalize best. To evaluate the model while still building and tuning the model, we create a third subset of the data known as the validation set. A typical train/test/validation split would be to use 60% of the data for training, 20% of the data for validation, and 20% of the data for testing.

    It is also important to shuffle the data before making these splits and training, however, you set shuffle to false for the training data loader.

    opened by MinWang1997 3
  • how to get all the points of point cloud?

    how to get all the points of point cloud?

    opened by MinWang1997 3
  • How to get the predicted pose by RGBD?

    How to get the predicted pose by RGBD?

    If I use my Linemod dataset to train a weight file, how can I get the prediction result through the RGBD obtained by RealSense? Is there such an interface in the repo? @ethnhe Thanks for your reply!

    opened by bjutlss 0
  • pickle file size

    pickle file size

    Hello first of all thanks for this amazing work! I'm trying to train the model in my own custom dataset and therefore I'm producing the rendered and fused data as described. I noticed though that the pickle (pkl) dataset is a lot bigger than a normal dataset with the rgbs, masks, depths and ground truth poses separated. So I wonder why you picked that file format in order to generate the synthetic data?

    Thank you.

    opened by fbas-est 0
  • LineMod Multi-object pose estimation?

    LineMod Multi-object pose estimation?

    FOR LINEMOD DATASET: Is the code able to provide poses for objects irrespective of class label? i.e. can the model be trained without the 'cls' arg.

    Or is there existing support in the code for dealing with this?

    I can change n_objects in common.py, make adjustments for labels in linemod_dataset.py and use MeanShift.fit_multi_clus, but I am unable to correct it so it trains.

    As the code is, is a model only trainable for 1 object class at a time? I presumed I do not need to add a module to handle number of found objects, but now I am not so sure.

    opened by nachi9211 1
  • New model need to be trained with a new camera?

    New model need to be trained with a new camera?

    Hi @ethnhe, is that true that the model only works with the same camera? what if we have a new camera and we know its intrinsic matrix, do we still have to generate all the training data and retrain the model?

    opened by daihongxia 0
  • installation for Ubuntu 20.4

    installation for Ubuntu 20.4

    I am using Ubuntu 20.04 and met some errors while building the environment.

    Below are somewhat useful trouble-shooting tips.

    Python / Pytorch

    Python3.6.9 conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

    New requirement

    h5py
    numpy
    pyyaml==5.4.1
    enum34
    future
    scipy==1.4.1
    opencv_contrib_python==3.4.2.16
    matplotlib==3.0.2
    transforms3d==0.3.1
    scikit_image==0.13.1
    lmdb==0.94
    setuptools==41.0.0
    cffi==1.11.5
    easydict==1.7
    plyfile==0.6
    pillow==8.2.0
    glumpy
    tqdm
    tensorboardX
    pandas
    scikit-learn
    scipy
    

    NormalSpeed

    find opencv / 3->4

    pybind-11 https://github.com/ethnhe/FFB6D/issues/17#issuecomment-873929856

    int -> cv::AccessFlag https://github.com/iterait/hipipe/issues/22#issuecomment-441410689

    This env works well for all training/testing. But training with mixed precision dose not work.

    opened by hongsukchoi 0
Owner
Yisheng (Ethan) He
Ph.D. student @ HKUST
Yisheng (Ethan) He
Implementation of "Bidirectional Projection Network for Cross Dimension Scene Understanding" CVPR 2021 (Oral)

Bidirectional Projection Network for Cross Dimension Scene Understanding CVPR 2021 (Oral) [ Project Webpage ] [ arXiv ] [ Video ] Existing segmentatio

Hu Wenbo 135 Dec 26, 2022
Deep Dual Consecutive Network for Human Pose Estimation (CVPR2021)

Deep Dual Consecutive Network for Human Pose Estimation (CVPR2021) Introduction This is the official code of Deep Dual Consecutive Network for Human P

null 295 Dec 29, 2022
Code for "PVNet: Pixel-wise Voting Network for 6DoF Pose Estimation" CVPR 2019 oral

Good news! We release a clean version of PVNet: clean-pvnet, including how to train the PVNet on the custom dataset. Use PVNet with a detector. The tr

ZJU3DV 722 Dec 27, 2022
UnFlow: Unsupervised Learning of Optical Flow with a Bidirectional Census Loss

UnFlow: Unsupervised Learning of Optical Flow with a Bidirectional Census Loss This repository contains the TensorFlow implementation of the paper UnF

Simon Meister 270 Nov 6, 2022
Just Go with the Flow: Self-Supervised Scene Flow Estimation

Just Go with the Flow: Self-Supervised Scene Flow Estimation Code release for the paper Just Go with the Flow: Self-Supervised Scene Flow Estimation,

Himangi Mittal 50 Nov 22, 2022
The official repo for CVPR2021——ViPNAS: Efficient Video Pose Estimation via Neural Architecture Search.

ViPNAS: Efficient Video Pose Estimation via Neural Architecture Search [paper] Introduction This is the official implementation of ViPNAS: Efficient V

Lumin 42 Sep 26, 2022
SE3 Pose Interp - Interpolate camera pose or trajectory in SE3, pose interpolation, trajectory interpolation

SE3 Pose Interpolation Pose estimated from SLAM system are always discrete, and

Ran Cheng 4 Dec 15, 2022
Code for "Single-view robot pose and joint angle estimation via render & compare", CVPR 2021 (Oral).

Single-view robot pose and joint angle estimation via render & compare Yann Labbé, Justin Carpentier, Mathieu Aubry, Josef Sivic CVPR: Conference on C

Yann Labbé 51 Oct 14, 2022
Code for "Human Pose Regression with Residual Log-likelihood Estimation", ICCV 2021 Oral

Human Pose Regression with Residual Log-likelihood Estimation [Paper] [arXiv] [Project Page] Human Pose Regression with Residual Log-likelihood Estima

JeffLi 347 Dec 24, 2022
Code repo for realtime multi-person pose estimation in CVPR'17 (Oral)

Realtime Multi-Person Pose Estimation By Zhe Cao, Tomas Simon, Shih-En Wei, Yaser Sheikh. Introduction Code repo for winning 2016 MSCOCO Keypoints Cha

Zhe Cao 4.9k Dec 31, 2022
[CVPR 2022 Oral] EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Estimation

EPro-PnP EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Estimation In CVPR 2022 (Oral). [paper] Hanshen

 同济大学智能汽车研究所综合感知研究组 ( Comprehensive Perception Research Group under Institute of Intelligent Vehicles, School of Automotive Studies, Tongji University) 842 Jan 4, 2023
[CVPR 2022] PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision (Oral)

PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision Kehong Gong*, Bingbing Li*, Jianfeng Zhang*, Ta

null 256 Dec 28, 2022
Simple Pose: Rethinking and Improving a Bottom-up Approach for Multi-Person Pose Estimation

SimplePose Code and pre-trained models for our paper, “Simple Pose: Rethinking and Improving a Bottom-up Approach for Multi-Person Pose Estimation”, a

Jia Li 256 Dec 24, 2022
Repository for the paper "PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation", CVPR 2021.

PoseAug: A Differentiable Pose Augmentation Framework for 3D Human Pose Estimation Code repository for the paper: PoseAug: A Differentiable Pose Augme

Pyjcsx 328 Dec 17, 2022
This repository contains codes of ICCV2021 paper: SO-Pose: Exploiting Self-Occlusion for Direct 6D Pose Estimation

SO-Pose This repository contains codes of ICCV2021 paper: SO-Pose: Exploiting Self-Occlusion for Direct 6D Pose Estimation This paper is basically an

shangbuhuan 52 Nov 25, 2022
Python scripts for performing 3D human pose estimation using the Mobile Human Pose model in ONNX.

Python scripts for performing 3D human pose estimation using the Mobile Human Pose model in ONNX.

Ibai Gorordo 99 Dec 31, 2022
Fusion-DHL: WiFi, IMU, and Floorplan Fusion for Dense History of Locations in Indoor Environments

Fusion-DHL: WiFi, IMU, and Floorplan Fusion for Dense History of Locations in Indoor Environments Paper: arXiv (ICRA 2021) Video : https://youtu.be/CC

Sachini Herath 68 Jan 3, 2023
Code for the CVPR2021 paper "Patch-NetVLAD: Multi-Scale Fusion of Locally-Global Descriptors for Place Recognition"

Patch-NetVLAD: Multi-Scale Fusion of Locally-Global Descriptors for Place Recognition This repository contains code for the CVPR2021 paper "Patch-NetV

QVPR 368 Jan 6, 2023
Web service for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation based on OpenFace 2.0

OpenGaze: Web Service for OpenFace Facial Behaviour Analysis Toolkit Overview OpenFace is a fantastic tool intended for computer vision and machine le

Sayom Shakib 4 Nov 3, 2022