pytorch-nested-unet
pytorch-nested-unet copied to clipboard
Fix compatibility issues with Python 3.12 and modern library versions
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
- Updated import statements and usage to be compatible with
albumentations==2.0.6. - Added logic to use GPU only if available.
- Updated import statements and usage to be compatible with
-
dataset.py
Ifself.transformincludesNormalize(), skip dividing image pixels by 255.0.
NOTE:
This modification is not backward compatible and may cause errors when used with older library versions.