Mmrotate - OpenMMLab Rotated Object Detection Benchmark

Overview

Introduction

English | 简体中文

MMRotate is an open-source toolbox for rotated object detection based on PyTorch. It is a part of the OpenMMLab project.

The master branch works with PyTorch 1.6+.

video.MP4
Major Features
  • Support multiple angle representations

    MMRotate provides three mainstream angle representations to meet different paper settings.

  • Modular Design

    We decompose the rotated object detection framework into different components, which makes it much easy and flexible to build a new model by combining different modules.

  • Strong baseline and State of the art

    The toolbox provides strong baselines and state-of-the-art methods in rotated object detection.

Installation

Please refer to install.md for installation guide.

Get Started

Please see get_started.md for the basic usage of MMRotate. There are also tutorials:

Model Zoo

Results and models are available in the README.md of each method's config directory. A summary can be found in the Model Zoo page.

Supported algorithms:

Model Request

We will keep up with the latest progress of the community, and support more popular algorithms and frameworks. If you have any feature requests, please feel free to leave a comment in MMRotate Roadmap.

Data Preparation

Please refer to data_preparation.md to prepare the data.

FAQ

Please refer to FAQ for frequently asked questions.

Contributing

We appreciate all contributions to improve MMRotate. Please refer to CONTRIBUTING.md for the contributing guideline.

Acknowledgement

MMRotate is an open source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks. We wish that the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and develop their own new methods.

Citation

If you find this project useful in your research, please consider cite:

@misc{mmrotate2022,
  title={MMRotate: A Rotated Object Detection Benchmark using PyTorch},
  author =       {Zhou, Yue and Yang, Xue and Zhang, Gefan and Jiang, Xue and Liu, Xingzhao and Yan, Junchi and Lyu, Chengqi and Zhang, Wenwei, and Chen, Kai},
  howpublished = {\url{https://github.com/open-mmlab/mmrotate}},
  year =         {2022}
}

License

This project is released under the Apache 2.0 license.

Projects in OpenMMLab

  • MMCV: OpenMMLab foundational library for computer vision.
  • MIM: MIM Installs OpenMMLab Packages.
  • MMClassification: OpenMMLab image classification toolbox and benchmark.
  • MMDetection: OpenMMLab detection toolbox and benchmark.
  • MMDetection3D: OpenMMLab next-generation platform for general 3D object detection.
  • MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
  • MMAction2: OpenMMLab next-generation action understanding toolbox and benchmark.
  • MMTracking: OpenMMLab video perception toolbox and benchmark.
  • MMPose: OpenMMLab pose estimation toolbox and benchmark.
  • MMEditing: OpenMMLab image and video editing toolbox.
  • MMOCR: A comprehensive toolbox for text detection, recognition and understanding.
  • MMGeneration: OpenMMLab next-generation toolbox for generative models.
  • MMFlow: OpenMMLab optical flow toolbox and benchmark.
  • MMFewShot: OpenMMLab fewshot learning toolbox and benchmark.
  • MMHuman3D: OpenMMLab 3D human parametric model toolbox and benchmark.
  • MMSelfSup: OpenMMLab self-supervised learning toolbox and benchmark.
  • MMRazor: OpenMMLab model compression toolbox and benchmark.
  • MMDeploy: OpenMMLab model deployment framework.
  • MMRotate: OpenMMLab rotated object detection toolbox and benchmark.
Comments
  • kfiou with swin_tiny reimplementation problems

    kfiou with swin_tiny reimplementation problems

    Reimplement a model in the model zoo using the provided configs

    Checklist

    1. I have searched related issues but cannot get the expected help.
    2. The issue has not been fixed in the latest version.

    Describe the issue

    Reimplement a model in the model zoo using the provided configs configs/kfiou/r3det_kfiou_ln_swin_tiny_adamw_fpn_1x_dota_ms_rr_oc.py configs/kfiou/roi_trans_kfiou_ln_swin_tiny_fpn_1x_dota_le90.py

    Reproduction

    1. What command or script did you run?

    tools/train.py

    1. What config dir you run?

    configs/kfiou/r3det_kfiou_ln_swin_tiny_adamw_fpn_1x_dota_ms_rr_oc.py configs/kfiou/roi_trans_kfiou_ln_swin_tiny_fpn_1x_dota_le90.py

    1. Did you make any modifications on the code or config? Did you understand what you have modified?

    I loaded swintransformer model myself since the site given is invalid.

    1. What dataset did you use?

    dotav1

    Environment

    1. Please run python mmrotate/utils/collect_env.py to collect necessary environment information and paste it here.

    sys.platform: linux Python: 3.7.11 (default, Jul 27 2021, 14:32:16) [GCC 7.5.0] CUDA available: True GPU 0,1: GeForce RTX 3090 CUDA_HOME: /usr/local/cuda NVCC: Build cuda_11.1.TC455_06.29190527_0 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.10.0 PyTorch compiling details: PyTorch built with:

    • GCC 7.3
    • C++ Version: 201402
    • Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications
    • Intel(R) MKL-DNN v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
    • OpenMP 201511 (a.k.a. OpenMP 4.5)
    • LAPACK is enabled (usually provided by MKL)
    • NNPACK is enabled
    • CPU capability usage: AVX512
    • CUDA Runtime 11.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_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
    • CuDNN 8.0.5
    • Magma 2.5.2
    • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.0, USE_CUDA=ON, USE_CUDNN=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.11.1 OpenCV: 4.5.4 MMCV: 1.4.8 MMCV Compiler: GCC 7.3 MMCV CUDA Compiler: 11.1 MMRotate: 0.1.0+

    Results

    The result is strange for both configs. for r3det_kfiou_ln_swin_tiny_adamw_fpn_1x_dota_ms_rr_oc, the loss goes nan with the given config in the middle of training process. The output is as follow: 2022-03-03 03:13:07,337 - mmrotate - INFO - Exp name: r3det_kfiou_ln_swin_tiny_adamw_fpn_1x_dota_ms_rr_oc.py 2022-03-03 03:13:07,337 - mmrotate - INFO - Epoch [4][3800/6400] lr: 1.000e-04, eta: 15:13:00, time: 1.222, data_time: 0.009, memory: 6728, s0.loss_cls: 0.8579, s0.loss_bbox: 49.3017, sr0.loss_cls: 0.5324, sr0.loss_bbox: 12.8906, loss: 63.5826, grad_norm: 238.8943 2022-03-03 03:14:09,169 - mmrotate - INFO - Epoch [4][3850/6400] lr: 1.000e-04, eta: 15:12:34, time: 1.237, data_time: 0.009, memory: 6728, s0.loss_cls: 0.9198, s0.loss_bbox: 45.2929, sr0.loss_cls: 0.5530, sr0.loss_bbox: 24.8593, loss: 71.6250, grad_norm: 303.1804 2022-03-03 03:15:09,412 - mmrotate - INFO - Epoch [4][3900/6400] lr: 1.000e-04, eta: 15:12:05, time: 1.205, data_time: 0.009, memory: 6728, s0.loss_cls: 0.9237, s0.loss_bbox: 38.0998, sr0.loss_cls: 0.5913, sr0.loss_bbox: 22.2580, loss: 61.8729, grad_norm: 258.2369 2022-03-03 03:16:09,798 - mmrotate - INFO - Epoch [4][3950/6400] lr: 1.000e-04, eta: 15:11:36, time: 1.208, data_time: 0.009, memory: 6728, s0.loss_cls: 0.8610, s0.loss_bbox: 51.9997, sr0.loss_cls: 0.4727, sr0.loss_bbox: 8.2045, loss: 61.5379, grad_norm: 245.4183 2022-03-03 03:17:10,993 - mmrotate - INFO - Epoch [4][4000/6400] lr: 1.000e-04, eta: 15:11:09, time: 1.224, data_time: 0.010, memory: 6728, s0.loss_cls: 0.9141, s0.loss_bbox: 43.9352, sr0.loss_cls: 0.4976, sr0.loss_bbox: 17.3902, loss: 62.7370, grad_norm: 251.7698 2022-03-03 03:18:10,932 - mmrotate - INFO - Epoch [4][4050/6400] lr: 1.000e-04, eta: 15:10:38, time: 1.199, data_time: 0.010, memory: 6728, s0.loss_cls: 0.8810, s0.loss_bbox: 46.5427, sr0.loss_cls: 0.5061, sr0.loss_bbox: 17.8371, loss: 65.7669, grad_norm: 223.0147 2022-03-03 03:19:10,435 - mmrotate - INFO - Epoch [4][4100/6400] lr: 1.000e-04, eta: 15:10:07, time: 1.190, data_time: 0.009, memory: 6728, s0.loss_cls: 0.9800, s0.loss_bbox: 38.0009, sr0.loss_cls: 0.4385, sr0.loss_bbox: 13.2763, loss: 52.6957, grad_norm: 182.5411 2022-03-03 03:20:11,712 - mmrotate - INFO - Epoch [4][4150/6400] lr: 1.000e-04, eta: 15:09:39, time: 1.225, data_time: 0.010, memory: 6728, s0.loss_cls: 0.8986, s0.loss_bbox: 45.8436, sr0.loss_cls: 0.4950, sr0.loss_bbox: 14.5906, loss: 61.8278, grad_norm: 248.6563 2022-03-03 03:21:10,936 - mmrotate - INFO - Epoch [4][4200/6400] lr: 1.000e-04, eta: 15:09:07, time: 1.184, data_time: 0.009, memory: 6728, s0.loss_cls: 0.8558, s0.loss_bbox: 44.0947, sr0.loss_cls: 0.5000, sr0.loss_bbox: 17.9017, loss: 63.3523, grad_norm: 211.6122 2022-03-03 03:22:10,696 - mmrotate - INFO - Epoch [4][4250/6400] lr: 1.000e-04, eta: 15:08:35, time: 1.195, data_time: 0.010, memory: 6728, s0.loss_cls: 0.8331, s0.loss_bbox: 39.5684, sr0.loss_cls: 0.6009, sr0.loss_bbox: 19.1346, loss: 60.1370, grad_norm: 207.3286 2022-03-03 03:23:11,753 - mmrotate - INFO - Epoch [4][4300/6400] lr: 1.000e-04, eta: 15:08:07, time: 1.221, data_time: 0.010, memory: 6728, s0.loss_cls: 0.8634, s0.loss_bbox: 42.2088, sr0.loss_cls: 0.6487, sr0.loss_bbox: 30.8503, loss: 74.5712, grad_norm: 228.5747 2022-03-03 03:24:08,064 - mmrotate - INFO - Epoch [4][4350/6400] lr: 1.000e-04, eta: 15:07:28, time: 1.126, data_time: 0.009, memory: 6728, s0.loss_cls: nan, s0.loss_bbox: nan, sr0.loss_cls: nan, sr0.loss_bbox: nan, loss: nan, grad_norm: nan 2022-03-03 03:25:01,703 - mmrotate - INFO - Epoch [4][4400/6400] lr: 1.000e-04, eta: 15:06:42, time: 1.073, data_time: 0.009, memory: 6728, s0.loss_cls: nan, s0.loss_bbox: nan, sr0.loss_cls: nan, sr0.loss_bbox: nan, loss: nan, grad_norm: nan

    For roi_trans_kfiou_ln_swin_tiny_fpn_1x_dota_le90, things are strange again. The loss seems normal, however the mAP is close to zero.

    2022-03-03 10:36:05,468 - mmrotate - INFO - Epoch [12][5950/6400] lr: 1.000e-06, eta: 0:03:56, time: 0.307, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.0862, loss_rpn_bbox: 0.0175, s0.loss_cls: 0.1440, s0.acc: 95.4902, s0.loss_bbox: 0.1616, s1.loss_cls: 0.1116, s1.acc: 96.6328, s1.loss_bbox: 0.0469, loss: 0.5677, grad_norm: 2.8243 2022-03-03 10:36:20,704 - mmrotate - INFO - Epoch [12][6000/6400] lr: 1.000e-06, eta: 0:03:29, time: 0.305, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.0784, loss_rpn_bbox: 0.0115, s0.loss_cls: 0.1379, s0.acc: 95.9961, s0.loss_bbox: 0.1559, s1.loss_cls: 0.1037, s1.acc: 97.1230, s1.loss_bbox: 0.0312, loss: 0.5187, grad_norm: 2.3542 2022-03-03 10:36:35,877 - mmrotate - INFO - Epoch [12][6050/6400] lr: 1.000e-06, eta: 0:03:03, time: 0.303, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.1008, loss_rpn_bbox: 0.0221, s0.loss_cls: 0.1560, s0.acc: 94.7656, s0.loss_bbox: 0.1852, s1.loss_cls: 0.1271, s1.acc: 95.7930, s1.loss_bbox: 0.0425, loss: 0.6336, grad_norm: 2.9375 2022-03-03 10:36:51,185 - mmrotate - INFO - Epoch [12][6100/6400] lr: 1.000e-06, eta: 0:02:37, time: 0.306, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.1049, loss_rpn_bbox: 0.0182, s0.loss_cls: 0.1789, s0.acc: 94.1738, s0.loss_bbox: 0.2147, s1.loss_cls: 0.1394, s1.acc: 95.6074, s1.loss_bbox: 0.0549, loss: 0.7109, grad_norm: 3.0274 2022-03-03 10:37:06,526 - mmrotate - INFO - Epoch [12][6150/6400] lr: 1.000e-06, eta: 0:02:11, time: 0.307, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.1238, loss_rpn_bbox: 0.0199, s0.loss_cls: 0.1759, s0.acc: 94.2949, s0.loss_bbox: 0.1875, s1.loss_cls: 0.1410, s1.acc: 95.5137, s1.loss_bbox: 0.0447, loss: 0.6929, grad_norm: 3.0797 2022-03-03 10:37:21,769 - mmrotate - INFO - Epoch [12][6200/6400] lr: 1.000e-06, eta: 0:01:44, time: 0.305, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.0888, loss_rpn_bbox: 0.0145, s0.loss_cls: 0.1383, s0.acc: 95.7617, s0.loss_bbox: 0.1513, s1.loss_cls: 0.1136, s1.acc: 96.6421, s1.loss_bbox: 0.0477, loss: 0.5542, grad_norm: 2.6510 2022-03-03 10:37:37,021 - mmrotate - INFO - Epoch [12][6250/6400] lr: 1.000e-06, eta: 0:01:18, time: 0.305, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.1119, loss_rpn_bbox: 0.0170, s0.loss_cls: 0.1698, s0.acc: 95.0332, s0.loss_bbox: 0.1738, s1.loss_cls: 0.1317, s1.acc: 96.1934, s1.loss_bbox: 0.0454, loss: 0.6497, grad_norm: 2.8886 2022-03-03 10:37:52,335 - mmrotate - INFO - Epoch [12][6300/6400] lr: 1.000e-06, eta: 0:00:52, time: 0.306, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.1384, loss_rpn_bbox: 0.0296, s0.loss_cls: 0.1954, s0.acc: 93.4336, s0.loss_bbox: 0.2464, s1.loss_cls: 0.1495, s1.acc: 95.3066, s1.loss_bbox: 0.0577, loss: 0.8170, grad_norm: 3.6254 2022-03-03 10:38:07,793 - mmrotate - INFO - Epoch [12][6350/6400] lr: 1.000e-06, eta: 0:00:26, time: 0.309, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.1259, loss_rpn_bbox: 0.0295, s0.loss_cls: 0.1714, s0.acc: 94.6934, s0.loss_bbox: 0.1900, s1.loss_cls: 0.1361, s1.acc: 96.0684, s1.loss_bbox: 0.0520, loss: 0.7049, grad_norm: 3.2369 2022-03-03 10:38:23,037 - mmrotate - INFO - Exp name: roi_trans_kfiou_ln_swin_tiny_fpn_1x_dota_le90.py 2022-03-03 10:38:23,037 - mmrotate - INFO - Epoch [12][6400/6400] lr: 1.000e-06, eta: 0:00:00, time: 0.305, data_time: 0.007, memory: 7279, loss_rpn_cls: 0.1173, loss_rpn_bbox: 0.0252, s0.loss_cls: 0.1731, s0.acc: 94.5508, s0.loss_bbox: 0.1745, s1.loss_cls: 0.1519, s1.acc: 95.3516, s1.loss_bbox: 0.0641, loss: 0.7061, grad_norm: 3.0836 2022-03-03 10:38:23,234 - mmrotate - INFO - Saving checkpoint at 12 epochs 2022-03-03 10:52:21,340 - mmrotate - INFO - +--------------------+-------+-------+--------+-------+ | class | gts | dets | recall | ap | +--------------------+-------+-------+--------+-------+ | plane | 18788 | 38005 | 0.062 | 0.013 | | baseball-diamond | 1087 | 401 | 0.016 | 0.002 | | bridge | 4181 | 504 | 0.000 | 0.000 | | ground-track-field | 733 | 374 | 0.023 | 0.003 | | small-vehicle | 58868 | 69520 | 0.014 | 0.000 | | large-vehicle | 43075 | 65885 | 0.010 | 0.000 | | ship | 76153 | 73019 | 0.013 | 0.000 | | tennis-court | 5923 | 10750 | 0.075 | 0.007 | | basketball-court | 1180 | 751 | 0.024 | 0.002 | | storage-tank | 13670 | 19423 | 0.017 | 0.001 | | soccer-ball-field | 827 | 736 | 0.018 | 0.001 | | roundabout | 973 | 190 | 0.006 | 0.000 | | harbor | 15468 | 28043 | 0.010 | 0.000 | | swimming-pool | 3836 | 4222 | 0.008 | 0.000 | | helicopter | 1189 | 502 | 0.024 | 0.005 | +--------------------+-------+-------+--------+-------+ | mAP | | | | 0.002 | +--------------------+-------+-------+--------+-------+ 2022-03-03 10:52:21,404 - mmrotate - INFO - Exp name: roi_trans_kfiou_ln_swin_tiny_fpn_1x_dota_le90.py 2022-03-03 10:52:21,405 - mmrotate - INFO - Epoch(val) [12][12800] mAP: 0.0024

    reimplementation 
    opened by xiaoyihit 28
  • ValueError: need at least one array to concatenate

    ValueError: need at least one array to concatenate

    Environment

    TorchVision: 0.11.3 OpenCV: 4.5.5 MMCV: 1.4.5 MMCV Compiler: GCC 9.1 MMCV CUDA Compiler: 11.1 MMRotate: 0.1.0+ CUDA Runtime 11.3 PyTorch: 1.10.2 Python: 3.7.11 GPU 0,1: GeForce RTX 3090

    Error traceback File "/home/deep/Libraries/anaconda3/envs/mmrotate/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 229, in iter for idx in self.sampler: File "/home/deep/Libraries/anaconda3/envs/mmrotate/lib/python3.7/site-packages/mmdet/datasets/samplers/group_sampler.py", line 36, in iter indices = np.concatenate(indices) File "<array_function internals>", line 6, in concatenate ValueError: need at least one array to concatenate

    opened by colorfully-ybf 19
  • --eval mAP error

    --eval mAP error

    Thanks for your error report and we appreciate it a lot.

    Checklist

    1. I have searched related issues but cannot get the expected help.
    2. I have read the FAQ documentation but cannot get the expected help.
    3. The bug has not been fixed in the latest version.

    Describe the bug A clear and concise description of what the bug is.

    Reproduction

    1. What command or script did you run?
    python ./tools/test.py \            
      configs/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_le90.py \
      rotated_retinanet_obb_r50_fpn_1x_dota_le90-c0097bc4.pth --eval mAP     
    
    1. Did you make any modifications on the code or config? Did you understand what you have modified?
    2. What dataset did you use?

    Environment

    1. Please run python mmrotate/utils/collect_env.py to collect necessary environment information and paste it here.
    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.)
    fatal: not a git repository (or any of the parent directories): .git
    sys.platform: linux
    Python: 3.7.10 (default, Jun  4 2021, 14:48:32) [GCC 7.5.0]
    CUDA available: True
    GPU 0: NVIDIA GeForce RTX 3090
    CUDA_HOME: /usr/local/cuda
    NVCC: Build cuda_11.2.r11.2/compiler.29618528_0
    GCC: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
    PyTorch: 1.10.0+cu113
    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 v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
      - OpenMP 201511 (a.k.a. OpenMP 4.5)
      - LAPACK is enabled (usually provided by MKL)
      - NNPACK is enabled
      - CPU capability usage: AVX512
      - CUDA Runtime 11.3
      - 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;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
      - CuDNN 8.2
      - Magma 2.5.2
      - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.2.0, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.0, USE_CUDA=ON, USE_CUDNN=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.11.1+cu113
    OpenCV: 4.5.4
    MMCV: 1.4.5
    MMCV Compiler: GCC 7.3
    MMCV CUDA Compiler: 11.3
    MMRotate: 0.1.0+
    

    Error traceback If applicable, paste the error trackback here.

    load checkpoint from local path: rotated_retinanet_obb_r50_fpn_1x_dota_le90-c0097bc4.pth
    [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 10833/10833, 18.6 task/s, elapsed: 584s, ETA:     0sTraceback (most recent call last):
      File "./tools/test.py", line 238, in <module>
        main()
      File "./tools/test.py", line 230, in main
        metric = dataset.evaluate(outputs, **eval_kwargs)
      File "/home/featurize/mmrotate/mmrotate/datasets/dota.py", line 202, in evaluate
        logger=logger)
      File "/home/featurize/mmrotate/mmrotate/datasets/dota.py", line 375, in eval_map
        det_results, annotations, i)
      File "/home/featurize/mmrotate/mmrotate/datasets/dota.py", line 613, in get_cls_results
        cls_gts.append(ann['bboxes'][gt_inds, :])
    TypeError: list indices must be integers or slices, not tuple
    

    Bug 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!

    opened by Adlith 16
  • [Fix] Fix test code for datasets

    [Fix] Fix test code for datasets

    Motivation

    Although the test code for datasets doesn't require CUDA_AVAILABLE, the current code skips its test. I fixed it.

    Modification

    • Remove pytest.mark.skipif
    • Fix floating point comparison
    opened by nijkah 15
  • [Algorithm] Support PSC

    [Algorithm] Support PSC

    Motivation

    Support PSC, phase-shifting coder and dual-frequency phase-shifting coder.

    Modification

    1. An angle coder named PSCCoder is added to mmrotate/models/task_modules/coders/angle_coder.py.
    2. Name encoded_size is unified to encode_size to comform with other codes (both encode_size and encoded_size are used in codes, which I believe should be further unified, please tell me which one is prefered).
    3. A slight amendment is made to mmrotate/models/dense_heads/angle_branch_retina_head.py to support both CSL and PSC (the original verion use angle_coder['omega'] to calculate the encoded_size, which can only work with CSL).
    4. The configuration files for running PSC are added to configs/psc.

    Performance are as follows:

    DOTA: Method | mAP50 | mAP75 | mAP50:95 --- | --- | --- | --- rotated_fcos_psc_dual_r50_fpn_1x_dota_rr_le90 | 72.90 | 39.80 | 41.51 rotated_retinanet_obb_psc_dual_r50_fpn_fp16_1x_dota_le90 | 71.09 | 41.17 | 41.25

    HRSC: Method | mAP50 | mAP75 | mAP50:95 --- | --- | --- | --- rotated_fcos_psc_r50_fpn_6x_hrsc_le90 | 90.06 | 78.56 | 67.57 rotated_retinanet_obb_psc_r50_fpn_6x_hrsc_le90 | 85.65 | 61.30 | 54.14

    1. Above results are obtained on mmrotate 0.3.2.
    2. This pull request has been tested on dev-1.x, the provided two config files can run without error (both based on retinanet).
    3. But the accuracy is mAP50=66.5 (DOTA, val) and mAP50=82.0 (HRSC), lower than that on mmrotate 0.3.2 (the basic rotated_retinanet and rotated_retinanet+csl also show lower mAP on 1.x)
    4. rotated_fcos+psc failed in training (so does rotated_fcos+csl, meaning that this bug is not induced by PSC).
    dev-1.x 
    opened by yuyi1005 14
  • [Algorithm] Support  Oriented Reppoints (CVPR'22)

    [Algorithm] Support Oriented Reppoints (CVPR'22)

    Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

    Motivation

    Support the Oriented RepPoints (CVPR'22) for #127

    Modification

    Checklist

    1. Pre-commit or other linting tools are used to fix the potential lint issues.
    2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
    3. The documentation has been modified accordingly, like docstring or example tutorials.
    need-resolve-conflict 
    opened by LiWentomng 14
  • [Docs] oriented RCNN recurrence,I can't get good mAP

    [Docs] oriented RCNN recurrence,I can't get good mAP

    Branch

    master branch https://mmrotate.readthedocs.io/en/latest/

    📚 The doc issue

    This is my conf.

    dataset_type = 'DOTADataset' data_root = '/media/giant/Data/WorkSpace/hw/mmrotate-main/data/split_1024_dota1_0/' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='RResize', img_scale=(1024, 1024)), dict( type='RRandomFlip', flip_ratio=[0.25, 0.25, 0.25], direction=['horizontal', 'vertical', 'diagonal'], version='le90'), dict( type='Normalize', mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']) ] test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(1024, 1024), flip=False, transforms=[ dict(type='RResize'), dict( type='Normalize', mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img']) ]) ] data = dict( samples_per_gpu=2, workers_per_gpu=2, train=dict( type='DOTADataset', ann_file= '/media/giant/Data/WorkSpace/hw/mmrotate-main/data/split_1024_dota1_0/trainval/annfiles/', img_prefix= '/media/giant/Data/WorkSpace/hw/mmrotate-main/data/split_1024_dota1_0/trainval/images/', pipeline=[ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='RResize', img_scale=(1024, 1024)), dict( type='RRandomFlip', flip_ratio=[0.25, 0.25, 0.25], direction=['horizontal', 'vertical', 'diagonal'], version='le90'), dict( type='Normalize', mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']) ], version='le90'), val=dict( type='DOTADataset', ann_file= '/media/giant/Data/WorkSpace/hw/mmrotate-main/data/split_1024_dota1_0/trainval/annfiles/', img_prefix= '/media/giant/Data/WorkSpace/hw/mmrotate-main/data/split_1024_dota1_0/trainval/images/', pipeline=[ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(1024, 1024), flip=False, transforms=[ dict(type='RResize'), dict( type='Normalize', mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img']) ]) ], version='le90'), test=dict( type='DOTADataset', ann_file= '/media/giant/Data/WorkSpace/hw/mmrotate-main/data/split_1024_dota1_0/test/images/', img_prefix= '/media/giant/Data/WorkSpace/hw/mmrotate-main/data/split_1024_dota1_0/test/images/', pipeline=[ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(1024, 1024), flip=False, transforms=[ dict(type='RResize'), dict( type='Normalize', mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img']) ]) ], version='le90')) evaluation = dict(interval=1, metric='mAP') optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2)) lr_config = dict( policy='step', warmup='linear', warmup_iters=500, warmup_ratio=0.3333333333333333, step=[8, 11]) runner = dict(type='EpochBasedRunner', max_epochs=12) checkpoint_config = dict(interval=12) log_config = dict(interval=50, hooks=[dict(type='TextLoggerHook')]) dist_params = dict(backend='nccl') log_level = 'INFO' load_from = None resume_from = None workflow = [('train', 1)] opencv_num_threads = 0 mp_start_method = 'fork' angle_version = 'le90' model = dict( type='OrientedRCNN', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style='pytorch', pretrained= '/media/giant/Data/WorkSpace/hw/mmrotate-main/pre_model/oriented_rcnn_r50_fpn_1x_dota_le90-6d2b2ce0.pth' ), neck=dict( type='FPN', in_channels=[256, 512, 1024, 2048], out_channels=256, num_outs=5), rpn_head=dict( type='OrientedRPNHead', in_channels=256, feat_channels=256, version='le90', anchor_generator=dict( type='AnchorGenerator', scales=[8], ratios=[0.5, 1.0, 2.0], strides=[4, 8, 16, 32, 64]), bbox_coder=dict( type='MidpointOffsetCoder', angle_range='le90', target_means=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], target_stds=[1.0, 1.0, 1.0, 1.0, 0.5, 0.5]), loss_cls=dict( type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0), loss_bbox=dict( type='SmoothL1Loss', beta=0.1111111111111111, loss_weight=1.0)), roi_head=dict( type='OrientedStandardRoIHead', bbox_roi_extractor=dict( type='RotatedSingleRoIExtractor', roi_layer=dict( type='RoIAlignRotated', out_size=7, sample_num=2, clockwise=True), out_channels=256, featmap_strides=[4, 8, 16, 32]), bbox_head=dict( type='RotatedShared2FCBBoxHead', in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=15, bbox_coder=dict( type='DeltaXYWHAOBBoxCoder', angle_range='le90', norm_factor=None, edge_swap=True, proj_xy=True, target_means=(0.0, 0.0, 0.0, 0.0, 0.0), target_stds=(0.1, 0.1, 0.2, 0.2, 0.1)), reg_class_agnostic=True, loss_cls=dict( type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))), train_cfg=dict( rpn=dict( assigner=dict( type='MaxIoUAssigner', pos_iou_thr=0.7, neg_iou_thr=0.3, min_pos_iou=0.3, match_low_quality=True, ignore_iof_thr=-1), sampler=dict( type='RandomSampler', num=256, pos_fraction=0.5, neg_pos_ub=-1, add_gt_as_proposals=False), allowed_border=0, pos_weight=-1, debug=False), rpn_proposal=dict( nms_pre=2000, max_per_img=2000, nms=dict(type='nms', iou_threshold=0.8), min_bbox_size=0), rcnn=dict( assigner=dict( type='MaxIoUAssigner', pos_iou_thr=0.5, neg_iou_thr=0.5, min_pos_iou=0.5, match_low_quality=False, iou_calculator=dict(type='RBboxOverlaps2D'), ignore_iof_thr=-1), sampler=dict( type='RRandomSampler', num=512, pos_fraction=0.25, neg_pos_ub=-1, add_gt_as_proposals=True), pos_weight=-1, debug=False)), test_cfg=dict( rpn=dict( nms_pre=2000, max_per_img=2000, nms=dict(type='nms', iou_threshold=0.8), min_bbox_size=0), rcnn=dict( nms_pre=2000, min_bbox_size=0, score_thr=0.05, nms=dict(iou_thr=0.1), max_per_img=2000))) work_dir = '/media/giant/Data/WorkSpace/hw/mmrotate-main/work_dirs/oriented_RCNN_3' auto_resume = False gpu_ids = range(0, 1)

    Dota datasets used ss_trainval.json,ss_test.json

    python tools/test.py /media/giant/Data/WorkSpace/hw/mmrotate-main/configs/oriented_rcnn/oriented_rcnn_r50_fpn_1x_dota_le90.py /media/giant/Data/WorkSpace/hw/mmrotate-main/work_dirs/oriented_RCNN_3/latest.pth --format-only --eval-options submission_dir=/media/giant/Data/WorkSpace/hw/mmrotate-main/work_dirs/oriented_RCNN_3/Task1_results

    my test result is: This is your evaluation result for task 1 (VOC metrics):

    mAP: 0.4646640734613539 ap of each class: plane:0.7987955222037281, baseball-diamond:0.3772997959320968, bridge:0.2193527129605339, ground-track-field:0.14461461362651976, small-vehicle:0.684794349188321, large-vehicle:0.7142836492183425, ship:0.7630970486078997, tennis-court:0.8339892706765937, basketball-court:0.2951130331270134, storage-tank:0.6383442164219478, soccer-ball-field:0.09673222235202107, roundabout:0.18280349757502767, harbor:0.4440369802128685, swimming-pool:0.5310300747688381, helicopter:0.24567411504855508 COCO style result:

    AP50: 0.4646640734613539 AP75: 0.23914854912215705 mAP: 0.25241695775786577

    I would be grateful if you could reply to me,Thank the authors for providing such an excellent rotating target detection framework.

    Suggest a potential alternative/fix

    No response

    opened by hu-wei-carrzy 13
  • RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

    RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

    1. when i run the demo.py, an error is appeared as 'RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)'.

    2. the configuration of my computer is listed following:

    OS: Windows 10 GPU: RTX3080Ti CUDA driver: 11.7 Pytorch : Preview (Nightly)

    i have installed mmrotate using conda virtual environment with pytorch version is Preview provided by its official webset, namely '1.13.0.dev20220914 py3.9_cuda11.7_cudnn8_0 pytorch-nightly'

    1. conda list is : Name Version Build Channel addict 2.4.0 pypi_0 pypi blas 1.0 mkl brotlipy 0.7.0 py39h2bbff1b_1003 ca-certificates 2022.07.19 haa95532_0 certifi 2022.6.15 py39haa95532_0 cffi 1.15.1 py39h2bbff1b_0 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.3 pypi_0 pypi colorama 0.4.5 pypi_0 pypi commonmark 0.9.1 pypi_0 pypi cryptography 37.0.1 py39h21b164f_0 cuda 11.7.1 0 nvidia cuda-cccl 11.7.91 0 nvidia cuda-command-line-tools 11.7.1 0 nvidia cuda-compiler 11.7.1 0 nvidia cuda-cudart 11.7.99 0 nvidia cuda-cudart-dev 11.7.99 0 nvidia cuda-cuobjdump 11.7.91 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-cuxxfilt 11.7.91 0 nvidia cuda-demo-suite 11.7.91 0 nvidia cuda-documentation 11.7.91 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-libraries-dev 11.7.1 0 nvidia cuda-memcheck 11.7.91 0 nvidia cuda-nsight-compute 11.7.1 0 nvidia cuda-nvcc 11.7.99 0 nvidia cuda-nvdisasm 11.7.91 0 nvidia cuda-nvml-dev 11.7.91 0 nvidia cuda-nvprof 11.7.101 0 nvidia cuda-nvprune 11.7.91 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvrtc-dev 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-nvvp 11.7.101 0 nvidia cuda-runtime 11.7.1 0 nvidia cuda-sanitizer-api 11.7.91 0 nvidia cuda-toolkit 11.7.1 0 nvidia cuda-tools 11.7.1 0 nvidia cuda-visual-tools 11.7.1 0 nvidia cycler 0.11.0 pypi_0 pypi e2cnn 0.2.2 pypi_0 pypi fonttools 4.37.1 pypi_0 pypi freetype 2.10.4 hd328e21_0 idna 3.3 pyhd3eb1b0_0 importlib-metadata 4.12.0 pypi_0 pypi intel-openmp 2021.4.0 haa95532_3556 jpeg 9e h2bbff1b_0 kiwisolver 1.4.4 pypi_0 pypi lerc 3.0 hd77b12b_0 libcublas 11.10.3.66 0 nvidia libcublas-dev 11.10.3.66 0 nvidia libcufft 10.7.2.124 0 nvidia libcufft-dev 10.7.2.124 0 nvidia libcurand 10.2.10.91 0 nvidia libcurand-dev 10.2.10.91 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusolver-dev 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libcusparse-dev 11.7.4.91 0 nvidia libdeflate 1.8 h2bbff1b_5 libnpp 11.7.4.75 0 nvidia libnpp-dev 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libnvjpeg-dev 11.8.0.2 0 nvidia libpng 1.6.37 h2a8f88b_0 libtiff 4.4.0 h8a3f274_0 libuv 1.40.0 he774522_0 libwebp 1.2.2 h2bbff1b_0 lz4-c 1.9.3 h2bbff1b_1 markdown 3.4.1 pypi_0 pypi matplotlib 3.5.3 pypi_0 pypi mkl 2021.4.0 haa95532_640 mkl-service 2.4.0 py39h2bbff1b_0 mkl_fft 1.3.1 py39h277e83a_0 mkl_random 1.2.2 py39hf11a4ad_0 mmcv-full 1.5.3 pypi_0 pypi mmdet 2.25.1 pypi_0 pypi mmrotate 0.3.2 dev_0 model-index 0.1.11 pypi_0 pypi mpmath 1.2.1 pypi_0 pypi nsight-compute 2022.2.1.3 0 nvidia numpy 1.23.1 py39h7a0a035_0 numpy-base 1.23.1 py39hca35cd5_0 opencv-python 4.6.0.66 pypi_0 pypi openmim 0.3.1 pypi_0 pypi openssl 1.1.1q h2bbff1b_0 ordered-set 4.1.0 pypi_0 pypi packaging 21.3 pypi_0 pypi pandas 1.4.4 pypi_0 pypi pillow 9.2.0 py39hdc2b20a_1 pip 22.1.2 py39haa95532_0 pycocotools 2.0.4 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pygments 2.13.0 pypi_0 pypi pyopenssl 22.0.0 pyhd3eb1b0_0 pyparsing 3.0.9 pypi_0 pypi pysocks 1.7.1 py39haa95532_0 python 3.9.13 h6244533_1 python-dateutil 2.8.2 pypi_0 pypi pytorch 1.13.0.dev20220914 py3.9_cuda11.7_cudnn8_0 pytorch-nightly pytorch-cuda 11.7 h67b0de4_0 pytorch-nightly pytorch-mutex 1.0 cuda pytorch-nightly pytz 2022.2.1 pypi_0 pypi pyyaml 6.0 pypi_0 pypi regex 2022.9.13 pypi_0 pypi requests 2.28.1 py39haa95532_0 rich 12.5.1 pypi_0 pypi scipy 1.9.1 pypi_0 pypi setuptools 63.4.1 py39haa95532_0 six 1.16.0 pyhd3eb1b0_1 sqlite 3.39.2 h2bbff1b_0 sympy 1.11.1 pypi_0 pypi tabulate 0.8.10 pypi_0 pypi terminaltables 3.1.10 pypi_0 pypi tk 8.6.12 h2bbff1b_0 torchaudio 0.13.0.dev20220914 pypi_0 pypi torchvision 0.14.0.dev20220914 pypi_0 pypi typing_extensions 4.3.0 py39haa95532_0 tzdata 2022c h04d1e81_0 urllib3 1.26.11 py39haa95532_0 vc 14.2 h21ff451_1 vs2015_runtime 14.27.29016 h5e58377_2 wheel 0.37.1 pyhd3eb1b0_0 win_inet_pton 1.1.0 py39haa95532_0 wincertstore 0.2 py39haa95532_2 xz 5.2.5 h8cc25b3_1 yapf 0.32.0 pypi_0 pypi zipp 3.8.1 pypi_0 pypi zlib 1.2.12 h8cc25b3_3 zstd 1.5.2 h19a0ad4_0

    2. Run code is : python demo/image_demo.py demo/demo.jpg oriented_rcnn_r50_fpn_1x_dota_le90.py oriented_rcnn_r50_fpn_1x_dota_le90-6d2b2ce0.pth --out-file result.jpg

    3. Error detail is : C:\Users\XXX\anaconda3\envs\mmrotate\lib\site-packages\mmdet\models\dense_heads\anchor_head.py:116: UserWarning: DeprecationWarning: num_anchors is deprecated, for consistency or also use num_base_priors instead warnings.warn('DeprecationWarning: num_anchors is deprecated, ' load checkpoint from local path: oriented_rcnn_r50_fpn_1x_dota_le90-6d2b2ce0.pth C:\Users\XXX\anaconda3\envs\mmrotate\lib\site-packages\mmdet\models\dense_heads\anchor_head.py:123: UserWarning: DeprecationWarning: anchor_generator is deprecated, please use "prior_generator" instead warnings.warn('DeprecationWarning: anchor_generator is deprecated, ' Traceback (most recent call last): File "C:\D_disk\mmrotate\demo\image_demo.py", line 45, in main(args) File "C:\D_disk\mmrotate\demo\image_demo.py", line 32, in main result = inference_detector(model, args.img) File "C:\Users\XXX\anaconda3\envs\mmrotate\lib\site-packages\mmdet\apis\inference.py", line 151, in inference_detector results = model(return_loss=False, rescale=True, **data) File "C:\Users\XXX\anaconda3\envs\mmrotate\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl return forward_call(*input, **kwargs) File "C:\Users\XXX\anaconda3\envs\mmrotate\lib\site-packages\mmcv\runner\fp16_utils.py", line 116, in new_func return old_func(*args, **kwargs) File "C:\Users\XXX\anaconda3\envs\mmrotate\lib\site-packages\mmdet\models\detectors\base.py", line 174, in forward return self.forward_test(img, img_metas, **kwargs) File "C:\Users\XXX\anaconda3\envs\mmrotate\lib\site-packages\mmdet\models\detectors\base.py", line 147, in forward_test return self.simple_test(imgs[0], img_metas[0], **kwargs) File "c:\d_disk\mmrotate\mmrotate\models\detectors\two_stage.py", line 183, in simple_test return self.roi_head.simple_test( File "c:\d_disk\mmrotate\mmrotate\models\roi_heads\rotate_standard_roi_head.py", line 252, in simple_test det_bboxes, det_labels = self.simple_test_bboxes( File "c:\d_disk\mmrotate\mmrotate\models\roi_heads\oriented_standard_roi_head.py", line 178, in simple_test_bboxes det_bbox, det_label = self.bbox_head.get_bboxes( File "C:\Users\XXX\anaconda3\envs\mmrotate\lib\site-packages\mmcv\runner\fp16_utils.py", line 205, in new_func return old_func(*args, **kwargs) File "c:\d_disk\mmrotate\mmrotate\models\roi_heads\bbox_heads\rotated_bbox_head.py", line 418, in get_bboxes det_bboxes, det_labels = multiclass_nms_rotated( File "c:\d_disk\mmrotate\mmrotate\core\post_processing\bbox_nms_rotated.py", line 58, in multiclass_nms_rotated bboxes, scores, labels = bboxes[inds], scores[inds], labels[inds] RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

    did anyone ever meet this problem? i am wating for someone who can give me solution or help, thanks!

    opened by shanhuhaifeng 13
  • CUDA error: an illegal memory access was encountered

    CUDA error: an illegal memory access was encountered

    First of all, thank you very much for your work. But it always reports the following error when testing rotated_reppoints:: File "/data2/S/RepPoints_oriented/mmrotate-0.2.0/mmrotate/models/dense_heads/rotated_reppoints_head.py", line 1157, in _get_bboxes_single scale_factor) RuntimeError: CUDA error: an illegal memory access was encountered

    How can this be solved? I tried different mmrotate versions and the solutions mentioned in issues, but none of them worked. I really hope to get your help Thank you

    bug help wanted 
    opened by shnew 12
  • RuntimeError: RuntimeErrorThe size of tensor a (17) must match the size of tensor b (16) at non-singleton dimension 1:

    RuntimeError: RuntimeErrorThe size of tensor a (17) must match the size of tensor b (16) at non-singleton dimension 1:

    When I ran the ROI TRANS in the config, I reported the following errors after all training, these are detailed errors

    2022-05-30 16:08:37,018 - mmrotate - INFO - Epoch [12][3200/3200] lr: 1.000e-06, eta: 0:00:00, time: 0.477, data_time: 0.006, memory: 11828, loss_rpn_cls: 0.0114, loss_rpn_bbox: 0.0178, s0.loss_cls: 0.0843, s0.acc: 96.4971, s0.loss_bbox: 0.0968, s1.loss_cls: 0.0904, s1.acc: 96.2743, s1.loss_bbox: 0.2311, loss: 0.5317, grad_norm: 3.4005 2022-05-30 16:08:41,068 - mmrotate - INFO - Saving checkpoint at 12 epochs [ ] 0/12800, elapsed: 0s, ETA:Traceback (most recent call last): File "./tools/train.py", line 184, in main() File "./tools/train.py", line 173, in main train_detector( File "/home/dell/Research/zly/mmrotate-main/mmrotate/apis/train.py", line 156, in train_detector runner.run(data_loaders, cfg.workflow) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run Traceback (most recent call last): File "./tools/train.py", line 184, in main() File "./tools/train.py", line 173, in main train_detector( File "/home/dell/Research/zly/mmrotate-main/mmrotate/apis/train.py", line 156, in train_detector runner.run(data_loaders, cfg.workflow) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run epoch_runner(data_loaders[i], **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train epoch_runner(data_loaders[i], **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train self.call_hook('after_train_epoch') File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/base_runner.py", line 309, in call_hook self.call_hook('after_train_epoch') File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/base_runner.py", line 309, in call_hook getattr(hook, fn_name)(self) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/hooks/evaluation.py", line 267, in after_train_epoch getattr(hook, fn_name)(self) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/hooks/evaluation.py", line 267, in after_train_epoch self._do_evaluate(runner) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/core/evaluation/eval_hooks.py", line 117, in _do_evaluate self._do_evaluate(runner) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/core/evaluation/eval_hooks.py", line 117, in _do_evaluate results = multi_gpu_test(results = multi_gpu_test(

    File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/apis/test.py", line 109, in multi_gpu_test File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/apis/test.py", line 109, in multi_gpu_test result = model(return_loss=False, rescale=True, **data) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl result = model(return_loss=False, rescale=True, **data) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 963, in forward return forward_call(*input, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 963, in forward output = self.module(*inputs[0], **kwargs[0]) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl output = self.module(*inputs[0], **kwargs[0]) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func return forward_call(*input, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func return old_func(*args, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 174, in forward return old_func(*args, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 174, in forward return self.forward_test(img, img_metas, **kwargs)return self.forward_test(img, img_metas, **kwargs)

    File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 147, in forward_test File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 147, in forward_test return self.simple_test(imgs[0], img_metas[0], **kwargs) File "/home/dell/Research/zly/mmrotate-main/mmrotate/models/detectors/two_stage.py", line 183, in simple_test return self.simple_test(imgs[0], img_metas[0], **kwargs) File "/home/dell/Research/zly/mmrotate-main/mmrotate/models/detectors/two_stage.py", line 183, in simple_test return self.roi_head.simple_test( File "/home/dell/Research/zly/mmrotate-main/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 321, in simple_test return self.roi_head.simple_test( File "/home/dell/Research/zly/mmrotate-main/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 321, in simple_test cls_score = [ File "/home/dell/Research/zly/mmrotate-main/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 322, in cls_score = [ File "/home/dell/Research/zly/mmrotate-main/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 322, in sum([score[i] for score in ms_scores]) / float(len(ms_scores)) sum([score[i] for score in ms_scores]) / float(len(ms_scores)) RuntimeError: RuntimeErrorThe size of tensor a (17) must match the size of tensor b (16) at non-singleton dimension 1: The size of tensor a (17) must match the size of tensor b (16) at non-singleton dimension 1 ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 26158) of binary: /home/dell/anaconda3/envs/zly/bin/python

    May I ask what is the reason

    opened by milamiqi 11
  • [BUG]  RoITransformer CUDA error: an illegal memory access was encountered

    [BUG] RoITransformer CUDA error: an illegal memory access was encountered

    Describe the bug python tools/train.py 'configs/roi_trans/roi_trans_r50_fpn_1x_dota_le90.py'

    Environment

    sys.platform: linux Python: 3.7.11 (default, Jul 27 2021, 14:32:16) [GCC 7.5.0] CUDA available: True GPU 0,1: GeForce RTX 3090 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 11.1, V11.1.105 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.10.0 PyTorch compiling details: PyTorch built with:

    • GCC 7.3
    • C++ Version: 201402
    • Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications
    • Intel(R) MKL-DNN v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
    • OpenMP 201511 (a.k.a. OpenMP 4.5)
    • LAPACK is enabled (usually provided by MKL)
    • NNPACK is enabled
    • CPU capability usage: AVX512
    • CUDA Runtime 11.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_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
    • CuDNN 8.0.5
    • Magma 2.5.2
    • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.0, USE_CUDA=ON, USE_CUDNN=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.11.1 OpenCV: 4.5.4 MMCV: 1.5.2 MMCV Compiler: GCC 7.5 MMCV CUDA Compiler: 11.1 MMRotate: 0.3.0+

    Error traceback Traceback (most recent call last): File "tools/train.py", line 294, in main() File "tools/train.py", line 288, in main meta=meta) File "/remote-home/xiaoyi/mmrotate-main/mmrotate/apis/train.py", line 156, in train_detector runner.run(data_loaders, cfg.workflow) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run epoch_runner(data_loaders[i], **kwargs) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 50, in train self.run_iter(data_batch, train_mode=True, **kwargs) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 30, in run_iter **kwargs) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmcv/parallel/data_parallel.py", line 75, in train_step return self.module.train_step(*inputs[0], **kwargs[0]) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmdet/models/detectors/base.py", line 248, in train_step losses = self(**data) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func return old_func(*args, **kwargs) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmdet/models/detectors/base.py", line 172, in forward return self.forward_train(img, img_metas, **kwargs) File "/remote-home/xiaoyi/mmrotate-main/mmrotate/models/detectors/two_stage.py", line 150, in forward_train **kwargs) File "/remote-home/xiaoyi/mmrotate-main/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 238, in forward_train rcnn_train_cfg) File "/remote-home/xiaoyi/mmrotate-main/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 155, in _bbox_forward_train bbox_results = self._bbox_forward(stage, x, rois) File "/remote-home/xiaoyi/mmrotate-main/mmrotate/models/roi_heads/roi_trans_roi_head.py", line 126, in _bbox_forward rois) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in call_impl return forward_call(*input, **kwargs) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 197, in new_func return old_func(*args, **kwargs) File "/remote-home/xiaoyi/mmrotate-main/mmrotate/models/roi_heads/roi_extractors/rotate_single_level_roi_extractor.py", line 133, in forward roi_feats_t = self.roi_layers[i](feats[i], rois) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, kwargs) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmcv/ops/roi_align_rotated.py", line 171, in forward self.clockwise) File "/opt/conda/envs/mmrotate/lib/python3.7/site-packages/mmcv/ops/roi_align_rotated.py", line 70, in forward clockwise=ctx.clockwise) RuntimeError: CUDA error: an illegal memory access was encountered terminate called after throwing an instance of 'c10::CUDAError' what(): CUDA error: an illegal memory access was encountered Exception raised from create_event_internal at /opt/conda/conda-bld/pytorch_1634272178570/work/c10/cuda/CUDACachingAllocator.cpp:1211 (most recent call first): frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x42 (0x7f20a94ffd62 in /opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/lib/libc10.so) frame #1: + 0x1c613 (0x7f2100dee613 in /opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/lib/libc10_cuda.so) frame #2: c10::cuda::CUDACachingAllocator::raw_delete(void) + 0x1a2 (0x7f2100def022 in /opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/lib/libc10_cuda.so) frame #3: c10::TensorImpl::release_resources() + 0xa4 (0x7f20a94e9314 in /opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/lib/libc10.so) frame #4: + 0x294dd9 (0x7f217ee66dd9 in /opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #5: + 0xae2f59 (0x7f217f6b4f59 in /opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #6: THPVariable_subclass_dealloc(_object) + 0x2b9 (0x7f217f6b5279 in /opt/conda/envs/mmrotate/lib/python3.7/site-packages/torch/lib/libtorch_python.so) frame #24: __libc_start_main + 0xe7 (0x7f21ba3cdbf7 in /lib/x86_64-linux-gnu/libc.so.6)

    Aborted (core dumped)

    opened by xiaoyihit 10
  • [Bug] ValueError: not enough values to unpack

    [Bug] ValueError: not enough values to unpack

    Prerequisite

    Task

    I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

    Branch

    master branch https://github.com/open-mmlab/mmrotate

    Environment

    (mmroate) ➜  mmrotate git:(qd) ✗ python mmrotate/utils/collect_env.py
    sys.platform: linux
    Python: 3.8.15 (default, Nov 24 2022, 15:19:38) [GCC 11.2.0]
    CUDA available: True
    numpy_random_seed: 2147483648
    GPU 0: Tesla V100-SXM2-32GB
    CUDA_HOME: /usr/local/cuda
    NVCC: Cuda compilation tools, release 11.4, V11.4.152
    GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
    PyTorch: 1.10.0+cu111
    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 v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
      - OpenMP 201511 (a.k.a. OpenMP 4.5)
      - LAPACK is enabled (usually provided by MKL)
      - NNPACK is enabled
      - CPU capability usage: AVX512
      - CUDA Runtime 11.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;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
      - CuDNN 8.0.5
      - Magma 2.5.2
      - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.0, USE_CUDA=ON, USE_CUDNN=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.11.0+cu111
    OpenCV: 4.6.0
    MMEngine: 0.4.0
    MMRotate: 1.0.0rc0+3db9cc0
    

    Reproduces the problem - code sample

    python tools/train.py configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota.py
    

    Reproduces the problem - command or script

    python tools/train.py configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota.py
    

    Reproduces the problem - error message

    (mmroate) ➜  mmrotate git:(qd) ✗ python tools/train.py configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota.py
    01/02 00:48:06 - mmengine - WARNING - The "log_processor" registry in mmrotate did not set import location. Fallback to call `mmrotate.utils.register_all_modules` instead.
    01/02 00:48:06 - mmengine - INFO - 
    ------------------------------------------------------------
    System environment:
        sys.platform: linux
        Python: 3.8.15 (default, Nov 24 2022, 15:19:38) [GCC 11.2.0]
        CUDA available: True
        numpy_random_seed: 1418043970
        GPU 0: Tesla V100-SXM2-32GB
        CUDA_HOME: /usr/local/cuda
        NVCC: Cuda compilation tools, release 11.4, V11.4.152
        GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
        PyTorch: 1.10.0+cu111
        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 v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
      - OpenMP 201511 (a.k.a. OpenMP 4.5)
      - LAPACK is enabled (usually provided by MKL)
      - NNPACK is enabled
      - CPU capability usage: AVX512
      - CUDA Runtime 11.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;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
      - CuDNN 8.0.5
      - Magma 2.5.2
      - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -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, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.0, USE_CUDA=ON, USE_CUDNN=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.11.0+cu111
        OpenCV: 4.6.0
        MMEngine: 0.4.0
    
    Runtime environment:
        cudnn_benchmark: False
        mp_cfg: {'mp_start_method': 'fork', 'opencv_num_threads': 0}
        dist_cfg: {'backend': 'nccl'}
        seed: None
        Distributed launcher: none
        Distributed training: False
        GPU number: 1
    ------------------------------------------------------------
    
    01/02 00:48:07 - mmengine - INFO - Config:
    default_scope = 'mmrotate'
    default_hooks = dict(
        timer=dict(type='IterTimerHook'),
        logger=dict(type='LoggerHook', interval=1),
        param_scheduler=dict(type='ParamSchedulerHook'),
        checkpoint=dict(type='CheckpointHook', interval=12, max_keep_ckpts=3),
        sampler_seed=dict(type='DistSamplerSeedHook'),
        visualization=dict(type='mmdet.DetVisualizationHook'))
    env_cfg = dict(
        cudnn_benchmark=False,
        mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
        dist_cfg=dict(backend='nccl'))
    vis_backends = [dict(type='LocalVisBackend')]
    visualizer = dict(
        type='RotLocalVisualizer',
        vis_backends=[dict(type='LocalVisBackend')],
        name='visualizer')
    log_processor = dict(type='LogProcessor', window_size=50, by_epoch=True)
    log_level = 'INFO'
    load_from = None
    resume = False
    custom_hooks = [
        dict(type='mmdet.NumClassCheckHook'),
        dict(
            type='EMAHook',
            ema_type='mmdet.ExpMomentumEMA',
            momentum=0.0002,
            update_buffers=True,
            priority=49)
    ]
    max_epochs = 36
    base_lr = 0.00025
    interval = 12
    train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=36, val_interval=12)
    val_cfg = dict(type='ValLoop')
    test_cfg = dict(type='TestLoop')
    param_scheduler = [
        dict(
            type='LinearLR', start_factor=1e-05, by_epoch=False, begin=0,
            end=1000),
        dict(
            type='CosineAnnealingLR',
            eta_min=1.25e-05,
            begin=18,
            end=36,
            T_max=18,
            by_epoch=True,
            convert_to_iter_based=True)
    ]
    optim_wrapper = dict(
        type='OptimWrapper',
        optimizer=dict(type='AdamW', lr=0.00025, weight_decay=0.05),
        paramwise_cfg=dict(
            norm_decay_mult=0, bias_decay_mult=0, bypass_duplicate=True))
    dataset_type = 'DOTADataset'
    data_root = 'data/icdar2019_tracka_modern_qbox/'
    file_client_args = dict(backend='disk')
    METAINFO = dict(classes=('table', ))
    train_pipeline = [
        dict(
            type='mmdet.LoadImageFromFile', file_client_args=dict(backend='disk')),
        dict(type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'),
        dict(type='ConvertBoxType', box_type_mapping=dict(gt_bboxes='rbox')),
        dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True),
        dict(
            type='mmdet.RandomFlip',
            prob=0.75,
            direction=['horizontal', 'vertical', 'diagonal']),
        dict(
            type='RandomRotate',
            prob=0.5,
            angle_range=180,
            rect_obj_labels=[9, 11]),
        dict(
            type='mmdet.Pad', size=(1024, 1024),
            pad_val=dict(img=(114, 114, 114))),
        dict(type='mmdet.PackDetInputs')
    ]
    val_pipeline = [
        dict(
            type='mmdet.LoadImageFromFile', file_client_args=dict(backend='disk')),
        dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True),
        dict(type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'),
        dict(type='ConvertBoxType', box_type_mapping=dict(gt_bboxes='rbox')),
        dict(
            type='mmdet.Pad', size=(1024, 1024),
            pad_val=dict(img=(114, 114, 114))),
        dict(
            type='mmdet.PackDetInputs',
            meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
                       'scale_factor'))
    ]
    test_pipeline = [
        dict(
            type='mmdet.LoadImageFromFile', file_client_args=dict(backend='disk')),
        dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True),
        dict(
            type='mmdet.Pad', size=(1024, 1024),
            pad_val=dict(img=(114, 114, 114))),
        dict(
            type='mmdet.PackDetInputs',
            meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
                       'scale_factor'))
    ]
    train_dataloader = dict(
        batch_size=4,
        num_workers=4,
        persistent_workers=True,
        sampler=dict(type='DefaultSampler', shuffle=True),
        batch_sampler=None,
        pin_memory=False,
        dataset=dict(
            type='DOTADataset',
            metainfo=dict(classes=('table', )),
            data_root='data/icdar2019_tracka_modern_qbox/',
            ann_file='train_rotate_qbox/',
            data_prefix=dict(img_path='train_rotate_img/'),
            img_shape=(1024, 1024),
            filter_cfg=dict(filter_empty_gt=True),
            pipeline=[
                dict(
                    type='mmdet.LoadImageFromFile',
                    file_client_args=dict(backend='disk')),
                dict(
                    type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'),
                dict(
                    type='ConvertBoxType',
                    box_type_mapping=dict(gt_bboxes='rbox')),
                dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True),
                dict(
                    type='mmdet.RandomFlip',
                    prob=0.75,
                    direction=['horizontal', 'vertical', 'diagonal']),
                dict(
                    type='RandomRotate',
                    prob=0.5,
                    angle_range=180,
                    rect_obj_labels=[9, 11]),
                dict(
                    type='mmdet.Pad',
                    size=(1024, 1024),
                    pad_val=dict(img=(114, 114, 114))),
                dict(type='mmdet.PackDetInputs')
            ]))
    val_dataloader = dict(
        batch_size=1,
        num_workers=2,
        persistent_workers=True,
        drop_last=False,
        sampler=dict(type='DefaultSampler', shuffle=False),
        dataset=dict(
            type='DOTADataset',
            data_root='data/icdar2019_tracka_modern_qbox/',
            metainfo=dict(classes=('table', )),
            ann_file='test_rotate_qbox/',
            data_prefix=dict(img_path='test_rotate_img/'),
            img_shape=(1024, 1024),
            test_mode=True,
            pipeline=[
                dict(
                    type='mmdet.LoadImageFromFile',
                    file_client_args=dict(backend='disk')),
                dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True),
                dict(
                    type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'),
                dict(
                    type='ConvertBoxType',
                    box_type_mapping=dict(gt_bboxes='rbox')),
                dict(
                    type='mmdet.Pad',
                    size=(1024, 1024),
                    pad_val=dict(img=(114, 114, 114))),
                dict(
                    type='mmdet.PackDetInputs',
                    meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
                               'scale_factor'))
            ]))
    test_dataloader = dict(
        batch_size=1,
        num_workers=2,
        persistent_workers=True,
        drop_last=False,
        sampler=dict(type='DefaultSampler', shuffle=False),
        dataset=dict(
            type='DOTADataset',
            data_root='data/icdar2019_tracka_modern_qbox/',
            metainfo=dict(classes=('table', )),
            ann_file='test_rotate_qbox/',
            data_prefix=dict(img_path='test_rotate_img/'),
            img_shape=(1024, 1024),
            test_mode=True,
            pipeline=[
                dict(
                    type='mmdet.LoadImageFromFile',
                    file_client_args=dict(backend='disk')),
                dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True),
                dict(
                    type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'),
                dict(
                    type='ConvertBoxType',
                    box_type_mapping=dict(gt_bboxes='rbox')),
                dict(
                    type='mmdet.Pad',
                    size=(1024, 1024),
                    pad_val=dict(img=(114, 114, 114))),
                dict(
                    type='mmdet.PackDetInputs',
                    meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
                               'scale_factor'))
            ]))
    val_evaluator = dict(type='DOTAMetric', metric='mAP')
    test_evaluator = dict(type='DOTAMetric', metric='mAP')
    checkpoint = 'https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-l_8xb256-rsb-a1-600e_in1k-6a760974.pth'
    angle_version = 'le90'
    model = dict(
        type='mmdet.RTMDet',
        data_preprocessor=dict(
            type='mmdet.DetDataPreprocessor',
            mean=[103.53, 116.28, 123.675],
            std=[57.375, 57.12, 58.395],
            bgr_to_rgb=False,
            boxtype2tensor=False,
            batch_augments=None),
        backbone=dict(
            type='mmdet.CSPNeXt',
            arch='P5',
            expand_ratio=0.5,
            deepen_factor=1,
            widen_factor=1,
            channel_attention=True,
            norm_cfg=dict(type='SyncBN'),
            act_cfg=dict(type='SiLU'),
            init_cfg=dict(
                type='Pretrained',
                prefix='backbone.',
                checkpoint=
                'https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-l_8xb256-rsb-a1-600e_in1k-6a760974.pth'
            )),
        neck=dict(
            type='mmdet.CSPNeXtPAFPN',
            in_channels=[256, 512, 1024],
            out_channels=256,
            num_csp_blocks=3,
            expand_ratio=0.5,
            norm_cfg=dict(type='SyncBN'),
            act_cfg=dict(type='SiLU')),
        bbox_head=dict(
            type='RotatedRTMDetSepBNHead',
            num_classes=1,
            in_channels=256,
            stacked_convs=2,
            feat_channels=256,
            angle_version='le90',
            anchor_generator=dict(
                type='mmdet.MlvlPointGenerator', offset=0, strides=[8, 16, 32]),
            bbox_coder=dict(type='DistanceAnglePointCoder', angle_version='le90'),
            loss_cls=dict(
                type='mmdet.QualityFocalLoss',
                use_sigmoid=True,
                beta=2.0,
                loss_weight=1.0),
            loss_bbox=dict(type='RotatedIoULoss', mode='linear', loss_weight=2.0),
            with_objectness=False,
            exp_on_reg=True,
            share_conv=True,
            pred_kernel_size=1,
            use_hbbox_loss=False,
            scale_angle=False,
            loss_angle=None,
            norm_cfg=dict(type='SyncBN'),
            act_cfg=dict(type='SiLU')),
        train_cfg=dict(
            assigner=dict(
                type='mmdet.DynamicSoftLabelAssigner',
                iou_calculator=dict(type='RBboxOverlaps2D'),
                topk=13),
            allowed_border=-1,
            pos_weight=-1,
            debug=False),
        test_cfg=dict(
            nms_pre=2000,
            min_bbox_size=0,
            score_thr=0.05,
            nms=dict(type='nms_rotated', iou_threshold=0.1),
            max_per_img=2000))
    launcher = 'none'
    work_dir = './work_dirs/rotated_rtmdet_l-3x-dota'
    
    
    01/02 00:48:14 - mmengine - WARNING - The "optimizer" registry in mmrotate did not set import location. Fallback to call `mmrotate.utils.register_all_modules` instead.
    01/02 00:48:14 - mmengine - WARNING - Failed to search registry with scope "mmrotate" in the "optim_wrapper" registry tree. As a workaround, the current "optim_wrapper" registry in "mmengine" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmrotate" is a correct scope, or whether the registry is initialized.
    01/02 00:48:14 - mmengine - WARNING - The "parameter scheduler" registry in mmrotate did not set import location. Fallback to call `mmrotate.utils.register_all_modules` instead.
    01/02 00:48:14 - mmengine - WARNING - The "metric" registry in mmrotate did not set import location. Fallback to call `mmrotate.utils.register_all_modules` instead.
    01/02 00:48:15 - mmengine - WARNING - The "weight initializer" registry in mmrotate did not set import location. Fallback to call `mmrotate.utils.register_all_modules` instead.
    01/02 00:48:15 - mmengine - INFO - load backbone. in model from: https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-l_8xb256-rsb-a1-600e_in1k-6a760974.pth
    Loads checkpoint by http backend from path: https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-l_8xb256-rsb-a1-600e_in1k-6a760974.pth
    01/02 00:48:15 - mmengine - INFO - Checkpoints will be saved to /home/ubuntu/mmroate-1.x/mmrotate/work_dirs/rotated_rtmdet_l-3x-dota.
    /home/ubuntu/mmroate-1.x/mmrotate/mmrotate/structures/bbox/rotated_boxes.py:192: UserWarning: The `clip` function does nothing in `RotatedBoxes`.
      warnings.warn('The `clip` function does nothing in `RotatedBoxes`.')
    /home/ubuntu/mmroate-1.x/mmrotate/mmrotate/structures/bbox/rotated_boxes.py:192: UserWarning: The `clip` function does nothing in `RotatedBoxes`.
      warnings.warn('The `clip` function does nothing in `RotatedBoxes`.')
    /home/ubuntu/mmroate-1.x/mmrotate/mmrotate/structures/bbox/rotated_boxes.py:192: UserWarning: The `clip` function does nothing in `RotatedBoxes`.
      warnings.warn('The `clip` function does nothing in `RotatedBoxes`.')
    /home/ubuntu/mmroate-1.x/mmrotate/mmrotate/structures/bbox/rotated_boxes.py:192: UserWarning: The `clip` function does nothing in `RotatedBoxes`.
      warnings.warn('The `clip` function does nothing in `RotatedBoxes`.')
    /home/ubuntu/miniconda3/envs/mmroate/lib/python3.8/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  ../aten/src/ATen/native/TensorShape.cpp:2157.)
      return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
    Traceback (most recent call last):
      File "tools/train.py", line 122, in <module>
        main()
      File "tools/train.py", line 118, in main
        runner.train()
      File "/home/ubuntu/mmroate-1.x/mmengine/mmengine/runner/runner.py", line 1678, in train
        model = self.train_loop.run()  # type: ignore
      File "/home/ubuntu/mmroate-1.x/mmengine/mmengine/runner/loops.py", line 90, in run
        self.run_epoch()
      File "/home/ubuntu/mmroate-1.x/mmengine/mmengine/runner/loops.py", line 106, in run_epoch
        self.run_iter(idx, data_batch)
      File "/home/ubuntu/mmroate-1.x/mmengine/mmengine/runner/loops.py", line 122, in run_iter
        outputs = self.runner.model.train_step(
      File "/home/ubuntu/mmroate-1.x/mmengine/mmengine/model/base_model/base_model.py", line 114, in train_step
        losses = self._run_forward(data, mode='loss')  # type: ignore
      File "/home/ubuntu/mmroate-1.x/mmengine/mmengine/model/base_model/base_model.py", line 314, in _run_forward
        results = self(**data, mode=mode)
      File "/home/ubuntu/miniconda3/envs/mmroate/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
        return forward_call(*input, **kwargs)
      File "/home/ubuntu/mmroate-1.x/mmdetection/mmdet/models/detectors/base.py", line 92, in forward
        return self.loss(inputs, data_samples)
      File "/home/ubuntu/mmroate-1.x/mmdetection/mmdet/models/detectors/single_stage.py", line 78, in loss
        losses = self.bbox_head.loss(x, batch_data_samples)
      File "/home/ubuntu/mmroate-1.x/mmdetection/mmdet/models/dense_heads/base_dense_head.py", line 123, in loss
        losses = self.loss_by_feat(*loss_inputs)
      File "/home/ubuntu/mmroate-1.x/mmrotate/mmrotate/models/dense_heads/rotated_rtmdet_head.py", line 299, in loss_by_feat
        cls_reg_targets = self.get_targets(
      File "/home/ubuntu/mmroate-1.x/mmdetection/mmdet/models/dense_heads/rtmdet_head.py", line 355, in get_targets
        (all_anchors, all_labels, all_label_weights, all_bbox_targets,
    ValueError: not enough values to unpack (expected 6, got 5)
    
    
    
    ### Additional information
    
    ```shell
    python tools/train.py configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota.py
    
    opened by vansin 0
  • Runnable

    Runnable

    Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

    Motivation

    Please describe the motivation of this PR and the goal you want to achieve through this PR.

    Modification

    Please briefly describe what modification is made in this PR.

    BC-breaking (Optional)

    Does the modification introduce changes that break the back-compatibility of the downstream repos? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

    Use cases (Optional)

    If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

    Checklist

    1. Pre-commit or other linting tools are used to fix the potential lint issues.
    2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
    3. The documentation has been modified accordingly, like docstring or example tutorials.
    opened by sljlp 1
  • Bump version to 1.0.0rc1

    Bump version to 1.0.0rc1

    v1.0.0rc1 (30/12/2022)

    Highlights

    • Support RTMDet rotated object detection models. The technical report of RTMDet is on arxiv (#662)
    • Support H2RBox. (#644)

    New Features

    • Support PSC (#617)
    • Add projects/ folder and give an example for communities to contribute their projects. (#627)
    • Support DIOR Dataset. (#639)

    Bug Fixes

    • Fix get_flops.py in 1.x. (#646)
    • Fix Windows CI. (#621)
    • Fix error in rbbox_overlaps. (#620)

    Improvements

    • Deprecating old type alias due to new version of numpy (#674)
    • Use iof in RRandomCrop. (#660)
    • Modify keys in dataset.metainfo to lower case. (#654)
    • Add torch 1.13 in CI. (#661)
    • Add dockerfile in 1.x. (#631)
    • Use mmengine in torchserve deployment. (#616)
    • Add .pre-commit-config-zh-cn.yaml. (#630)

    New Contributors

    Contributors

    A total of 11 developers contributed to this release.

    Thanks @yxzhao2022 @yuyi1005 @YanxingLiu @nijkah @RangeKing @austinmw @liuyanyi @yangxue0827 @zytx121 @RangiLyu @ZwwWayne

    opened by zytx121 1
  • 可视化正样本anchor

    可视化正样本anchor

    Branch

    master branch https://mmrotate.readthedocs.io/en/latest/

    📚 The doc issue

    我选择anchor[pos_inds]的结果进行可视化,得到的图像如下 myplot anchor都是水平形式存在,如果我想得到下面这种可视化的结果,应该怎么做呢 image

    还有另外我想再问一下,为什么可视化出来一个目标的anchor这么少,而下面那张图的anchor能显示出那么多 我使用的assigner是默认的MaxIoUAssigner

    十分感谢大佬百忙之中回复我的疑惑!

    Suggest a potential alternative/fix

    No response

    opened by shenhaibb 1
  • Some problems running on the hrsc dataset

    Some problems running on the hrsc dataset

    Prerequisite

    Task

    I have modified the scripts/configs, or I'm working on my own tasks/models/datasets.

    Branch

    master branch https://github.com/open-mmlab/mmrotate

    Environment

    TorchVision: 0.12.0+cu113 OpenCV: 4.6.0 MMCV: 1.6.0 MMCV Compiler: GCC 9.3 MMCV CUDA Compiler: 11.3 MMRotate: 0.3.2+c62f148

    Reproduces the problem - code sample

    When I use the S2ANET network to run the hrsc data set, I replace the detection head with KFIoUODMRefineHead, and the following error will appear. What is the reason? When I run the DOTA dataset with this configuration, no error is reported

    Traceback (most recent call last): File "tools/train.py", line 192, in main() File "tools/train.py", line 181, in main train_detector( File "/home/dell/Research/zly/mmrotate/mmrotate/apis/train.py", line 141, in train_detector runner.run(data_loaders, cfg.workflow) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run epoch_runner(data_loaders[i], **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 53, in train self.run_iter(data_batch, train_mode=True, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 31, in run_iter outputs = self.model.train_step(data_batch, self.optimizer, File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/parallel/data_parallel.py", line 77, in train_step return self.module.train_step(*inputs[0], **kwargs[0]) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 248, in train_step losses = self(**data) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 116, in new_func return old_func(*args, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 172, in forward return self.forward_train(img, img_metas, **kwargs) File "/home/dell/Research/zly/mmrotate/mmrotate/models/detectors/s2anet.py", line 97, in forward_train loss_refine = self.odm_head.loss( File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 205, in new_func return old_func(*args, **kwargs) File "/home/dell/Research/zly/mmrotate/mmrotate/models/dense_heads/kfiou_odm_refine_head.py", line 175, in loss return super(KFIoUODMRefineHead, self).loss( File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 205, in new_func return old_func(*args, **kwargs) File "/home/dell/Research/zly/mmrotate/mmrotate/models/dense_heads/rotated_anchor_head.py", line 502, in loss losses_cls, losses_bbox = multi_apply( File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/core/utils/misc.py", line 30, in multi_apply return tuple(map(list, zip(*map_results))) File "/home/dell/Research/zly/mmrotate/mmrotate/models/dense_heads/kfiou_rotate_retina_head.py", line 103, in loss_single loss_bbox = self.loss_bbox( File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) TypeError: forward() got an unexpected keyword argument 'pred_decode'

    Here is my config file

    base = [ '../base/datasets/hrsc.py', '../base/schedules/schedule_3x.py', '../base/default_runtime.py' ]

    angle_version = 'le135' model = dict( type='S2ANet', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, zero_init_residual=False, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=True, style='pytorch', init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')), neck=dict( type='FPN', in_channels=[256, 512, 1024, 2048], out_channels=256, start_level=1, add_extra_convs='on_input', num_outs=5), fam_head=dict( type='RotatedRetinaHead', # type='KFIoURRetinaRefineHead', num_classes=1, in_channels=256, stacked_convs=2, feat_channels=256, assign_by_circumhbbox=None, anchor_generator=dict( type='RotatedAnchorGenerator', scales=[4], ratios=[1.0], strides=[8, 16, 32, 64, 128]), bbox_coder=dict( type='DeltaXYWHAOBBoxCoder', angle_range=angle_version, norm_factor=1, edge_swap=False, proj_xy=True, target_means=(.0, .0, .0, .0, .0), target_stds=(1.0, 1.0, 1.0, 1.0, 1.0)), loss_cls=dict( type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), loss_bbox=dict(type='MSELoss', loss_weight=1.0)), align_cfgs=dict( type='AlignConv', kernel_size=3, channels=256, featmap_strides=[8, 16, 32, 64, 128]), odm_head=dict( # type='ODMRefineHead', type='KFIoUODMRefineHead', num_classes=1, in_channels=256, stacked_convs=2, feat_channels=256, assign_by_circumhbbox=None, anchor_generator=dict( type='PseudoAnchorGenerator', strides=[8, 16, 32, 64, 128]), bbox_coder=dict( type='DeltaXYWHAOBBoxCoder', angle_range=angle_version, norm_factor=1, edge_swap=False, proj_xy=True, target_means=(0.0, 0.0, 0.0, 0.0, 0.0), target_stds=(1.0, 1.0, 1.0, 1.0, 1.0)), loss_cls=dict( type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), loss_bbox=dict(type='MSELoss', loss_weight=1.0)), train_cfg=dict( fam_cfg=dict( assigner=dict( type='MaxIoUAssigner', pos_iou_thr=0.5, neg_iou_thr=0.4, min_pos_iou=0, ignore_iof_thr=-1, iou_calculator=dict(type='RBboxOverlaps2D')), allowed_border=-1, pos_weight=-1, debug=False), odm_cfg=dict( assigner=dict( type='MaxIoUAssigner', pos_iou_thr=0.5, neg_iou_thr=0.4, min_pos_iou=0, ignore_iof_thr=-1, iou_calculator=dict(type='RBboxOverlaps2D')), allowed_border=-1, pos_weight=-1, debug=False)), test_cfg=dict( nms_pre=2000, min_bbox_size=0, score_thr=0.05, nms=dict(iou_thr=0.1), max_per_img=2000))

    img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='RResize', img_scale=(800, 512)), dict( type='RRandomFlip', flip_ratio=[0.25, 0.25,0.25], direction=['horizontal', 'vertical', 'diagonal'], # flip_ratio=0.5, # direction='horizontal', version=angle_version), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']) ] data = dict( train=dict(pipeline=train_pipeline, version=angle_version), val=dict(version=angle_version), test=dict(version=angle_version))

    Reproduces the problem - command or script

    CUDA_VISIBLE_DEVICES=2,3 ./tools/dist_train.sh /home/dell/Research/zly/mmrotate/configs/s2anet/s2anet_r50_fpn_3x_hrsc_le135.py 2

    Reproduces the problem - error message

    Traceback (most recent call last): File "tools/train.py", line 192, in main() File "tools/train.py", line 181, in main train_detector( File "/home/dell/Research/zly/mmrotate/mmrotate/apis/train.py", line 141, in train_detector runner.run(data_loaders, cfg.workflow) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run epoch_runner(data_loaders[i], **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 53, in train self.run_iter(data_batch, train_mode=True, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 31, in run_iter outputs = self.model.train_step(data_batch, self.optimizer, File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/parallel/data_parallel.py", line 77, in train_step return self.module.train_step(*inputs[0], **kwargs[0]) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 248, in train_step losses = self(**data) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 116, in new_func return old_func(*args, **kwargs) File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 172, in forward return self.forward_train(img, img_metas, **kwargs) File "/home/dell/Research/zly/mmrotate/mmrotate/models/detectors/s2anet.py", line 97, in forward_train loss_refine = self.odm_head.loss( File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 205, in new_func return old_func(*args, **kwargs) File "/home/dell/Research/zly/mmrotate/mmrotate/models/dense_heads/kfiou_odm_refine_head.py", line 175, in loss return super(KFIoUODMRefineHead, self).loss( File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 205, in new_func return old_func(*args, **kwargs) File "/home/dell/Research/zly/mmrotate/mmrotate/models/dense_heads/rotated_anchor_head.py", line 502, in loss losses_cls, losses_bbox = multi_apply( File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/mmdet/core/utils/misc.py", line 30, in multi_apply return tuple(map(list, zip(*map_results))) File "/home/dell/Research/zly/mmrotate/mmrotate/models/dense_heads/kfiou_rotate_retina_head.py", line 103, in loss_single loss_bbox = self.loss_bbox( File "/home/dell/anaconda3/envs/zly/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) TypeError: forward() got an unexpected keyword argument 'pred_decode'

    Additional information

    No response

    opened by milamiqi 0
  • Use MMEval DOTAMAP

    Use MMEval DOTAMAP

    Motivation

    Use MMEval's DOTAMeanAP.

    Modification

    Use MMEval's DOTAMeanAP for DOTAMetric. MMEval's pull request for DOTAMeanAP:https://github.com/open-mmlab/mmeval/pull/65 Before: image

    After (this PR): image

    opened by YanxingLiu 1
Releases(v1.0.0rc0)
  • v1.0.0rc0(Nov 7, 2022)

    We are excited to announce the release of MMRotate 1.0.0rc0. MMRotate 1.0.0rc0 is the first version of MMRotate 1.x, a part of the OpenMMLab 2.0 projects. Built upon the new training engine, MMRotate 1.x unifies the interfaces of dataset, models, evaluation, and visualization with faster training and testing speed.

    Highlights

    1. New engines. MMRotate 1.x is based on MMEngine, which provides a general and powerful runner that allows more flexible customizations and significantly simplifies the entrypoints of high-level interfaces.

    2. Unified interfaces. As a part of the OpenMMLab 2.0 projects, MMRotate 1.x unifies and refactors the interfaces and internal logics of train, testing, datasets, models, evaluation, and visualization. All the OpenMMLab 2.0 projects share the same design in those interfaces and logics to allow the emergence of multi-task/modality algorithms.

    3. New BoxType design. We support data structures RotatedBoxes and QuadriBoxes to encapsulate different kinds of bounding boxes. We are migrating to use data structures of boxes to replace the use of pure tensor boxes. This will unify the usages of different kinds of bounding boxes in MMDetection 3.x and MMRotate 1.x to simplify the implementation and reduce redundant codes.

    4. Stronger visualization. We provide a series of useful tools which are mostly based on brand-new visualizers. As a result, it is more convenient for the users to explore the models and datasets now.

    Breaking Changes

    We briefly list the major breaking changes here. We will update the migration guide to provide complete details and migration instructions.

    Dependencies

    • MMRotate 1.x relies on MMEngine to run. MMEngine is a new foundational library for training deep learning models in OpenMMLab 2.0 models. The dependencies of file IO and training are migrated from MMCV 1.x to MMEngine.
    • MMRotate 1.x relies on MMCV>=2.0.0rc2. Although MMCV no longer maintains the training functionalities since 2.0.0rc0, MMRotate 1.x relies on the data transforms, CUDA operators, and image processing interfaces in MMCV. Note that the package mmcv is the version that provide pre-built CUDA operators and mmcv-lite does not since MMCV 2.0.0rc0, while mmcv-full has been deprecated.
    • MMRotate 1.x relies on MMDetection>=3.0.0rc2.

    Training and testing

    • MMRotate 1.x uses Runner in MMEngine rather than that in MMCV. The new Runner implements and unifies the building logic of dataset, model, evaluation, and visualizer. Therefore, MMRotate 1.x no longer maintains the building logics of those modules in mmrotate.train.apis and tools/train.py. Those code have been migrated into MMEngine. Please refer to the migration guide of Runner in MMEngine for more details.
    • The Runner in MMEngine also supports testing and validation. The testing scripts are also simplified, which has similar logic as that in training scripts to build the runner.
    • The execution points of hooks in the new Runner have been enriched to allow more flexible customization. Please refer to the migration guide of Hook in MMEngine for more details.
    • Learning rate and momentum scheduling has been migrated from Hook to Parameter Scheduler in MMEngine. Please refer to the migration guide of Parameter Scheduler in MMEngine for more details.

    Configs

    • The Runner in MMEngine uses a different config structures to ease the understanding of the components in runner. Users can refer to the migration guide in MMEngine for migration details.
    • The file names of configs and models are also refactored to follow the new rules unified across OpenMMLab 2.0 projects.

    Dataset

    The Dataset classes implemented in MMRotate 1.x all inherits from the BaseDataset in MMEngine.

    • All the datasets support to serialize the data list to reduce the memory when multiple workers are built to accelerate data loading.

    Data Transforms

    The data transforms in MMRotate 1.x all inherits from those in MMCV>=2.0.0rc2, which follows a new convention in OpenMMLab 2.0 projects. The changes are listed as below:

    • The interfaces are also changed. Please refer to the API Reference
    • The functionality of some data transforms (e.g., Rotate) are decomposed into several transforms.

    Model

    The models in MMRotate 1.x all inherits from BaseModel in MMEngine, which defines a new convention of models in OpenMMLab 2.0 projects. Users can refer to the tutorial of model in MMengine for more details. Accordingly, there are several changes as the following:

    • The model interfaces, including the input and output formats, are significantly simplified and unified following the new convention in MMRotate 1.x. Specifically, all the input data in training and testing are packed into inputs and data_samples, where inputs contains model inputs like a list of image tensors, and data_samples contains other information of the current data sample such as ground truths and model predictions. In this way, different tasks in MMRotate 1.x can share the same input arguments, which makes the models more general and suitable for multi-task learning.
    • The model has a data preprocessor module, which is used to pre-process the input data of model. In MMRotate 1.x, the data preprocessor usually does necessary steps to form the input images into a batch, such as padding. It can also serve as a place for some special data augmentations or more efficient data transformations like normalization.
    • The internal logic of model have been changed. In MMRotate 0.x, model used forward_train and simple_test to deal with different model forward logics. In MMRotate 1.x and OpenMMLab 2.0, the forward function has three modes: loss, predict, and tensor for training, inference, and tracing or other purposes, respectively. The forward function calls self.loss(), self.predict(), and self._forward() given the modes loss, predict, and tensor, respectively.

    Evaluation

    MMRotate 1.x mainly implements corresponding metrics for each task, which are manipulated by Evaluator to complete the evaluation. In addition, users can build evaluator in MMRotate 1.x to conduct offline evaluation, i.e., evaluate predictions that may not produced by MMRotate, prediction follows our dataset conventions. More details can be find in the Evaluation Tutorial in MMEngine.

    Visualization

    The functions of visualization in MMRotate 1.x are removed. Instead, in OpenMMLab 2.0 projects, we use Visualizer to visualize data. MMRotate 1.x implements RotLocalVisualizer to allow visualization of ground truths, model predictions, and feature maps, etc., at any place. It also supports to dump the visualization data to any external visualization backends such as Tensorboard and Wandb.

    Improvements

    • Support quadrilateral box detection (#520)
    • Support RotatedCocoMetric (#557)
    • Support COCO style annotations (#582)
    • Support two new SAR datasets: RSDD and SRSDD (#591)

    Ongoing changes

    1. Test-time augmentation: is not implemented yet in this version due to limited time slot. We will support it in the following releases with a new and simplified design.
    2. Inference interfaces: a unified inference interfaces will be supported in the future to ease the use of released models.
    3. Interfaces of useful tools that can be used in notebook: more useful tools that implemented in the tools/ directory will have their python interfaces so that they can be used through notebook and in downstream libraries.
    4. Documentation: we will add more design docs, tutorials, and migration guidance so that the community can deep dive into our new design, participate the future development, and smoothly migrate downstream libraries to MMRotate 1.x.

    Contributors

    A total of 8 developers contributed to this release. Thanks @DonggeunYu @k-papadakis @liuyanyi @yangxue0827 @jbwang1997 @zytx121 @RangiLyu @ZwwWayne

    New Contributors

    • @DonggeunYu made their first contribution in #571
    • @k-papadakis made their first contribution in #531

    Full Changelog: https://github.com/open-mmlab/mmrotate/compare/v0.3.3...v1.0.0rc0

    Source code(tar.gz)
    Source code(zip)
  • v0.3.3(Oct 27, 2022)

    Bug Fixes

    • Fix reppoint bug fix when negative image training (#396)
    • Fix bug in oriented_reppoints_head.py (#424)
    • Fix mmcv-full version (#423)

    Improvements

    • Update issue templates to main branch (#579)
    • Fix lint of dev branch (#578)

    Documentations

    • Update citation (#425)
    • Fix markdown version when building docs (#414)

    Contributors

    A total of 5 developers contributed to this release. Thanks @yangxue0827, @ZwwWayne, @MinkiSong, @zytx121, @RangiLyu

    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Jul 6, 2022)

    Changelog

    v0.3.2 (6/7/2022)

    Highlight

    • Support Oriented Reppoints (CVPR'22) (#286)
    • Support ConvNeXt backbone (CVPR'22) (#343)

    New Features

    • Support RMosaic. (#344)

    Bug Fixes

    • Fix max_coordinate in multiclass_nms_rotated. (#346)
    • Fix bug in PolyRandomRotate. (#366)
    • Fix memory shortage when using huge_image_demo.py (#368)

    Improvements

    • Update README.md and INSTALL.md. (#342)
    • Fix typo in rotated_fcos_head. (#354)
    • Update checkpoint and eval interval of base config. (#347)
    • Fix mdformat version to support python3.6 & Add mim to extras_require in setup.py (#359)
    • Add mim test in CI (#374)

    Contributors

    A total of 9 developers contributed to this release. Thanks @LiWentomng @heiyuxiaokai @JinYuannn @sltlls @liuyanyi @yangxue0827 @jbwang1997 @zytx121 @ZwwWayne

    New Contributors

    • @LiWentomng made their first contribution in https://github.com/open-mmlab/mmrotate/pull/286
    • @JinYuannn made their first contribution in https://github.com/open-mmlab/mmrotate/pull/354
    • @sltlls made their first contribution in https://github.com/open-mmlab/mmrotate/pull/368

    Full Changelog: https://github.com/open-mmlab/mmrotate/compare/v0.3.1...v0.3.2

    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Jun 6, 2022)

    Highlight

    New Features

    • Update PolyRandomRotate to support discrete angle value. (#281)
    • Support RRandomCrop. (#322)
    • Support mask in merge_results and huge_image_demo.py. (#280)
    • Support don't filter images without ground truths. (#323)
    • Add MultiImageMixDataset in build_dataset. (#331)

    Bug Fixes

    • Fix error in Windows CI. (#324)
    • Fix data path error in config files. (#328)
    • Fix bug when visualize the HRSC2016 detect results. (#329)

    Improvements

    • Add torchserve doc in zh_cn. (#287)
    • Fix doc typo in README. (#284)
    • Configure Myst-parser to parse anchor tag (#305 #308)
    • Replace markdownlint with mdformat for avoiding installing ruby. (#306)
    • Fix typo about split gap of multi scale. (#272)

    Contributors

    A total of 7 developers contributed to this release. Thanks @liuyanyi @nijkah @remi-or @yangxue0827 @jbwang1997 @zytx121 @ZwwWayne

    New Contributors

    • @remi-or made their first contribution in https://github.com/open-mmlab/mmrotate/pull/281

    Full Changelog: https://github.com/open-mmlab/mmrotate/compare/v0.3.0...v0.3.1

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Apr 30, 2022)

    Highlight

    • Support TorchServe (#160)
    • Support Rotated ATSS (CVPR'20) (#179)

    New Features

    • Update performance of ReDet on HRSC2016. (#203)

    • Upgrage visualization to custom colors of different classes. This requires mmdet>=2.22.0. (#187, #267, #270)

    • Update Stable KLD, which solve the Nan issue of KLD training. (#183)

    • Support setting dataloader arguments in config and add functions to handle config compatibility. (#215) The comparison between the old and new usages is as below.

      Before v0.2.0 Since v0.3.0
      data = dict(
          samples_per_gpu=2, workers_per_gpu=2,
          train=dict(type='xxx', ...),
          val=dict(type='xxx', samples_per_gpu=4, ...),
          test=dict(type='xxx', ...),
      )
      
      # A recommended config that is clear
      data = dict(
          train=dict(type='xxx', ...),
          val=dict(type='xxx', ...),
          test=dict(type='xxx', ...),
          # Use different batch size during inference.
          train_dataloader=dict(samples_per_gpu=2, workers_per_gpu=2),
          val_dataloader=dict(samples_per_gpu=4, workers_per_gpu=4),
          test_dataloader=dict(samples_per_gpu=4, workers_per_gpu=4),
      )
      
      # Old style still works but allows to set more arguments about data loaders
      data = dict(
          samples_per_gpu=2,  # only works for train_dataloader
          workers_per_gpu=2,  # only works for train_dataloader
          train=dict(type='xxx', ...),
          val=dict(type='xxx', ...),
          test=dict(type='xxx', ...),
          # Use different batch size during inference.
          val_dataloader=dict(samples_per_gpu=4, workers_per_gpu=4),
          test_dataloader=dict(samples_per_gpu=4, workers_per_gpu=4),
      )
      
    • Add get_flops tool (#176)

    Bug Fixes

    • Fix bug about rotated anchor inside flags. (#197)
    • Fix Nan issue of GWD. (#206)
    • Fix bug in eval_rbbox_map when labels_ignore is None. (#209)
    • Fix bug of 'RoIAlignRotated' object has no attribute 'output_size' (#213)
    • Fix bug in unit test for datasets. (#222)
    • Fix bug in rotated_reppoints_head. (#246)
    • Fix GPG key error in CI and docker. (#269)

    Improvements

    • Update citation of mmrotate in README.md (#263)
    • Update the introduction of SASM (AAAI'22) (#184)
    • Fix doc typo in Config File and Model Zoo. (#199)
    • Unified RBox definition in doc. (#234)

    Contributors

    A total of 8 developers contributed to this release. Thanks @nijkah @GamblerZSY @liuyanyi @yangxue0827 @grimoire @jbwang1997 @zytx121 @ZwwWayne

    New Contributors

    • @nijkah made their first contribution in https://github.com/open-mmlab/mmrotate/pull/209
    • @GamblerZSY made their first contribution in https://github.com/open-mmlab/mmrotate/pull/197
    • @grimoire made their first contribution in https://github.com/open-mmlab/mmrotate/pull/264

    Full Changelog: https://github.com/open-mmlab/mmrotate/compare/v0.2.0...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Apr 1, 2022)

    New Features

    • Support Circular Smooth Label (CSL, ECCV'20) (#153)
    • Support multiple machines dist_train (#143)
    • Add browse_dataset tool (#98)
    • Add gather_models script (#162)

    Bug Fixes

    • Remove in-place operations in rbbox_overlaps (#155)
    • Fix bug in docstring. (#137)
    • Fix bug in HRSCDataset with clasesswise=ture (#175)

    Improvements

    • Add Chinese translation of docs/zh_cn/tutorials/customize_dataset.md (#65)
    • Add different seeds to different ranks (#102)
    • Update from-scratch install script in install.md (#166)
    • Improve the arguments of all mmrotate scripts (#168)

    Contributors

    A total of 6 developers contributed to this release. Thanks @zytx121 @yangxue0827 @ZwwWayne @jbwang1997 @canoe-Z @matrixgame2018

    New Contributors

    • @canoe-Z made their first contribution in https://github.com/open-mmlab/mmrotate/pull/98
    • @matrixgame2018 made their first contribution in https://github.com/open-mmlab/mmrotate/pull/65

    Full Changelog: https://github.com/open-mmlab/mmrotate/compare/v0.1.1...v0.2.0

    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Mar 14, 2022)

    New Features

    • Support huge image inference (#34)
    • Support HRSC Dataset (#96)
    • Support mixed precision training (#72)
    • Add colab tutorial for beginners (#66)
    • Add inference speed statistics tool (#86)
    • Add confusion matrix analysis tool (#93)

    Bug Fixes

    • Fix URL error of Swin pretrained model (#111)
    • Fix bug for SASM during training (#105)
    • Fix rbbox_overlaps abnormal when the box is too small (#61)
    • Fix bug for visualization (#12, #81)
    • Fix stuck when compute mAP (#14, #52)
    • Fix 'RoIAlignRotated' object has no attribute 'out_size' bug (#51)
    • Add missing init_cfg in dense head (#37)
    • Fix install an additional mmcv (#17)
    • Fix typos in docs (#3, #11, #36)

    Improvements

    • Move eval_rbbox_map from mmrotate.datasets to mmrotate.core.evaluation (#73)
    • Add Windows CI (#31)
    • Add copyright commit hook (#30)
    • Add Chinese translation of docs/zh_cn/get_started.md (#16)
    • Add Chinese translation of docs/zh_cn/tutorials/customize_runtime.md (#22)
    • Add Chinese translation of docs/zh_cn/tutorials/customize_config.md (#23)
    • Add Chinese translation of docs/zh_cn/tutorials/customize_models.md (#27)
    • Add Chinese translation of docs/zh_cn/model_zoo.md (#28)
    • Add Chinese translation of docs/zh_cn/faq.md (#33)

    Contributors

    A total of 13 developers contributed to this release. Thanks @zytx121 @yangxue0827 @jbwang1997 @liuyanyi @DangChuong-DC @RangeKing @liufeinuaa @np-csu @akmalulkhairin @SheffieldCao @BrotherHappy @Abyssaledge @q3394101

    New Contributors

    • @jbwang1997 made their first contribution in https://github.com/open-mmlab/mmrotate/pull/12
    • @liufeinuaa made their first contribution in https://github.com/open-mmlab/mmrotate/pull/17
    • @triple-Mu made their first contribution in https://github.com/open-mmlab/mmrotate/pull/16
    • @np-csu made their first contribution in https://github.com/open-mmlab/mmrotate/pull/20
    • @SheffieldCao made their first contribution in https://github.com/open-mmlab/mmrotate/pull/22
    • @Abyssaledge made their first contribution in https://github.com/open-mmlab/mmrotate/pull/27
    • @BrotherHappy made their first contribution in https://github.com/open-mmlab/mmrotate/pull/33
    • @liuyanyi made their first contribution in https://github.com/open-mmlab/mmrotate/pull/37
    • @yangxue0827 made their first contribution in https://github.com/open-mmlab/mmrotate/pull/36
    • @RangeKing made their first contribution in https://github.com/open-mmlab/mmrotate/pull/23
    • @DangChuong-DC made their first contribution in https://github.com/open-mmlab/mmrotate/pull/52
    • @akmalulkhairin made their first contribution in https://github.com/open-mmlab/mmrotate/pull/93
    • @lalalagogogochong made their first contribution in https://github.com/open-mmlab/mmrotate/pull/105
    • @heiyuxiaokai made their first contribution in https://github.com/open-mmlab/mmrotate/pull/86
    • @ZwwWayne made their first contribution in https://github.com/open-mmlab/mmrotate/pull/135

    Full Changelog: https://github.com/open-mmlab/mmrotate/compare/v0.1.0...v0.1.1

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Feb 18, 2022)

    Initial Release of MMRotate, support the following algorithms

    Source code(tar.gz)
    Source code(zip)
Python parser for DTED data.

DTED Parser This is a package written in pure python (with help from numpy) to parse and investigate Digital Terrain Elevation Data (DTED) files. This

Ben Bonenfant 12 Dec 18, 2022
A general-purpose, flexible, and easy-to-use simulator alongside an OpenAI Gym trading environment for MetaTrader 5 trading platform (Approved by OpenAI Gym)

gym-mtsim: OpenAI Gym - MetaTrader 5 Simulator MtSim is a simulator for the MetaTrader 5 trading platform alongside an OpenAI Gym environment for rein

Mohammad Amin Haghpanah 184 Dec 31, 2022
Self-Supervised Generative Style Transfer for One-Shot Medical Image Segmentation

Self-Supervised Generative Style Transfer for One-Shot Medical Image Segmentation This repository contains the Pytorch implementation of the proposed

Devavrat Tomar 19 Nov 10, 2022
Self-training for Few-shot Transfer Across Extreme Task Differences

Self-training for Few-shot Transfer Across Extreme Task Differences (STARTUP) Introduction This repo contains the official implementation of the follo

Cheng Perng Phoo 33 Oct 31, 2022
:boar: :bear: Deep Learning based Python Library for Stock Market Prediction and Modelling

bulbea "Deep Learning based Python Library for Stock Market Prediction and Modelling." Table of Contents Installation Usage Documentation Dependencies

Achilles Rasquinha 1.8k Jan 05, 2023
Lucid library adapted for PyTorch

Lucent PyTorch + Lucid = Lucent The wonderful Lucid library adapted for the wonderful PyTorch! Lucent is not affiliated with Lucid or OpenAI's Clarity

Lim Swee Kiat 520 Dec 26, 2022
The official implementation of the research paper "DAG Amendment for Inverse Control of Parametric Shapes"

DAG Amendment for Inverse Control of Parametric Shapes This repository is the official Blender implementation of the paper "DAG Amendment for Inverse

Elie Michel 157 Dec 26, 2022
[ECCV 2020] Gradient-Induced Co-Saliency Detection

Gradient-Induced Co-Saliency Detection Zhao Zhang*, Wenda Jin*, Jun Xu, Ming-Ming Cheng ⭐ Project Home » The official repo of the ECCV 2020 paper Grad

Zhao Zhang 35 Nov 25, 2022
Official code for "Simpler is Better: Few-shot Semantic Segmentation with Classifier Weight Transformer. ICCV2021".

Simpler is Better: Few-shot Semantic Segmentation with Classifier Weight Transformer. ICCV2021. Introduction We proposed a novel model training paradi

Lucas 103 Dec 14, 2022
🤗 Paper Style Guide

🤗 Paper Style Guide (Work in progress, send a PR!) Libraries to Know booktabs natbib cleveref Either seaborn, plotly or altair for graphs algorithmic

Hugging Face 66 Dec 12, 2022
Pairwise model for commonlit competition

Pairwise model for commonlit competition To run: - install requirements - create input directory with train_folds.csv and other competition data - cd

abhishek thakur 45 Aug 31, 2022
Python Auto-ML Package for Tabular Datasets

Tabular-AutoML AutoML Package for tabular datasets Tabular dataset tuning is now hassle free! Run one liner command and get best tuning and processed

Sagnik Roy 18 Nov 20, 2022
MazeRL is an application oriented Deep Reinforcement Learning (RL) framework

MazeRL is an application oriented Deep Reinforcement Learning (RL) framework, addressing real-world decision problems. Our vision is to cover the complete development life cycle of RL applications ra

EnliteAI GmbH 222 Dec 24, 2022
Code for the tech report Toward Training at ImageNet Scale with Differential Privacy

Differentially private Imagenet training Code for the tech report Toward Training at ImageNet Scale with Differential Privacy by Alexey Kurakin, Steve

Google Research 29 Nov 03, 2022
This repository gives an example on how to preprocess the data of the HECKTOR challenge

HECKTOR 2021 challenge This repository gives an example on how to preprocess the data of the HECKTOR challenge. Any other preprocessing is welcomed an

56 Dec 01, 2022
Neural style transfer as a class in PyTorch

pt-styletransfer Neural style transfer as a class in PyTorch Based on: https://github.com/alexis-jacq/Pytorch-Tutorials Adds: StyleTransferNet as a cl

Tyler Kvochick 31 Jun 27, 2022
Build a small, 3 domain internet using Github pages and Wikipedia and construct a crawler to crawl, render, and index.

TechSEO Crawler Build a small, 3 domain internet using Github pages and Wikipedia and construct a crawler to crawl, render, and index. Play with the r

JR Oakes 57 Nov 24, 2022
Pip-package for trajectory benchmarking from "Be your own Benchmark: No-Reference Trajectory Metric on Registered Point Clouds", ECMR'21

Map Metrics for Trajectory Quality Map metrics toolkit provides a set of metrics to quantitatively evaluate trajectory quality via estimating consiste

Mobile Robotics Lab. at Skoltech 31 Oct 28, 2022
Rasterize with the least efforts for researchers.

utils3d Rasterize and do image-based 3D transforms with the least efforts for researchers. Based on numpy and OpenGL. It could be helpful when you wan

Ruicheng Wang 8 Dec 15, 2022
AdamW optimizer for bfloat16 models in pytorch.

Image source AdamW optimizer for bfloat16 models in pytorch. Bfloat16 is currently an optimal tradeoff between range and relative error for deep netwo

Alex Rogozhnikov 8 Nov 20, 2022