This is an implement of
binary image segmentation based on total variation. For more details in algorithm, please see in here.
Python3.x (Tested with 3.5) opencv PyQt4 scikit-learn
To use this code, please do:
Clone the repo:
git clone https://github.com/jfzhang95/TV_Segmentation cd TV_Segmentation
pip install opencv matplotlib scikit-learn pyqt4
To try the demo code, please run:
Note that in demo.py, we only use very simple unary term. More advanced unary terms are implemented in GraphMaker.py and GraphMaker_kmeans.py, they need user input to build prior knowledge. CutUI.py is a GUI implemented for User Interactivation.
The primal dual total variation optimization method is implemented in utils.py