Git Product home page Git Product logo

Comments (13)

ethan-li-coding avatar ethan-li-coding commented on July 29, 2024
  1. the real disparity values are saved in array "disparity", which was defined as float32 type.
  2. the final saved image who's format is "png" is for displaying, can't be used to evaluate.
  3. you should save array "disparity" in PFM format, which can be done by Middlebury evaluation SDK, then evaluating with PFM file.
  4. Besides, all valid values in array "disparity" should be multiply by a factor, because the ground-truth did the same thing when generating. Please visit the dataset site to get the factor value : https://vision.middlebury.edu/stereo/data/scenes2003/. For instance, the facor is 4 for 2003 datasets.

I'm sorry I didn't write this part of the code, considering that this will introduce other third-party libraries.

from ad-census.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on July 29, 2024

Thanks a lot for the reply.

However, this is specific to Middlebury. I want to evaluate it for KITTI 2015 training dataset: http://www.cvlibs.net/datasets/kitti/eval_scene_flow.php?benchmark=stereo
For evaluating for KITTI, I used the disparity array and calculated the 3-pixel error with respect to the ground truth image that is in png format that is read using cv::imread. Also, there is no factor for the KITTI dataset.

The error comes out to be 67.6% for adcensus algorithm with min disparity 0 and max disparity 64.
Can you help me with this dataset?

from ad-census.

ethan-li-coding avatar ethan-li-coding commented on July 29, 2024

Strange. Did you skip those invalid disparities which are equal to Invalid_Float? or did you only evaluate those pixels who have truth-value?

from ad-census.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on July 29, 2024

Yes. I used only valid values and those pixels that have positive value in the ground truth.

I used this code snippet:

double sum = 0;
int count = 0;
float ans = 0;
cv::Mat myMap = cv::imread(gt_path);

    for (sint32 i = 0; i < height; i ++)
    {
            for (sint32 j = 0; j < width; j ++)
            {
                    if(myMap.at<uchar>(i,j) > 0 && abs(disparity[i * width + j]) != Invalid_Float ){
                            sum++;
                            ans = abs(disparity[i * width + j] - myMap.at<uchar>(i,j));
                            if ( (ans > 3.0) &&  (ans / myMap.at<uchar>(i,j)  > 0.05))
                                    count ++;
                    }
            }
    }
    double result = (count + 0.0)/sum;
    cout << "disp path is: " << gt_path << endl;
    cout << "error is: " << result * 100 << endl;

from ad-census.

ethan-li-coding avatar ethan-li-coding commented on July 29, 2024

Try to use cv::imread(gt_path,0)? cv::imread load image in 3 channels by default.

from ad-census.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on July 29, 2024

Thanks a lot. That reduced the error to 18% for adcensus (min disparity 0 and max disparity 64).

from ad-census.

ethan-li-coding avatar ethan-li-coding commented on July 29, 2024

OK. Try to set “ad_option.do_filling = false” and then computing error again.

from ad-census.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on July 29, 2024

It reduced further to 10.99%

from ad-census.

ethan-li-coding avatar ethan-li-coding commented on July 29, 2024

OK. That's all I can think of for now.

from ad-census.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on July 29, 2024

thanks a lot.

from ad-census.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on July 29, 2024

With the above two changes, I am getting an error of 2.5% for semiglobal matching. The filling line was already false in semiglobal code.
sgm_option.is_fill_holes = false;

from ad-census.

ethan-li-coding avatar ethan-li-coding commented on July 29, 2024

Sounds good

from ad-census.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on July 29, 2024

For PatchMatch, it is 14-15%. Can the error for PatchMatch and AD-Census be reduced further? Or are they inherently inferior to semi-global matching?

from ad-census.

Related Issues (9)

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.