jlevy44 / PathFlow-MixMatch

Don't mix, match! Simple utilities for improved registration of Histopathology Whole Slide Images.
10 stars 6 forks source link

Fix nonlinear transformations #12

Closed sumanthratna closed 4 years ago

sumanthratna commented 4 years ago

Decreasing the learning rate solves the issue of the loss of microarchitectural details (https://github.com/airlab-unibas/airlab/issues/26). Further experimentation with parameters may be necessary.

jlevy44 commented 4 years ago

6 I think this looks good enough to merge, just going to validate with a test.

sumanthratna commented 4 years ago

Nonparametric

python pathflow_mixmatch/cli.py register_images --im1 ./COAD_19_5pc.jpg --im2 ./COAD_19_5pc_S1.jpg --output_dir non_parametric/ --gpu_device 1 --transform_type non_parametric --no_segment_analysis True --verbose True --overwrite True --loss_fn ncc --lr 0.00001

B-spline

python pathflow_mixmatch/cli.py register_images --im1 ./COAD_19_5pc.jpg --im2 ./COAD_19_5pc_S1.jpg --output_dir bspline/ --gpu_device 1 --transform_type bspline --no_segment_analysis True --verbose True --overwrite True --loss_fn ncc --lr 0.00001

Wendland

python pathflow_mixmatch/cli.py register_images --im1 ./COAD_19_5pc.jpg --im2 ./COAD_19_5pc_S1.jpg --output_dir wendland/ --gpu_device 1 --transform_type wendland --no_segment_analysis True --verbose True --overwrite True --loss_fn ncc --lr 0.00001

jlevy44 commented 4 years ago

Excellent, thanks!

jlevy44 commented 4 years ago

Hey so I'm testing right now. Seems like nonlinear transforms run out of memory very quickly (32GB GPU). I'm running an affine transformation right now and all linear transforms seem to be okay

jlevy44 commented 4 years ago

I think part of it is in the create_image_pyramids, https://github.com/airlab-unibas/airlab/issues/29 which I have tried to remedy here: https://github.com/jlevy44/airlab . Still too much memory.

jlevy44 commented 4 years ago

So still memory issues. I'm going to merge here and then open up a new PR. @sumanthratna I've added you as a collaborator so feel free to open additional branches in this repo.

jlevy44 commented 4 years ago

In any case, it was functional and thus should have been merged anyways.