GithubHelp home page GithubHelp logo

dsacstar's Introduction

DSAC* for Visual Camera Re-Localization (RGB or RGB-D)

Change Log

  • 5 Jan 2022: Added an environment.yml for easier installation of dependencies.
  • 10 Jan 2022: Fixed file naming errors of pre-trained models for Cambridge Landmarks

Introduction

DSAC* is a learning-based visual re-localization method, published in TPAMI 2021. After being trained for a specific scene, DSAC* is able to estimate the camera rotation and translation from a single, new image of the same scene. DSAC* is versatile w.r.t what data is available at training and test time. It can be trained from RGB images and ground truth poses alone, or additionally utilize depth maps (measured or rendered) or sparse scene reconstructions for training. During test time, it supports pose estimation from RGB as well as RGB-D inputs.

DSAC* is a combination of Scene Coordinate Regression with CNNs and Differentiable RANSAC (DSAC) for end-to-end training. This code extends and improves our previous re-localization pipeline, DSAC++ with support for RGB-D inputs, support for data augmentation, a leaner network architecture, reduced training and test time, as well as other improvements for increased accuracy.

For more details, we kindly refer to the paper. You find a BibTeX reference of the paper at the end of this readme.

Installation

DSAC* is based on PyTorch, and includes a custom C++ extension which you have to compile and install (but it's easy). The main framework is implemented in Python, including data processing and setting parameters. The C++ extension encapsulates robust pose optimization and the respective gradient calculation for efficiency reasons.

DSAC* requires the following python packages, and we tested it with the package versions in brackets

pytorch (1.6.0)
opencv (3.4.2)
scikit-image (0.16.2)

The repository contains an environment.yml for the use with Conda:

conda env create -f environment.yml
conda activate dsacstar

You compile and install the C++ extension by executing:

cd dsacstar
python setup.py install

Compilation requires access to OpenCV header files and libraries. If you are using Conda, the setup script will look for the OpenCV package in the current Conda environment. Otherwise (or if that fails), you have to set the OpenCV library directory and include directory yourself by editing the setup.py file.

If compilation succeeds, you can import dsacstar in your python scripts. The extension provides four functions: dsacstar.forward_rgb(...), dsacstar.backward_rgb(...), dsacstar.forward_rgbd(...) and dsacstar.backward_rgbd(...). Check our python scripts or the documentation in dsacstar/dsacstar.cpp for reference how to use these functions.

Note: The code does not support OpenCV 4.x at the moment, due to legacy function calls in the dsacstar module. The code can be adjusted for the use with OpenCV 4.x but you might still face compiler compatibility issues when installing OpenCV via Conda. Any prebuilt OpenCV binaries must be compatible to the compiler of your system that compiles the dsacstar module. Compiling OpenCV from source on your system should ensure compiler compatibility.

Data Structure

The datasets folder is expected to contain one sub-folder per self-contained scene (e.g. one indoor room or one outdoor area). We do not provide any data with this repository. However, the datasets folder comes with a selection of Python scripts that will download and setup the datasets used in our paper (linux only, please adapt the script for other operating systems). In the following, we describe the data format expected in each scene folder, but we advice to look at the provided dataset scripts for reference.

Each sub-folder of datasets should be structured by the following sub-folders that implement the training/test split expected by the code:

datasets/<scene_name>/training/
datasets/<scene_name>/test/

Training and test folders contain the following sub-folders:

rgb/ -- image files
calibration/ -- camera calibration files
poses/ -- camera transformation matrix
init/ -- (optional for training) pre-computed ground truth scene coordinates
depth/ -- (optional for training) can be used to compute ground truth scene coordinates on the fly
eye/-- (optional for RGB-D inputs) pre-computed camera coordinates (i.e. back-projected depth maps)

Correspondences of files across the different sub-folders will be established by alphabetical ordering.

Details for image files: Any format supported by scikit-image.

Details for pose files: Text files containing the camera pose h as 4x4 matrix following the 7Scenes/12Scenes convention. The pose transforms camera coordinates e to scene coordinates y, i.e. y = he.

Details for calibration files: Text file. At the moment we only support the camera focal length (one value shared for x- and y-direction, in px). The principal point is assumed to lie in the image center.

Details for init files: (3xHxW) tensor (standard PyTorch file format via torch.save/torch.load) where H and W are the dimension of the output of our network. Since we rescale input images to 480px height, and our network predicts an output that is sub-sampled by a factor of 8, our init files are 60px height. Invalid scene coordinate values should be set to zeros, e.g. when generating scene coordinate ground truth from a sparse SfM reconstruction. For reference how to generate these files, we refer to datasets/setup_cambridge.py where they are generated from sparse SfM reconstructions, or dataset.py where they are generated from dense depth maps and ground truth poses.

Details for depth files: Any format supported by scikit-image. Should have same size as the corresponding RGB image and contain a depth measurement per pixel in millimeters. Invalid depth values should be set to zero.

Details for eye files: Same format, size and conventions as init files but should contain camera coordinates instead of scene coordinates. For reference how to generate these files, we refer to dataset.py where associated scene coordinate tensors are generated from depth maps. Just adapt that code by storing camera coordinates directly, instead of transforming them with the ground truth pose.

Supported Datasets

Prior to using these datasets, please check their orignial licenses (see the website links at the beginning of each section).

7Scenes

7Scenes (MSR) is a small-scale indoor re-localization dataset. The authors provide training/test split information, and a dense 3D scan of each scene, RGB and depth images as well as ground truth poses. We provide the Python script setup_7scenes.py to download the dataset and convert it into our format.

Note that the provided depth images are not yet registered to the RGB images, and using them directly will lead to inferior results. As an alternative, we provide rendered depth maps here. Just extract the archive inside datasets/ and the depth maps should be merged into the respective 7Scenes sub-folders.

For RGB-D experiments we provide pre-computed camera coordinate files (eye/) for all training and test scenes here. We generated them from the original depth maps after doing a custom registration to the RGB images. Just extract the archive inside datasets/ and the coordinate files should be merged into the respective 7Scenes sub-folders.

12Scenes

12Scenes (Stanford) is a small-scale indoor re-localization dataset. The authors provide training/test split information, and a dense 3D scan of each scene, RGB and depth images as well as ground truth poses. We provide the Python script setup_12scenes.py to download the dataset and convert it into our format.

Provided depth images are registered to the RGB images, and can be used directly.However, we provide rendered depth maps here which we used in our experiments. Just extract the archive inside datasets/ and the depth maps should be merged into the respective 12Scenes sub-folders.

For RGB-D experiments we provide pre-computed camera coordinate files (eye/) for all training and test scenes here. We generated them from the original depth maps after doing a custom registration to the RGB images. Just extract the archive inside datasets/ and the coordinate files should be merged into the respective 12Scenes sub-folders.

Cambridge Landmarks

Cambridge Landmarks is an outdoor re-localization dataset. The dataset comes with a set of RGB images of five landmark buildings in the city of Cambridge (UK). The authors provide training/test split information, and a structure-from-motion (SfM) reconstruction containing a 3D point cloud of each building, and reconstructed camera poses for all images. We provide the Python script setup_cambridge.py to download the dataset and convert it into our format. The script will generate ground-truth scene coordinate files from the sparse SfM reconstructions. This dataset is not suitable for RGB-D based pose estimation since measured depth maps are not available.

Note: The Cambridge Landmarks dataset contains a sixth scene, Street, which we omitted in our experiments due to the poor quality of the SfM reconstruction.

Training DSAC*

We train DSAC* in two stages: Initializing scene coordinate regression, and end-to-end training. DSAC* supports various variants of camera re-localization, depending on what information about the scene is available at training and test time, e.g. a 3D reconstruction of the scene, or depth measurements for images.

Note: We provide pre-trained networks for 7Scenes, 12Scenes, and Cambridge, each trained for the three main scenarios investigated in the paper: RGB only (RGB), RGB + 3D model (RGBM) and RGB-D RGBD). Download them here.

You may call all training scripts with the -h option to see a listing of all supported command line arguments. The default settings of all parameters correspond to our experiments in the paper.

Each training script will create a log file *.txt file which contains the training iteration and training loss in each line. The initalization script will additionally log the percentage of valid predictions w.r.t. the various constraints described in the paper.

Initalization

RGB only (mode 0)

If only RGB images and ground truth poses are available (minimal setup), initialize a network by calling:

python train_init.py <scene_name> <network_output_file> --mode 0

Mode 0 triggers the RGB only mode which requires no pre-computed ground truth scene coordinates nor depth maps. You specify a scene via <scene_name> which should correspond to the sub-directory of the datasets folder, e.g. 'Cambridge_GreatCourt'. <network_output_file> specifies under which file name the script should store the resulting new network.

RGB + 3D Model (mode 1)

When a 3D model of the scene is available, it may be utilized during the initalization stage which usually leads to improved accuracy. You may utilize the 3D model in two ways: Either you use it together with the ground truth poses to render dense depth maps for each RGB image (see depth\ folder description in the Data Structure section above), as we did for 7Scenes/12Scenes. Note that we provide such rendered depth maps for 7Scenes/12Scenes, see Supported Datasets section above.

In this case, the training script will generate ground truth scene coordinates from the depth maps and ground truth poses (implemented in dataset.py).

python train_init.py <scene_name> <network_output_file> --mode 1

Alternatively, you may pre-compute ground truth scene coordinate files directly (see init\ folder description in the Data Structure section above), as we did for Cambridge Landmarks. Note that the datasets\setup_cambridge.py script will generate these files for you. To utilize pre-computed scene coordinate ground truth, append the -sparse flag.

python train_init.py <scene_name> <network_output_file> --mode 1 -sparse

RGB-D (mode 2)

When (measured) depth maps for each image are available, you call:

python train_init.py <scene_name> <network_output_file> --mode 2

This uses the depth\ dataset folder similar to mode 1 to generate ground truth scene coordinates but optimizes a different loss for initalization (3D distance instead of reprojection error).

Note: The 7Scenes depth maps are not registered to the RGB images, and hence are not directly usable for training. The 12Scenes depth maps are registered properly and may be used as is. However, in our experiments, we used rendered depth maps for both 7Scenes and 12Scenes to initialize scene coordinate regression.

End-To-End Training

End-To-End training supports two modes: RGB (mode 1) and RGB-D (mode 2) depending on whether depth maps are available or not.

python train_e2e.py <scene_name> <network_input_file> <network_output_file> --mode <1 or 2>

<network_input_file> points to a network which has already been initialized for this scene. <network_output_file> specifies under which file name the script should store the resulting new network.

Mode 2 (RGB-D) requires pre-computed camera coordinate files (see Data Structure section above). We provide these files for 7Scenes/12Scenes, see Supported Datasets section.

Testing DSAC*

Testing supports two modes: RGB (mode 1) and RGB-D (mode 2) depending on whether depth maps are available or not.

To evaluate on a scene, call:

python test.py <scene_name> <network_input_file> --mode <1 or 2>

This will estimate poses for the test set, and compare them to the respective ground truth. You specify a scene via <scene_name> which should correspond to the sub-directory of the dataset folder, e.g. 'Cambridge_GreatCourt'. <network_input_file> points to a network which has already been initialized for this scene. Running the script creates two output files:

test_<scene_name>_.txt -- Contains the median rotation error (deg), the median translation error (cm), and the average processing time per test image (s).

poses_<scene_name>_.txt -- Contains for each test image the corrsponding file name, the estimated pose as 4D quaternion (wxyz) and 3D translation vector (xyz), followed by the rotation error (deg) and translation error (m).

Mode 2 (RGB-D) requires pre-computed camera coordinate files (see Data Structure section above). We provide these files for 7Scenes/12Scenes, see Supported Datasets section. Note that these files have to be generated from the measured depth maps (but ensure proper registration to RGB images). You should not utlize rendered depth maps here, since rendering would use the ground truth camera pose which means that ground truth test information leaks into your input data.

Call the test script with the -h option to see a listing of all supported command line arguments.

Publications

Please cite the following paper if you use DSAC* or parts of this code in your own work.

@article{brachmann2021dsacstar,
  title={Visual Camera Re-Localization from {RGB} and {RGB-D} Images Using {DSAC}},
  author={Brachmann, Eric and Rother, Carsten},
  journal={TPAMI},
  year={2021}
}

This code builds on our previous camera re-localization pipelines, namely DSAC and DSAC++:

@inproceedings{brachmann2017dsac,
  title={{DSAC}-{Differentiable RANSAC} for Camera Localization},
  author={Brachmann, Eric and Krull, Alexander and Nowozin, Sebastian and Shotton, Jamie and Michel, Frank and Gumhold, Stefan and Rother, Carsten},
  booktitle={CVPR},
  year={2017}
}

@inproceedings{brachmann2018lessmore,
  title={Learning less is more - {6D} camera localization via {3D} surface regression},
  author={Brachmann, Eric and Rother, Carsten},
  booktitle={CVPR},
  year={2018}
}

dsacstar's People

Contributors

ebrach avatar qiyan98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dsacstar's Issues

Compatibility Issue with Updated Environment Versions

Hello,

First of all, I would like to express my appreciation for the dsac* project. It looks like a fantastic tool, and I am eager to try it out. However, I am facing some compatibility issues due to the limitations of my GPU hardware.

Currently, I am using the following versions:

  • PyTorch: 1.12.0
  • CUDA: 11.8
  • OpenCV: 4.10

When I attempt to run the test code, I encounter the following error:

File "test.py", line 6, in <module>
    import dsacstar
ImportError: /miniconda3/envs/t16c102/lib/python3.8/site-packages/dsacstar-0.0.0-py3.8-linux-x86_64.egg/dsacstar.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN2cv6String8allocateEm

I understand that this issue is related to the OpenCV version. Could you please let me know if there is a possibility of supporting these updated environment versions? Your assistance would be greatly appreciated.

Thank you for your time and support.

import dsacstar:ImportError: DLL load failed: The specified module could not be found

Hello, it seems that my C++ extension is not compiling successfully. I have already installed setup.py, and it shows "Finished processing dependencies for dsacstar==0.0.0", indicating that the module seems to have been compiled correctly and I can import dsacstar. However, why do I still get an error when I run train_e2e_.py: "ImportError: DLL load failed: The specified module could not be found."? Can you help me with this?

Problems with run mode 2 with my data

Hello, I try to train DSAC* on my data captured by kinect v2 and I have some questions:

  1. Because the intrinstics of RGB camera and depth camera are different, some depth pixels do not have corresponding RGB pixels(I use white color instead). The input RGB image may like this:
    2639
    Can the network handle with such case?
  2. I train model by using my RGBD images. The training process is successed but when I run test.py in mode 2, I meet the errors:
    image
    It seems that dsacstar.forward_rgbd failed on some frames. And when I run test.py in mode 1 everything is OK.

visualize the scene coordinate

Dear,

Could you help to release the scripts to visualize the scene coordinate and camera trajectory in the DSAC* paper?

Thank you so much.

Best,
Qiang

mean coordinates of the scene

Hello,

I would like to ask about the effects of computing the mean coordinates and applying these means to the final scene map. Because I only see that you applied this step in the initialization phase but not the end-2-end train phase and the test phase. Is it important to perform this step and what was the motivation behind it? Thank you in advance.

Test with a different camera

Hi. I trained a model with images from one camera and the performance is good on the test set from the same camera. However when I test the performance of the same trained model with images from a different camera, the poses are a total mess. Is it an expected behavior or could there be any other problem?

Dataset preparation (camera pose)

HI!

Am I right that if I want to use camera pose extracted from the blender ( obj.matrix_world) I need to multiply it by diag(1 -1 -1 1) to follow the OpenCV convention?

Thank you!

Problem with testing on mode 2

Hello there,

I have a problem with testing on mode 2. I can train models by using rendered depth maps with mode 2. But when I try to test them it gives results as below. To be sure I tried your pre-trained model it also gives the same results. When I test in mode 1, everything seems correct for both models.

image

Additionally, in rendered depth maps in seq04 frames between 450-500 does not match with the original images.
scm_002475
frame-000475 color

Thanks for sharing your work.

Problems executing setup.py

Hi, I made environment in conda with all the packages that you mentioned with correct versions, but I am constantly getting this error while running setup.py.

dsacstar/dsacstar/dsacstar_util.h:193:5: error: ‘SOLVEPNP_P3P’ is not a member of ‘cv’

I am using OpenCV 3.4.2 and I manually set the paths for header and library files for for OpenCV in setup.py.

Questions on Pre-training and pose matrix h

Hi Eric
Thanks for your wonderful work on pose estimation.
(1). I was checking the performance improvement on the test dataset in the Cambridge_GreatCourt scene starting with your provided initial network and then the trained network in an end-to-end fashion. Surprisingly, the error rates are pretty the same before and after end-to-end learning. In particular, I'm running test.py by
python test.py Cambridge_GreatCourt models\rgb\cambridge\Cambridge_GreatCourt.net --mode 1
and the results are
image
However when I train the network for a few epochs in the second phase, by
python train_e2e.py Cambridge_GreatCourt models\rgb\cambridge\Cambridge_GreatCourt.net output\output.net --mode 1
the results are
image
which means there is no benefit in the end-to-end learning stage. Is that what you observed before? Or I'm doing something wrong.

(2). I'm a bit confused about the notations in the paper and what has been implemented in the code. In the paper, it was defined that h (4*4 matrix) is the pose matrix from the camera to the 3d scene coordinate. However, the ground truth pose is the matrix transforming from the environment to the camera coordinate. So direct differencing is not correct, right? I do not know within the c++ code whether you are computing the inverse or not, but I can see at the end, you are saving the inverse pose in the output text file. Can you please explain this?

Best regards
Aref

Why the accuracy of pumpkin, redkitchen and stairs in the 7scenes dataset is close to 0%?

Hi,
I tried your pre-trained models and your datasets. When I test on mode 2, I find that the accuracy of pumpkin, redkitchen and stairs in the 7scenes dataset is close to 0%. Meanwhile, the accuracy of chess, fire, heads and office in the 7scenes dataset is close to 100%.
And I also tried to train the model form the code and the dataset you provided. However, I got the same result, even worse

Screenshot_2022-05-07_17-28-23
the result of fire

Screenshot_2022-05-07_17-32-16
the result of pumpkin

Screenshot_2022-05-07_17-40-01
the result of fire (I generated model form train_init.py)

Screenshot_2022-05-07_17-36-45
the result of pumpkin (I generated model form train_init.py)

Many thanks!

The impact of number of images and size of scene

Thank you authors for this amazing work!

I am wondering what your thoughts are about the relationship between the number of images and the size of a scene? For example, I have a tall structure about 5m^3, which is the subject of my scene, and about 100 images (with poses)... In your opinion do I need more training images?

Many Thanks,

MACILLAS

Does re-scaling damage the unknown scene coordinate masks?

Hi,

Thanks for the wonderful open-sourced project (again)!

I have a question on the potentially harmful effects of label re-scaling. The re-scaling of the image is generally fine. But re-scaling for 3D labels may change the 0 value for invalid scene coordinate masks.

dsacstar/dataset.py

Lines 187 to 199 in 3ffbcb1

if self.init:
if self.sparse:
#rotate and scale initalization targets
coords_w = math.ceil(image.size(2) / Network.OUTPUT_SUBSAMPLE)
coords_h = math.ceil(image.size(1) / Network.OUTPUT_SUBSAMPLE)
coords = F.interpolate(coords.unsqueeze(0), size=(coords_h, coords_w))[0]
coords = my_rot(coords, angle, 0)
else:
#rotate and scale depth maps
depth = resize(depth, image.shape[1:], order=0)
depth = rotate(depth, angle, order=0, mode='constant')

In the loss function, the mask is used as follows:

dsacstar/train_init.py

Lines 191 to 192 in 3ffbcb1

# check for invalid/unknown ground truth scene coordinates (all zeros)
gt_coords_mask = torch.abs(gt_coords[0:3]).sum(0) == 0

We are concerned about this in our project as the training labels might become accurate after augmentation. I wondered if you have some insights on this issue.

Many thanks!

Getting Runtime Error when running on Windows 10

I was able to build the code to windows on.

  • conda python 3.7.10
  • MSVC c++ compiler
  • requirements from README.md

I got this Error when running the train_init.py on chess dataset.

i used :
python .\train_init.py 7scenes_chess chess --mode 0

RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.
        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

i think this is problem from not linking openmp with -fopenmp flag or some other error in windows.

Question about calibration files

Dear author, may I ask how to convert the content of the calibration file into the form [fx 0 cx 0] [0 fy cy 0] [0 0 1 0]? For example, is 740.8688250209896 in seq2_frame00001.txt converted to [740.8688 0 1 0] [0 7408688 1 0] [0 0 1 0]? However, each frame has its own calibration file. Does this indicate that the intrinsic and extrinsic parameters for each frame are different?

data preparation on my data

Hello, Thanks for your previous reply but I still can't run dsac on my data. I have checked and thought there might be a problem with my data preparation phase:

  1. I want to run RGB-D relocalization on kinect v2 data. According to the introduction of the data structure, I need to set rgb, calibration, poses and eyes. I have camera focal length but I noticed that the input imges will be resized to 480px height and my detph images have 424px height. How should I set the camera focal length? Whether to use the original focal length or should be modified to the corresponding focal length after resize?
  2. Similarly, eye files should be the three-dimensional coordinates obtained by projecting the depth map according to the camera intrinsic matrix. How to deal with this different image resolution situation?

Update 4.19:
I edit my data as following: 1. resize the images to 480 height 2. change the camera intrinstic and compute eye files.
The dsacstar works well on my simple test: I only use 50 reference images to train and use one of them to test. However, When I want to train on the total reference images, the e2e networks cannot converge.
Best Regards,
Peng

Installing on Jetson TX2 NX

Hi, I'm trying to evaluate the inference on an NVIDIA Jetson TX2 NX. When I try to install miniconda (for aarch64) I get an error:

/home/fubintlab/miniconda3/miniconda.sh: line 470: 32664 Exit 141                extract_range $boundary1 $boundary2
     32665 Illegal instruction     (core dumped) | CONDA_QUIET="$BATCH" "$CONDA_EXEC" constructor --extract-tarball --prefix "$PREFIX"

So I installed all the dependencies using pip. However, for my architecture the requested opencv version (3.4.2) is not available. I was able to succesfully install opencv-python version 3.4.10.37 and set the library and header dirs in setup.py. When I run python setup.py install, the build fails with errors:

In file included from dsacstar_util.h:37:0,
                 from dsacstar.cpp:42:
dsacstar_util_rgbd.h: In function ‘void matMulDerivWrapper(cv::InputArray, cv::InputArray, cv::OutputArray, cv::OutputArray)’:
dsacstar_util_rgbd.h:221:2: error: ‘CvMat’ was not declared in this scope
  CvMat matA = A, matB = B, c_dABdA=_dABdA.getMat(), c_dABdB=_dABdB.getMat();
  ^~~~~
dsacstar_util_rgbd.h:222:21: error: ‘matA’ was not declared in this scope
  cvCalcMatMulDeriv(&matA, &matB, _dABdA.needed() ? &c_dABdA : 0, _dABdB.needed() ? &c_dABdB : 0);
                     ^~~~
dsacstar_util_rgbd.h:222:28: error: ‘matB’ was not declared in this scope
  cvCalcMatMulDeriv(&matA, &matB, _dABdA.needed() ? &c_dABdA : 0, _dABdB.needed() ? &c_dABdB : 0);
                            ^~~~
dsacstar_util_rgbd.h:222:53: error: ‘c_dABdA’ was not declared in this scope
  cvCalcMatMulDeriv(&matA, &matB, _dABdA.needed() ? &c_dABdA : 0, _dABdB.needed() ? &c_dABdB : 0);
                                                     ^~~~~~~
dsacstar_util_rgbd.h:222:53: note: suggested alternative: ‘_dABdA’
  cvCalcMatMulDeriv(&matA, &matB, _dABdA.needed() ? &c_dABdA : 0, _dABdB.needed() ? &c_dABdB : 0);
                                                     ^~~~~~~
                                                     _dABdA
dsacstar_util_rgbd.h:222:85: error: ‘c_dABdB’ was not declared in this scope
  cvCalcMatMulDeriv(&matA, &matB, _dABdA.needed() ? &c_dABdA : 0, _dABdB.needed() ? &c_dABdB : 0);
                                                                                     ^~~~~~~
dsacstar_util_rgbd.h:222:85: note: suggested alternative: ‘_dABdB’
  cvCalcMatMulDeriv(&matA, &matB, _dABdA.needed() ? &c_dABdA : 0, _dABdB.needed() ? &c_dABdB : 0);
                                                                                     ^~~~~~~
                                                                                     _dABdB
dsacstar_util_rgbd.h:222:2: error: ‘cvCalcMatMulDeriv’ was not declared in this scope
  cvCalcMatMulDeriv(&matA, &matB, _dABdA.needed() ? &c_dABdA : 0, _dABdB.needed() ? &c_dABdB : 0);
  ^~~~~~~~~~~~~~~~~

Any suggestions?
Has anyone successfully installed dsacstar on a Jetson?

Generate learned geometry

HI!

Could you please clearify how to generate learned geometry? i've tried to run test.py saving
scene_coordinates = scene_coordinates.cpu()
cv2.imwrite(str(file),scene_coordinates.permute([0,2,3,1]).numpy()[0])
So I got network predictions, but it is not clear how to generate a point cloud from them. I took all these images and reshaped them to the (N, 3) , but when I visualize them I get following:
image

Train Cambridge

Hi!

I want to confirm the parameters used to train the Cambridge Landmark Dataset. Do you use the default parameters to train to achieve the report accuracies (RGB only)? I am using the dsacstar to train on a custom outdoor dataset with RGB only (did not work well using default parameters). I want to have your help on suggesting a direction on tuning the parameters. Thanks so much!

Problem with the result about cambridge datasets

I test the pre-trained network on cambridge datasets. The results of OldHospital, ShopFacade and StMarysChurch are obviously deviated from the normal value, while the results of KingsCollege and GreatCourt are normal. I guess that the pre-trained network do not correspond to dataset. The following is the screenshot of ShopFacade:
4~BMA27B 5{ V16V RT% @D

Mini batch support

Currently single batch is supported which took more than one day for training a single scene of Cambridge. Are you planning to support for mini batch size >1. This would significantly decrease the training time.

How did you get the pre-computed camera coordinate files?

Hi, first of all this is an excellent work!
I want to know how to get the pre-computed camera coordinate files (eye/). Could you please offer your codes? Besides, if the size of depth and RGB images are different, can it work?
Looking forward to your reply!

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.