SwinTransformer / Swin-Transformer-Object-Detection

This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" on Object Detection and Instance Segmentation.
https://arxiv.org/abs/2103.14030
Apache License 2.0
1.81k stars 381 forks source link

Error encountered when using swin-transformer to inference #188

Closed ktasha45 closed 2 years ago

ktasha45 commented 2 years ago

ERROR : CascadeRCNN: SwinTransformer: init() got an unexpected keyword argument 'embed_dim'

Environment

No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda' fatal: not a git repository (or any of the parent directories): .git sys.platform: linux Python: 3.7.13 (default, Apr 24 2022, 01:04:09) [GCC 7.5.0] CUDA available: False GCC: x86_64-linux-gnu-gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.12.0+cu113 PyTorch compiling details: PyTorch built with:

TorchVision: 0.13.0+cu113 OpenCV: 4.6.0 MMCV: 1.6.1 MMCV Compiler: GCC 9.3 MMCV CUDA Compiler: 11.3 MMDetection: 2.25.1+

Error traceback

TypeError: __init__() got an unexpected keyword argument 'embed_dim'

During handling of the above exception, another exception occurred:

The rest of the contents were omitted because they were too long. You can check it in the colab link.

ktasha45 commented 2 years ago

I tried to install mmdet with this, but the same error was printed.

ktasha45 commented 2 years ago

https://velog.io/@khjgmdwns/SwinTransformerSwin-Object-Detection-%EA%B0%9C%EB%B0%9C%ED%99%98%EA%B2%BD-%EC%84%A4%EC%A0%95CUDA-11.0

I referred to 3. in this blog and solved the problem.