vkdt devel diary

yes, and i’m expecting maybe it’ll make sense not only to change the architecture/retrain but also maybe implement something like your backpropagation on gpu as well, potentially even the whole solver.

so yes, not recommended to use in production as it is now. so far i didn’t push it to the obs packages either.

…and in other news, i just wired imgui’s gamepad navigation in vkdt:


edit: let’s try webm encoding instead

(sorry i had to squeeze the image into the top left corner of my screen so the x11grab device would allow me to capture this video fast enough).

this way i can do simple tasks from the sofa, without keyboard or mouse or table to support them. so far i think it’s useful for minor adjustments of parameters in an existing pipeline, and mostly for star rating/colour labeling of collections.

2 Likes

unacceptable. but i guess you asked for it, and it’s not really an actual use case.

OBS can build for Arch too.

Very cool!
I keep asking myself if a convertible with touchscreen + pen isn’t the way to go for image editing on the go / on the couch (without mouse and keyboard). I guess It’d feel quite natural when the interface is so responsive. Does this run on Intel XE graphics or a Ryzen Vega iGPU?

it’s just vulkan, so yes. but i didn’t try, and the weaker the gpu the less fun i suppose. though i thought @betazoid’s 1660 would be stretching it and apparently it’s workable.

about the gmic cnn for denoising:

i implemented a first version of a shmem/tiled megakernel instead of the layers in global memory with individual compute shader kernel calls.

runtimes for my 1080p test case go down to ~217ms with a 24x24 tile size, my laptop doesn’t run larger tiles than that. not sure i’m handling the tile overlap quite correctly, i hope i don’t (because i’m seeing tile artifacts even with 2px border). well at least this version does not run out of memory.

if you like apples and oranges, here’s a comparison ~200ms cnn vs ~4ms wavelets on this image (1080 pfm input, something wrong with highlights and noise profile in the wavelet case because not a raw image):
cnn:
cnn-crop
wav:
den-crop

the wavelets would clearly profit from some better treatment of edges vs smooth areas (there is special code that works better for one or the other, but codepath selection doesn’t work).

the network shows promise, is overall a little smooth and has strange ringing at edges. not sure this is worth the 50x cost. maybe a different arch (u-net, decimated memory) could be implemented faster.

How is it possible to change the font size of the gui? I guess it is necessary to add some text in config.rc?

it scales with the height of the window. why would you need to change it?

Apparently here it doesn’t, does it? But I guess it’s not so important.


hmm right it’s only read on first startup because i was to lazy to re-rasterise the font every time the window is resized.

wow, you filter by create date? does that work?

I don’t. Just coincidence.

trying to make an effort to make important links more discoverable (but can’t edit the top post it seems):

beware of the leopard!

vkdt is a vulkan implementation of an image processing graph, similar in spirit to darktable. it addresses some of the issues i have with maintaining my old code there. started as a proof-of-concept to evaluate the viability of gpu only core + gui code, now i think it’s becoming close to actually useful.

packages:

in the open suse build system, graphics:darktable:master/vkdt

source code:

vkdt on github

reference documentation for the modules

reference docs as html, generated from md in git above

home page

home page also autogenerated from git

I am trying to create a picture of a node graph but I get this:

anna@anna-ms7c96:~/Pictures$ vkdt-cli -g PA051000.ORF.cfg --dump-modules
[ERR] device does not support requested feature samplerAnisotropy, trying anyways
[ERR] device does not support requested feature shaderStorageImageExtendedFormats, trying anyways
[ERR] device does not support requested feature shaderUniformBufferArrayDynamicIndexing, trying anyways
[ERR] device does not support requested feature shaderSampledImageArrayDynamicIndexing, trying anyways
[ERR] device does not support requested feature shaderStorageBufferArrayDynamicIndexing, trying anyways
[ERR] device does not support requested feature shaderStorageImageArrayDynamicIndexing, trying anyways
[ERR] device does not support requested feature inheritedQueries, trying anyways
digraph modules {
node [shape=record]
n0_i_raw [label="i_raw|{<0> output}"];
n1_denoise [label="denoise|{<0> input|<1> output}"];
n2_hilite [label="hilite|{<0> input|<1> output}"];
n3_demosaic [label="demosaic|{<0> input|<1> output}"];
n4_colour [label="colour|{<0> input|<1> output}"];
n5_filmcurv [label="filmcurv|{<0> input|<1> output|<2> curve}"];
n6_llap [label="llap|{<0> input|<1> output}"];
n7_hist [label="hist|{<0> input|<1> output}"];
n8_zones [label="zones|{<0> input|<1> output}"];
n9_saturate [label="saturate|{<0> input|<1> output}"];
n10_crop [label="crop|{<0> input|<1> output}"];
n11_lens [label="lens|{<0> input|<1> output}"];
n12_pick [label="pick|{<0> input|<1> spectra|<2> dspy}"];
n13_display [label="display|{<0> input}"];
n14_display [label="display|{<0> input}"];
n0_i_raw:0 -> n1_denoise:0
n1_denoise:1 -> n2_hilite:0
n2_hilite:1 -> n3_demosaic:0
n10_crop:1 -> n4_colour:0
n4_colour:1 -> n5_filmcurv:0
n5_filmcurv:1 -> n6_llap:0
n6_llap:1 -> n7_hist:0
n3_demosaic:1 -> n10_crop:0
n7_hist:1 -> n13_display:0
n6_llap:1 -> n14_display:0
}
[ERR] roi of last connected sink module o-jpg did not get initialised!

looking good. now > that into a file and remove the [ERR] part, maybe like

vkdt-cli -g PA051000.ORF.cfg --dump-modules | grep -v ERR > modules.dat
dot -Tpdf modules.dat > modules.pdf
evince modules.pdf

(and similar with --dump-nodes for the fine grained version)

apparently the result of --dump-nodes is empty

digraph nodes {
node [shape=record]
}

hm indeed i didn’t scroll to the end. the output jpg module doesn’t seem to be initialised. can you post your .cfg? the module graph looks alright from here.

it’s just the default graph, nothing is changed

frames:1
fps:0
module:i-raw:main
module:denoise:01
module:hilite:01
module:demosaic:01
module:colour:01
module:filmcurv:01
module:llap:01
module:hist:01
module:zones:01
module:saturate:01
module:crop:01
module:lens:01
module:pick:01
module:display:hist
module:display:main
connect:i-raw:main:output:denoise:01:input
connect:denoise:01:output:hilite:01:input
connect:hilite:01:output:demosaic:01:input
connect:crop:01:output:colour:01:input
connect:colour:01:output:filmcurv:01:input
connect:filmcurv:01:output:llap:01:input
connect:llap:01:output:hist:01:input
connect:demosaic:01:output:crop:01:input
connect:hist:01:output:display:hist:input
connect:llap:01:output:display:main:input
param:i-raw:main:filename:PA051000.ORF
param:i-raw:main:noise a:0
param:i-raw:main:noise b:0
param:denoise:01:strength:0
param:denoise:01:luma:0.6
param:hilite:01:white:0.985
param:hilite:01:desat:0.8
param:hilite:01:soft:1
param:colour:01:exposure:0
param:colour:01:mode:0
param:colour:01:matrix:1
param:colour:01:gamut:0
param:colour:01:white:0.5:0.5:0.5:0.5
param:colour:01:mat:-1:0:0:0:0:0:0:0:0
param:colour:01:cnt:0
param:colour:01:source:0:5:0.5:0.5:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
param:colour:01:target:0:5:0.5:0.5:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
param:filmcurv:01:x0:0
param:filmcurv:01:x1:0.1
param:filmcurv:01:x2:0.9
param:filmcurv:01:x3:1
param:filmcurv:01:y0:0
param:filmcurv:01:y1:0.05
param:filmcurv:01:y2:0.92
param:filmcurv:01:y3:1
param:filmcurv:01:black:-2.5
param:llap:01:sigma:0.12
param:llap:01:shadows:1
param:llap:01:hilights:1
param:llap:01:clarity:0.2
param:hist:01:crop:0:1:0:1
param:hist:01:mode:0
param:zones:01:radius:0.05
param:zones:01:epsilon:0.1
param:zones:01:zone0:0
param:zones:01:zone1:0
param:zones:01:zone2:0
param:zones:01:zone3:0
param:zones:01:zone4:0
param:zones:01:zone5:0
param:zones:01:zone6:0
param:saturate:01:sat:1
param:crop:01:perspect:0:0:1:0:1:1:0:1
param:crop:01:crop:0.000572519:0.999427:0.000766871:0.999233
param:crop:01:rotate:0
param:lens:01:center:0:0
param:lens:01:scale:1:1
param:lens:01:squish0:0
param:lens:01:squish1:0
param:lens:01:ca red:1
param:lens:01:ca blue:1
param:pick:01:nspots:0
param:pick:01:pad:0:0:0
param:pick:01:spots:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
param:pick:01:picked:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
param:pick:01:ref:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
param:pick:01:show:0
param:pick:01:grab:0
param:pick:01:de76:0:0:0

ah. sorry. can you try vkdt-cli -g ./PA051000.ORF.cfg --dump-nodes or similar (note the ./ ) to make sure the path is picked up correctly?

There were some errors but I think I fixed them and in the end it worked, apparently. Thanks.