Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.09 KB

File metadata and controls

37 lines (25 loc) · 1.09 KB

Project Description:

Advanced algorithm design and analysis course assignment The idea of maximum flow and minimum cut set is used to segment the image

Dependencies:

require python 3.8

All dependencies are enlisted in requirements.txt

pip install -r requirements.txt	

Note:

Extension need not be png

Runtime Commands

fast_seg.py The main code used to produce the segmentation results. command-line arguments

  1. -i / --img : -i
  2. -a / --algo : values “bk”/”ff”
  • “bk” - used to perform segmentation using boykov kolmogorov algorithm
  • “ff” - used to perform segmentation using ford fulkerson algorithm

Example: python fast_seg.py -i ./images/bunny.png -a bk

Instructions

The Marking process can be roughly marked, only need to draw some lines.

  • Press the "o" key on your keyboard to start marking an object.
  • Press the "b" key on your keyboard to start marking the background.
  • When you have finished marking, press the esc key on your keyboard.

Results

alt text

alt text