pytorch-nested-unet icon indicating copy to clipboard operation
pytorch-nested-unet copied to clipboard

Fix compatibility issues with Python 3.12 and modern library versions

Open k2-gc opened this issue 7 months ago • 0 comments

Thanks for your great work on this repository!

In this PR, I applied the following modifications to support Python 3.12 and updated dependencies:

  • requirements.txt
    Added required libraries with version specifications.

  • train.py / val.py

    1. Updated import statements and usage to be compatible with albumentations==2.0.6.
    2. Added logic to use GPU only if available.
  • dataset.py
    If self.transform includes Normalize(), skip dividing image pixels by 255.0.


NOTE:
This modification is not backward compatible and may cause errors when used with older library versions.

k2-gc avatar May 05 '25 11:05 k2-gc