Implementation of the max-flow/min-cut algorithm known as Push-Relabel in order to segment images.
It's implemented in CXX17 and CUDA.
The program take two images in order to work:
- The main image to segment
- The seed image with background (red) and foreground (blue) labels
mkdir build
cd build
cmake ..
The images should be at .jpg format.
./graph_cut [-cg] <img> <seeds_img>
-c
for CPU -g
for GPU
The benchmarcking is made with Google Benchmark
./bench
The testsuite compare the results obtained with the the ground truth given by my teacher. It used the mean dice score over the 15 given images in segmentation_dataset
.
Actually the mean dice score over the 15 images is 0.91 using the GPU implementation
make test