Spaces:
Running
Running
from pathlib import Path | |
path = '/kaggle/input/super-resolution-hust/Super Resolution HUST/Set5/image_SRF_4/' | |
# Parse the path using pathlib | |
p = Path(path) | |
# The 'Set5' part is the parent directory of 'image_SRF_4' | |
set5_part = p.parent.name | |
print(set5_part) # Output: Set5 | |