megvii-research / NAFNet

The state-of-the-art image restoration model without nonlinear activation functions.
Other
2.18k stars 267 forks source link

ImportError: attempted relative import with no known parent package #135

Closed capi85 closed 8 months ago

capi85 commented 8 months ago

when I run python3 scripts/data_preparation/gopro.py for training NAFNet, this error appears.

Traceback (most recent call last): File "scripts/data_preparation/gopro.py", line 15, in from .basicsr.utils import scandir

I cannot find scandir anywhere. Can you tell me where is it, please? thank you.

capi85 commented 8 months ago

I found it here below. https://github.com/megvii-research/NAFNet/blob/main/basicsr/utils/misc.py thank you.