jlevy44 / PathFlow-MixMatch

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

TypeError: 'NoneType' object is not callable #9

Closed asmagen closed 4 years ago

asmagen commented 4 years ago

(pytorch_p36) ubuntu:~$ pathflow-mixmatch register_images \

--im1 data/Li63TCD20_cropped_mask.png \ --im2 data/Li63TCD3_cropped_mask.png \ --gpu_device 0 --transfrm_type wendland \ --fix_rotation False --output_dir data \ --lr 0.01 --iterations 10 --min_object_size 50000 \ --no_segment_analysis True --black_background True Loading images. Performing regitration. Traceback (most recent call last): File "/home/ubuntu/.local/bin/pathflow-mixmatch", line 8, in sys.exit(main()) File "/home/ubuntu/.local/lib/python3.6/site-packages/pathflow_mixmatch/cli.py", line 522, in main fire.Fire(Commands) File "/home/ubuntu/.local/lib/python3.6/site-packages/fire/core.py", line 138, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/ubuntu/.local/lib/python3.6/site-packages/fire/core.py", line 468, in _Fire target=component.name) File "/home/ubuntu/.local/lib/python3.6/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "/home/ubuntu/.local/lib/python3.6/site-packages/pathflow_mixmatch/cli.py", line 519, in register_images pyramid=pyramid) File "/home/ubuntu/.local/lib/python3.6/site-packages/pathflow_mixmatch/cli.py", line 448, in registerimages new_img=displace_image(im2,affine_register(im1, im2, gpu_device=gpu_device, lr=lr, loss_fn=loss_fn, transform_type=transform_type, iterations=iterations, opt_cm=opt_cm, sigma=sigma, order=order, pyramid=pyramid)[0],gpu_device=gpu_device) # new tri, output he as well File "/home/ubuntu/.local/lib/python3.6/site-packages/pathflow_mixmatch/cli.py", line 183, in affine_register constant_flow = transformation.get_flow() File "/home/ubuntu/.local/lib/python3.6/site-packages/airlab/transformation/pairwise.py", line 49, in get_flow return self._compute_flow().detach() TypeError: 'NoneType' object is not callable

jlevy44 commented 4 years ago

Ok, I just pushed an attempted fix

asmagen commented 4 years ago

Thanks, but different errors come up with either transform_type or bspline. I'll have to wait until the package debugging develops a bit more.

jlevy44 commented 4 years ago

Ok, we'll keep debugging this, in any case, we may have a quick solution for drop2 here: #1

jlevy44 commented 4 years ago

While this issue has been resolved, we are still working on: #1