Public release of Region Growing Refinement (RGR) algorithm

Available under the Non-Profit Open Software License: for more details .

Please also note that the region growing .cpp file composing RGR is an adaptation of the SNIC algorithm, so copyright/license details of SNIC also apply (see .cpp file por details)

Both MATLAB and Python versions


Example uses RGR to refine semantic segmentation predicted by a state-of-the-art CNN


Example propagates scribbles provided by an user for annotation of image segmentation masks. See our FreeLabel interface for more details:


  • OpenCV and Cython
  • Recompile "callRGR", which compiles .cpp file for Python usage:
    • python build_ext --inplace

For more details on RGR, check the manuscript available as .pdf in this repository or at