DecodingRaphael / unraphael

Python toolkit for unraveling image similarity with a focus on artistic practice
https://unraphael.readthedocs.io
Apache License 2.0
2 stars 1 forks source link

Selecting another image to compare with the base image in the slider section of the normalization page leads to rerunning the alignment phase #76

Closed ThijsVroegh closed 3 weeks ago

ThijsVroegh commented 2 months ago

Selecting another image to compare in the slider section of the normalization page leads to rerunning the entire alignment phase. However, since all images are already aligned to the base image, this is not necessary. Fixing this would reduce the waiting time

stefsmeets commented 1 month ago

Both the equalization and alignment stages are already cached on main:

https://github.com/DecodingRaphael/unraphael/blob/5441a294f92a420bce570e4fdf5d211b84721572/src/unraphael/dash/pages/4_compare.py#L14-L15

I don't see any other opportunites for optimization at the moment. What exactly are you running into?

ThijsVroegh commented 1 month ago

I mean that when you want to use the slider and compare it with another aligned image (while keeping the same base image), it starts to align all images again from scratch. However, the images are already aligned to the base image, so there would not be a need to align it again (and it costs soem waiting time)

stefsmeets commented 1 month ago

Okay, then I'm not entirely sure we talk about the same thing 😅 Which page and which slider do you mean?

ThijsVroegh commented 3 weeks ago

@stefsmeets Nevermind; I re-checked it and it does appear to work with good speed! ;-)