DeepMicroscopy / MIDOGpp

A large, multi-domain mitotic Figure Dataset
MIT License
12 stars 8 forks source link

Follow-up (Installation October 2024) #12

Open paraynaud opened 1 week ago

paraynaud commented 1 week ago

Hello, here is a small update on what I've been able to reproduce and the issues I faced so far. Disclaimer: I opened an issue because I didn't find the "Discussion" part of the repository.

Accomplishments

I am able to execute all four scripts: training.py, inference.py, evaluation.py, aggregate.py. To do so, I needed to make some adjustments in the scripts, see #11, and I had to truncate a bit the database during the training.

Issues

Questions

Can I ask the specifications of the hardware you used to obtain your results ? In my case: Windows 11, 16GB of RAM with an Nvidia RTX4090 Laptop ; I had to truncate the database I used for making training run properly, i.e. train_files[0:--]; valid_files[0:-]. Otherwise, I got the error:

  ...
  File "C:\Users\dev\anaconda3\envs\MIDOG2\lib\site-packages\torch\utils\data\dataloader.py", line 517, in __next__
    data = self._next_data()
  File "C:\Users\dev\anaconda3\envs\MIDOG2\lib\site-packages\torch\utils\data\dataloader.py", line 557, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "C:\Users\dev\anaconda3\envs\MIDOG2\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "C:\Users\dev\anaconda3\envs\MIDOG2\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "C:\Users\dev\Desktop\Vega\code\MIDOGpp\slide\data_loader.py", line 56, in __getitem__
    x = self.x.get(idxs, xmin, ymin)
  File "C:\Users\dev\Desktop\Vega\code\MIDOGpp\slide\data_loader.py", line 111, in get
    res = self.open(fn, x, y)
  File "C:\Users\dev\Desktop\Vega\code\MIDOGpp\slide\data_loader.py", line 119, in open
    return Image(pil2tensor(fn.get_patch(x, y) / 255., np.float32))
  File "C:\Users\dev\Desktop\Vega\code\MIDOGpp\slide\data_loader.py", line 25, in get_patch
    return np.array(self.slide.read_region(location=(int(x * self.down_factor),int(y * self.down_factor)),
  File "C:\Users\dev\anaconda3\envs\MIDOG2\lib\site-packages\openslide\__init__.py", line 374, in read_region
    crop = self._image.crop(image_topleft +
  File "C:\Users\dev\anaconda3\envs\MIDOG2\lib\site-packages\PIL\Image.py", line 1301, in crop
    self.load()
  File "C:\Users\dev\anaconda3\envs\MIDOG2\lib\site-packages\PIL\TiffImagePlugin.py", line 1238, in load
    return super().load()
  File "C:\Users\dev\anaconda3\envs\MIDOG2\lib\site-packages\PIL\ImageFile.py", line 229, in load
    self.im = Image.core.map_buffer(
  ValueError: buffer is not large enough

Did you encounter this one ?

In any case, fell free to let me know if I made some kind of mistakes, or any advice !

maubreville commented 1 week ago

As far as I know we used a machine with 64GB of RAM and a consumer graphics card with around 8 GB of VRAM, but I am not sure. @FraukeWilm Can you comment on this?

I am also not sure why truncation of the dataset would be necessary.

BTW: I opened the discussions tab.

wrt the versions: