DIAGNijmegen / pathology-hooknet-tls

MIT License
6 stars 0 forks source link

An error is reported for downsampling #7

Open Madeypo opened 2 months ago

Madeypo commented 2 months ago

Dear Mart,

Hooknettls is a very good article, and I really appreciate your contribution. I encountered some issues when trying to reproduce it using Docker.

1.Is there any hidden code inside the Docker container after creation? For example, I noticed that the 'IOPaths' defined in hooknettls/io.py is not being used. I also couldn't find the file containing the complete code for the dataloader, and some parameters seem to be undefined as well.

2.When I'm testing with my own data, I encounter the following error. How should I resolve it.

Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/user/pathology-hooknet-tls/hooknettls/main.py", line 8, in objects = build_config(config_reader.read()["default"]) File "/usr/local/lib/python3.8/dist-packages/dicfg/factory.py", line 124, in build_config return _ObjectFactory(deepcopy(config)).build_config() File "/usr/local/lib/python3.8/dist-packages/dicfg/factory.py", line 26, in build_config return self._build(self._configuration) File "/usr/lib/python3.8/functools.py", line 912, in _method return method.get(obj, cls)(*args, *kwargs) File "/usr/local/lib/python3.8/dist-packages/dicfg/factory.py", line 38, in _build_dict config[key] = self._build_object(value) File "/usr/local/lib/python3.8/dist-packages/dicfg/factory.py", line 67, in _build_object return attribute(args, *kwargs) File "/usr/local/lib/python3.8/dist-packages/wholeslidedata/iterators/patchiterator.py", line 46, in create_patch_iterator commander = commander_class( File "/usr/local/lib/python3.8/dist-packages/wholeslidedata/buffer/patchcommander.py", line 50, in init self.reset() File "/usr/local/lib/python3.8/dist-packages/wholeslidedata/buffer/patchcommander.py", line 68, in reset messages = self.get_patch_messages() File "/usr/local/lib/python3.8/dist-packages/wholeslidedata/buffer/patchcommander.py", line 91, in get_patch_messages self._mask = WholeSlideImage(self._mask_path, backend=self._backend, auto_resample=True) File "/usr/local/lib/python3.8/dist-packages/wholeslidedata/image/wholeslideimage.py", line 39, in init self._spacings = self._backend._init_spacings(self._downsamplings) File "/usr/local/lib/python3.8/dist-packages/wholeslidedata/interoperability/asap/backend.py", line 43, in _init_spacings return [ File "/usr/local/lib/python3.8/dist-packages/wholeslidedata/interoperability/asap/backend.py", line 44, in self.getSpacing()[0] downsampling for downsampling in downsamplings

martvanrijthoven commented 2 months ago

Dear Madeypo,

Thank you for your kind words and interest in hooknet-tls!

1)

I understand that the code could be a bit confusing, i will try to explain a bit: The hooknet-tls pipeline is defined via this config file:

2)

By looking at the error trace it seems something goes wrong when loading the mask file. However, could please also provide me the actual error? I hope it will allow me to give you more information what actual goes wrong.

Best wishes, Mart