This is the salvaged source code for stochadiff, recovered from an archive.

The stochadiff code was actually a plugin from a larger project named pluriel, which aimed to compute "singularities" or "edges" from data sets. Pluriel means plural, refering to the multiple methods that would be implemented for defining these singularity or edge concepts. Stochadiff was one of them, alongside multi-fractal analysis and classic edge detection routines.

That larger project was never finished and never released. Some parts were extracted as independant routines, others were re-written in Python, etc. Stochadiff sat there untouched for years, the paper being unpublished and other more urgent projects popping in.

At that time, all the code was hosted on a centralized version management system… which was shut down. The stochadiff code that lived there disappeared together with the management system.

Hopefully I had local backups, but the machines that the code was compiled on, together with the exact version of the dependencies (Eigen, GDAL, Ceres, etc) that were used on these machines, are now all gone. These extra dependencies may or may not exist anymore, and most likely they went through multiple API changes if they still exist. It is very unlikely the stochadiff code compiles in the current form.

The actual computations were run on a remote cluster and were processed using batch commands of this sort (actual commands, recovered from the old cluster account):

./pluriel data/$img[$jobnum].* -t stochadiff -p 100 -a 5 -r complexities/ -m neighborhood_s$s[$jobnum].txt --tag _s$s[$jobnum] -k0.004:1§50 -c recstats/recstats_$s[$jobnum]_$img[$jobnum].txt,0.2 --save_complexities_mode 1

for s in 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 ; do for img in sst cameraman etoile house barbara lena ; do if [ `wc -l newres/stats_${img}_$s.txt|sed 's/ .*//g'` != "50" ] ; then (imgf=`echo data/$img.*` ; echo "==== $s == $img ====" ; let "x=$RANDOM / 10000 + 1"; sleep $x; ./reconstruct --ssim_scale $s -c $imgf,0.2 complexities/stochadiff_s${s}_$img*.txt.gz | perl -p -e 'chomp; if (/.*?_s(.*?)_.*?_k(.*?)\.txt.*with (.*?) \%.*?PSNR=(.*?), MSE=(.*?), SSIM=(.*)/) {$_="$1 $2 $3 $4 $5 $6\n";} else {$_="";}' > newres/stats_${img}_$s.txt) & ; fi ; done ; done


This is unfortunately the best I can offer a few years later, in a best effort to finally release the stochadiff code to the public. BUT the code is the actual one that was used for the paper experiments, and it is free/libre. With enough determination and efforts, you should in principle be able to reproduce the results from the paper exactly.

In practice, it would be may more efficient to rewrite the stochadiff part of the larger pluriel project from scratch.

Nicolas Brodu
September 2026
