icandle / CAMixerSR

CAMixerSR: Only Details Need More “Attention” (CVPR 2024)
https://arxiv.org/abs/2402.19289
Apache License 2.0
228 stars 13 forks source link

the result of net is something wrong #10

Closed xiaoyingzhengrui closed 6 months ago

xiaoyingzhengrui commented 7 months ago

thanks for the shared codes. i test the pretrained models using test2K dataset but the output is wrong just like the pic blow, i can't find the reason, do you know what happened?

1279_CAMixerSR_0 50_x2_DF2K

icandle commented 7 months ago

It's so weird. I will check the code, pretrained model and requirement later. In my environment, it works well. Could you provide the detail env information like torch version and cuda version?

icandle commented 7 months ago

I guess it is an environmental problem, but I have no idea about where this specific problem comes. I try on my personal device with torch 2.1.1, cuda12.1, and basicsr 1.4.2, where the image can be properly restored. Hope it can help you.

1279_CAMixerSR_x4_2K

xiaoyingzhengrui commented 7 months ago

I guess it is an environmental problem, but I have no idea about where this specific problem comes. I try on my personal device with torch 2.1.1, cuda12.1, and basicsr 1.4.2, where the image can be properly restored. Hope it can help you.

1279_CAMixerSR_x4_2K

ohh,i'll try it again, maybe something wrong in my computer and i'll feedback to you

xiaoyingzhengrui commented 7 months ago

i check my environment, but still get the same wrong result,my environment is like this: `Package Version


absl-py 2.1.0 accelerate 0.21.0 addict 2.4.0 aenum 3.1.15 aiofiles 23.2.1 aiohttp 3.9.3 aiosignal 1.3.1 aliyun-python-sdk-core 2.15.0 aliyun-python-sdk-kms 2.16.2 altair 5.2.0 annotated-types 0.6.0 antlr4-python3-runtime 4.9.3 anyio 3.7.1 async-timeout 4.0.3 attrs 23.2.0 av 12.0.0 basicsr 1.4.2 beautifulsoup4 4.12.3 blendmodes 2022 blinker 1.7.0 boltons 23.1.1 certifi 2024.2.2 cffi 1.16.0 chardet 5.2.0 charset-normalizer 3.3.2 clean-fid 0.1.35 click 8.1.7 clip 1.0 colorama 0.4.6 coloredlogs 15.0.1 colorlog 6.8.2 contourpy 1.2.0 crcmod 1.7 cryptography 42.0.5 cssselect2 0.7.0 cycler 0.12.1 Cython 3.0.10 deprecation 2.1.0 depth_anything 2024.1.22.0 docutils 0.21rc1 easydict 1.13 einops 0.4.1 embreex 2.17.7.post4 exceptiongroup 1.2.0 facexlib 0.3.0 fastapi 0.94.0 ffmpy 0.3.2 filelock 3.13.1 filterpy 1.4.5 flatbuffers 23.5.26 fonttools 4.49.0 frozenlist 1.4.1 fsspec 2024.2.0 ftfy 6.1.3 future 1.0.0 fvcore 0.1.5.post20221221 gdown 5.1.0 gfpgan 1.3.8 gitdb 4.0.11 GitPython 3.1.32 gradio 3.41.2 gradio_client 0.5.0 greenlet 3.0.3 grpcio 1.62.0 h11 0.12.0 handrefinerportable 2024.2.12.0 httpcore 0.15.0 httpx 0.24.1 huggingface-hub 0.20.3 humanfriendly 10.0 idna 3.6 imageio 2.34.0 importlib-metadata 7.0.1 importlib-resources 6.1.1 inflection 0.5.1 iopath 0.1.9 jax 0.4.24 Jinja2 3.1.3 jmespath 0.10.0 joblib 1.3.2 jsonmerge 1.8.0 jsonschema 4.21.1 jsonschema-specifications 2023.12.1 kiwisolver 1.4.5 kornia 0.6.7 lark 1.1.2 lazy_loader 0.3 lightning-utilities 0.10.1 llvmlite 0.42.0 lmdb 1.4.1 lpips 0.1.4 lxml 5.1.0 mapbox-earcut 1.0.1 Markdown 3.5.2 markdown-it-py 3.0.0 MarkupSafe 2.1.5 matplotlib 3.8.3 mdurl 0.1.2 mediapipe 0.10.10 ml-dtypes 0.3.2 mmcv-full 1.7.2 mmedit 0.16.1 model-index 0.1.11 mpmath 1.3.0 multidict 6.0.5 networkx 3.2.1 nltk 3.8.1 numba 0.59.0 numpy 1.23.5 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu12 8.9.2.26 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu12 2.19.3 nvidia-nvjitlink-cu12 12.3.101 nvidia-nvtx-cu12 12.1.105 omegaconf 2.2.3 onnxruntime 1.17.1 open-clip-torch 2.20.0 opencv-contrib-python 4.9.0.80 opencv-python 4.9.0.80 opendatalab 0.0.10 openmim 0.3.9 openxlab 0.0.37 opt-einsum 3.3.0 ordered-set 4.1.0 orjson 3.9.14 oss2 2.17.0 packaging 23.2 pandas 2.2.0 piexif 1.1.3 Pillow 9.5.0 pip 23.3.1 platformdirs 4.2.0 portalocker 2.8.2 protobuf 3.20.3 psutil 5.9.5 py-cpuinfo 9.0.0 pycollada 0.8 pycparser 2.21 pycryptodome 3.20.0 pydantic 1.10.14 pydantic_core 2.16.2 pydub 0.25.1 PyFlow 3.0.0 Pygments 2.17.2 pyparsing 3.1.1 PySocks 1.7.1 python-dateutil 2.8.2 python-multipart 0.0.9 pytorch-lightning 1.9.4 pytz 2023.4 PyWavelets 1.5.0 PyYAML 6.0.1 QtPy 2.4.1 realesrgan 0.3.0 referencing 0.33.0 regex 2023.12.25 reportlab 4.1.0 requests 2.28.2 resize-right 0.0.2 rich 13.4.2 rpds-py 0.18.0 Rtree 1.2.0 safetensors 0.3.1 scikit-image 0.21.0 scikit-learn 1.4.2 scipy 1.12.0 seaborn 0.13.2 semantic-version 2.10.0 sentencepiece 0.2.0 setuptools 60.2.0 shapely 2.0.3 six 1.16.0 smmap 5.0.1 sniffio 1.3.0 sounddevice 0.4.6 soupsieve 2.5 SQLAlchemy 2.0.29 starlette 0.26.1 svg.path 6.3 svglib 1.5.1 sympy 1.12 tabulate 0.9.0 tb-nightly 2.17.0a20240222 tensorboard 2.16.2 tensorboard-data-server 0.7.2 termcolor 2.4.0 thop 0.1.1.post2209072238 threadpoolctl 3.4.0 tifffile 2024.2.12 timm 0.9.2 tinycss2 1.2.1 tokenizers 0.13.3 tomesd 0.1.3 tomli 2.0.1 toolz 0.12.1 torch 2.1.1+cu121 torchaudio 2.1.1+cu121 torchdiffeq 0.2.3 torchmetrics 1.3.1 torchsde 0.2.5 torchvision 0.16.1+cu121 tqdm 4.65.2 trampoline 0.1.2 transformers 4.30.2 trimesh 4.2.0 triton 2.1.0 typing_extensions 4.9.0 tzdata 2024.1 ultralytics 8.1.29 urllib3 1.26.18 uvicorn 0.27.1 vhacdx 0.0.6 wcwidth 0.2.13 webencodings 0.5.1 websockets 11.0.3 Werkzeug 3.0.1 wheel 0.41.2 xatlas 0.0.9 xformers 0.0.24 xxhash 3.4.1 yacs 0.1.8 yapf 0.40.2 yarl 1.9.4 zipp 3.17.0`

it seems like the number of result image's channel or bit cause this problem, but i have no idea where is different between us, i run all the test scripts you provided and just change the data path

icandle commented 7 months ago

So it only happens to partial images? Do this phenomenon happen with other ratios?Currently, I have no idea about why it happens. I will check the uploaded datasets and try to reproduce the problem on other device. Since I am on vocation, I may feedback to you later. Thanks.

caojiehui commented 7 months ago

So it only happens to partial images? Do this phenomenon happen with other ratios?Currently, I have no idea about why it happens. I will check the uploaded datasets and try to reproduce the problem on other device. Since I am on vocation, I may feedback to you later. Thanks.

Hello, authors. I encountered the same problem when testing my own samples. output_3_model_2_crop_100% linen_0 图片

xiaoyingzhengrui commented 7 months ago

So it only happens to partial images? Do this phenomenon happen with other ratios?Currently, I have no idea about why it happens. I will check the uploaded datasets and try to reproduce the problem on other device. Since I am on vocation, I may feedback to you later. Thanks.

I tested 4k/2k dataset, all results ran into the same trouble

icandle commented 7 months ago

Sorry, I can still not reproduce this problem. May you try it on colab or other opening platforms? I have tried with several machines and only observed PSNR fluctuating.

jlzhou1 commented 7 months ago

Thanks for the code. I should point out that I'm having the same problem, can you switch computers to find out why? 屏幕截图 2024-04-29 043152

jlzhou1 commented 7 months ago

Thanks for the code. I should point out that I'm having the same problem, can you switch computers to find out why? 屏幕截图 2024-04-29 043152

D429

jlzhou1 commented 7 months ago

Sorry, I can still not reproduce this problem. May you try it on colab or other opening platforms? I have tried with several machines and only observed PSNR fluctuating.

Hi, have you solved it? The same problem is plaguing me. If you've fix it, please contact me ,thanks!

jlzhou1 commented 7 months ago

Sorry, I can still not reproduce this problem. May you try it on colab or other opening platforms? I have tried with several machines and only observed PSNR fluctuating.

Hi, have you solved it? The same problem is plaguing me. If you've fix it, please contact me,thanks!

xiaoyingzhengrui commented 7 months ago

Sorry, I can still not reproduce this problem. May you try it on colab or other opening platforms? I have tried with several machines and only observed PSNR fluctuating.

Hi, have you solved it? The same problem is plaguing me. If you've fix it, please contact me,thanks!

still not

lz1054864168 commented 7 months ago

Sorry, I can still not reproduce this problem. May you try it on colab or other opening platforms? I have tried with several machines and only observed PSNR fluctuating.

Hi, have you solved it? The same problem is plaguing me. If you've fix it, please contact me,thanks!

Hi, I had the same problem and fixed it. I think you should modify the '.yml' file, where the 'pretrain_network_g:' must be modified to the corresponding '.pth' instead of the default.

jlzhou1 commented 7 months ago

Sorry, I can still not reproduce this problem. May you try it on colab or other opening platforms? I have tried with several machines and only observed PSNR fluctuating.

Hi, have you solved it? The same problem is plaguing me. If you've fix it, please contact me,thanks!

Hi, I had the same problem and fixed it. I think you should modify the '.yml' file, where the 'pretrain_network_g:' must be modified to the corresponding '.pth' instead of the default.

屏幕截图 2024-04-29 190800 Thank you very much. it is useful~