Skip to content

A benchmark work between the C++, Rust and Python implementations of the SRM algorithm

Notifications You must be signed in to change notification settings

AndrewDarnall/SRM-Benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statistical Region Merging Benchmark

The following reposiroty contains a benchmark which compares different implementations of the Statistical Region Merging algorithm. <

Given that many image processing and computer vision algorithms are frequently utilized in their 'Pythonic' form, which introduces a notable performance overhead, implementing the algorithm in a highly efficient and fast programming language like C++ was an obvious choice. However, considering the well-known challenges associated with memory management in C++, implementing the algorithm in the Rust programming language presents a compelling alternative, as it offers both high performance and strong memory safety guarantees.

The implementations are benchmarked against the Berkely Image Segmentation Dataset 500 (BSDS500), a widely used dataset for image segmentation (even if for Deep Learning and Computer Vision models), and then I measure the resource consumption of each implementation.


Requirements

Component Version
OpenCV 4.5.1
C++ 10.2.1
Rust 1.81.0
Python 3.12.4
pip 24.2
CMake 3.18.4
Make 4.3

Disclaimer

This repo is meant to contain a benchmark, each directory however contains a standalone implementation.


Project Structure

SRM-Benchmark
├── assets
├── BSDS500-Benchmark
├── libsrm_cpp
├── libsrm_py
└── libsrm_rust

Every directory aside from the assets one, contains a specific implementation wich detailed README.md regarding the benchmark, and the BSDS500-Benchmark contains the benchmark on the BSDS500 dataset.


System Specifications

The hardware specs of the machine on which the benchmark was run are:

Model name:                           Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
CPU MHz:                              3998.428

The software specs are:

Operating System Information:
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11

About

A benchmark work between the C++, Rust and Python implementations of the SRM algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published