Giter Site home page Giter Site logo

gnc-adapt's Introduction

GNC-ADAPT

This repository contains the MATLAB implementation of GNC (Graduated Non-Convexity) on ADAPT (Adaptive Loss) by Barron described in the following paper:

  • K. Jung, T. Hitchcox, and J. R. Forbes. "An Adaptive Graudated Nonconvexity Loss Function for Robust Nonlinear Least-Squares Solutions," 2024. arXiv:2305.06869
@misc{Jung2023Adaptive,
      title={An Adaptive Graduated Nonconvexity Loss Function for Robust Nonlinear Least Squares Solutions}, 
      author={Kyungmin Jung and Thomas Hitchcox and James Richard Forbes},
      year={2024},
      eprint={2305.06869},
      archivePrefix={arXiv},
      primaryClass={cs.RO}
}

Quick-start

Open MATLAB and run

example.m

GNC-ADAPT Example

The code below demonstrates how to use GNC-ADAPT to solve a nonlinear least-squares problem. The example problem used here is a single rotation averaging problem. A user can modify the fields in problem_params to generate a problem with different parameters.

  • N: number of measurements
  • outlierRatio: the amount of outliers in the measurements
  • noiseSigma: the standard deviation of the Gaussian noise in the measurements

A problem is then generated by executing

problem = SingleRotationAveragingProblem(problem_params);

The initial guess for the rotation matrix is generated by adding a random rotation to the ground truth rotation matrix.

initialNoise = 90; % degrees
rotAxis = normalize(randn(3, 1), 'norm');
rotAngle = deg2rad(initialNoise) * randn();
R_init = problem.R_gt * axang2rotm([rotAxis', rotAngle]);

Then, the problem is solved using the method of the user's choice (e.g., GNC-ADAPT).

results.gnc_adapt = problem.solve( ...
    'lossFunction', @gnc_adapt, ...
    'alphaStar', [], ...
    'R_init', R_init ...
);

The problem can be solved by other loss functions such as

Method Function Handle alphaStar
Cauchy @cauchy -
GM @gm -
ADAPT @adapt -
AMB @amb -
GNC-Cauchy @gnc_adapt 0
GNC-GM @gnc_adapt -2
GNC-ADAPT @gnc_adapt -
GNC-AMB @gnc_amb -
GNC-TLS @gnc_tls -

The solve method has the following optional parameters:

  • R_init: the initial guess for the rotation matrix
  • lossFunction: a function handle to the loss function to be used
  • inliers: a logical vector indicating the inliers
  • maxIter: the maximum number of iterations
  • tau: the noise bound parameter to estimate the optimal shape parameter
  • costThreshold: the cost threshold to stop the iterations
  • alphaStar: the value of optimal shape parameter when it is known
  • verbose: a flag to print the progress of the algorithm

Acknowledgments

This work was partially funded by:

  • Voyis Imaging Inc.
  • Natural Sciences and Engineering Research Council of Canada (NSERC)
  • McGill Engineering Doctoral Award (MEDA)

License

BSD License

gnc-adapt's People

Contributors

johnkjung avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.