jbwang1997 / OBBDetection

OBBDetection is an oriented object detection library, which is based on MMdetection.
Apache License 2.0
537 stars 113 forks source link

No OBB is shown on the dota_demo.png after huge_image_demo.py was run. #45

Closed wkmwkm93 closed 2 years ago

wkmwkm93 commented 2 years ago

Describe the issue Follow the exact command to run the huge_image_demo.py shown in the tutorial oriented model starting

Reproduction

  1. What command or script did you run? %run demo/huge_image_demo.py demo/dota_demo.png configs/obb/oriented_rcnn/faster_rcnn_orpn_r50_fpn_1x_dota10.py ckpt/faster_rcnn_orpn_r50_fpn_1x_dota10_epoch12.pth ../BboxToolkit/tools/split_configs/dota1_0/ss_test.json

A placeholder for the command.

2. What config dir you run?

A placeholder for the config.

3. Did you make any modifications on the code or config? Did you understand what you have modified?
No modification to the config files. 

4. What dataset did you use?
image given in the demo folder: dota_demo.png
**Environment**

1. Please run `python mmdet/utils/collect_env.py` to collect necessary environment infomation and paste it here.
sys.platform: linux
Python: 3.7.12 (default, Sep 10 2021, 00:21:48) [GCC 7.5.0]
CUDA available: True
CUDA_HOME: /usr/local/cuda
NVCC: Build cuda_11.1.TC455_06.29190527_0
GPU 0: Tesla K80
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.7.1+cu101
PyTorch compiling details: PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 10.1
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75
  - CuDNN 7.6.3
  - Magma 2.5.2
  - Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, 

TorchVision: 0.8.2+cu101
OpenCV: 4.1.2
MMCV: 0.6.2
MMDetection: 2.2.0+b4315c7
MMDetection Compiler: GCC 7.5
MMDetection CUDA Compiler: 11.1

2. You may add addition that may be helpful for locating the problem, such as
    - How you installed PyTorch [e.g., pip, conda, source]
    - Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)

By calling these functions in GOOGLE COLAB
!pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
!pip install 'git+https://github.com/jbwang1997/OBBDetection.git'

**Results**

If applicable, paste the related results here, e.g., what you expect and what you get.
```These are what I get
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 4/4, 2.2 task/s, elapsed: 2s, ETA:     0s
Merge patch results!!
/content/gdrive/My Drive/OBBDetection/mmdet/models/detectors/obb/obb_base.py:72: UserWarning: show==False and out_file is not specified, only result image will be returned
  warnings.warn('show==False and out_file is not specified, only '

I see no bounding boxes on the dota_demo.png.

A placeholder for results comparison

Issue fix

If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

jbwang1997 commented 2 years ago

Oh, this is a bug caused by the new vision of BboxToolkit. I have fixed it in the last commit.

wkmwkm93 commented 2 years ago

Really Thank you. The problem is solved.