Coder Social home page Coder Social logo

sjtu-thinklab-det / r3det-on-mmdetection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-mmlab/mmdetection

178.0 178.0 42.0 12.76 MB

R3Det: Refined Single-Stage Detector with Feature Refinement for Rotating Object

License: Apache License 2.0

Shell 0.11% Python 86.00% C++ 6.07% Cuda 7.79% Dockerfile 0.04%

r3det-on-mmdetection's People

Contributors

borda avatar chrisfsj2051 avatar daavoo avatar erotemic avatar eugenelawrence avatar fanqie03 avatar gt9505 avatar hellock avatar innerlee avatar johnson-wang avatar korabelnikov avatar lindahua avatar liushuchun avatar melikovk avatar michaelisc avatar mxbonn avatar myownskyw7 avatar oceanpang avatar rydenisbak avatar sovrasov avatar ternaus avatar thangvubk avatar tianyuandu avatar tyomj avatar wswday avatar xvjiarui avatar yhcao6 avatar youkaichao avatar zhihuagao avatar zwwwayne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

r3det-on-mmdetection's Issues

Saving checkpoint at 1 epochs!

When I run sh rtools/train.sh, the code stop here not run.

, sr0.loss_cls: 0.3226, sr0.loss_bbox: 0.4130, sr1.loss_cls: 0.4546, sr1.loss_bbox: 0.3601, loss: 2.5557, grad_norm: 11.3823
2020-09-22 21:20:43,374 - mmdet - INFO - Epoch [1][4400/4502] lr: 3.567e-03, eta: 1 day, 1:22:21, time: 0.874, data_time: 0.006, memory: 6929, s0.loss_cls: 0.4921, s0.loss_bbox: 0.5438, sr0.loss_cls: 0.3270, sr0.loss_bbox: 0.4025, sr1.loss_cls: 0.3991, sr1.loss_bbox: 0.3454, loss: 2.5098, grad_norm: 10.8762
2020-09-22 21:21:27,289 - mmdet - INFO - Epoch [1][4450/4502] lr: 3.603e-03, eta: 1 day, 1:21:34, time: 0.878, data_time: 0.006, memory: 6929, s0.loss_cls: 0.5008, s0.loss_bbox: 0.5919, sr0.loss_cls: 0.3339, sr0.loss_bbox: 0.4640, sr1.loss_cls: 0.4932, sr1.loss_bbox: 0.4270, loss: 2.8106, grad_norm: 10.2408
2020-09-22 21:22:11,102 - mmdet - INFO - Epoch [1][4500/4502] lr: 3.639e-03, eta: 1 day, 1:20:44, time: 0.876, data_time: 0.006, memory: 6929, s0.loss_cls: 0.4992, s0.loss_bbox: 0.5868, sr0.loss_cls: 0.3604, sr0.loss_bbox: 0.4742, sr1.loss_cls: 0.5154, sr1.loss_bbox: 0.4449, loss: 2.8810, grad_norm: 10.0068
2020-09-22 21:22:12,855 - mmdet - INFO - Saving checkpoint at 1 epochs
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 458/458, 0.5 task/s, elapsed: 962s, ETA: 0s

请问,关于重构特征图那部分的问题

关于重构特征图的那部分问题,有些不明白的地方。您使用了双线性插值的方法,将特征图进行对齐,具体是如何操作的呢?
特征图都是网格化离散化的坐标,如何产生坐标为(0.5, 0.5)的神经元呢?
感谢您的回答。

rtools/dota_image_split.py bugs!

r3det-on-mmdetection/rtools/dota_image_split.py
Lines 64 to 69 in 5073df9

    def _split_single(self, image_id):
        hdr, objs = self._parse_annotation_single(image_id)
        image_dir = osp.join(self.in_images_dir, image_id + '.png')
        img = cv2.imread(image_dir)
        h, w, _ = img.shape
        w_ovr, h_ovr = self.tile_overlap
        w_s, h_s = self.tile_shape
        for h_off in range(0, max(1, h - h_ovr), h_s - h_ovr):
            if h_off > 0:
                h_off = min(h - h_s, h_off)  # h_off + hs <= h if h_off > 0
            for w_off in range(0, max(1, w - w_ovr), w_s - w_ovr):
                if w_off > 0:
                    w_off = min(w - w_s, w_off)  # w_off + ws <= w if w_off > 0

bug 描述:
当使用此脚本进行crop操作时,图像的最右侧和最下面会存在截取不到的现象,从而会引起训练样本中部分标注目标的丢失,影响训练。
如果bug得到确认和认可的话,我将提交一个修复的请求来修复此问题

How to get VIS1.JPG, VIS2.jpg, VIS3.jpg in the project?

I ran the test.sh script in the project, and ultimately in work_ Got prede in dir_ The coordinate information and category information of the box, but the readme file does not explain how to generate a script file for predicting boxes in an entire image, such as vis1. jpg and vis2. jpg. Can you tell me how to do it??

image

image

Failed to test and visualize the result using the trained weight

Failed to test on R3Det* mmdetection version based on PyTorch. The screen went blank right after the progress bar appearred. Use Nvidia-smi, it returned Unable to determine the device handle for GPU 0000:01:00.0: GPU is lost.
Error message:

RuntimeError: CUDA error: unspecified launch failure
terminate called after throwing an instance of 'c10::Error'
    what(): CUDA error: unspecified launch failure (insert_events at /pytorch/c10/cuda/CUDACachingAllocator.cpp:764)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7fabb0a15193 in /home/dfg/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: <unknown function> + 0x17f66 (0x7fabb0c52f66 in  /home/dfg/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #2: <unknown function> + 0x19cbd (0x7fabb0c54cbd in  /home/dfg/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #3: c10::TensorImpl::release_resources() + 0x4d (0x7fabb0a0563d in /home/dfg/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #4: <unknown function> + 0x67aba2 (0x7fac0ef38ba2 in  /home/dfg/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #5: <unknown function> + 0x67ac46 (0x7fac0ef38c46 in  /home/dfg/anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
<omitting python frames>
frame #22: __libc_start_main + 0xf0 (0x7fac13839830 in /lib/x86_64-linux-gnu/libc.so.6)

RuntimeError: CUDA error: unspecified launch failure

Reproduction

  1. What command or script did you run?
sh rtools/test.sh
sh rtools/visualize.sh

Both have the same problem.

  1. What config dir you run?
configs/r3det/r3det_r50_fpn_2x_CustomizeImageSplit.py
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
    I changed the path of the dataset in configs/r3det/datasets/dotav1_rotational_detection.py
  2. What dataset did you use?
    DOTA1.0

Environment

TorchVision: 0.5.0
OpenCV: 4.2.0
MMCV: 0.5.9
MMDetection: 2.1.0+unknown
MMDetection Compiler: GCC 5.4
MMDetection CUDA Compiler: 10.1

自己的数据,预测后边框偏移很多

@zhanggefan
请问:利用r3det训练自己的数据,预测后边框偏移很多,应该从哪个角度去解决?非常感谢!我的数据是1024乘以1024,包含的四个点的坐标。
数据导入的部分,我自己编写了导入程度,把原数据集的格式改成了dota的输入格式(我的图片是tif格式);然后用train. sh训练,用test. sh测试,得到上述结果。

image

log "completed: 0, elapsed: 0s" while running rtools/test.sh

My env:
colab:
pytorch1.7.0
cuda10.1
mmdection 2.1.0
mmcv 0.5.9
My problem:
I want to test if I can run the model, so I download the trained model from this repo given link https://drive.google.com/file/d/1JYyEHyzloRcxYlSRuiCLEaCjjj4Q7L_E/view?usp=sharing
And I am sure that I have put in the right position.
I doesn't use the .sh command
sh rtools/test.sh
but I choose
!PYTHONPATH=${PWD}:$PYTHONPATH python tools/test.py configs/r3det/r3det_r50_fpn_2x_CustomizeImageSplit.py work_dirs/r3det_r50_fpn_2x_20200616/epoch_24.pth --format-only --options submission_dir=work_dirs/r3det_r50_fpn_2x_20200616/submission
I add "!PYTHONPATH=${PWD}:$PYTHONPATH",only in this way can I run the test program.
related issue link open-mmlab#2667
so when I start testing, it shows the log below
completed: 0, elapsed: 0s
And I open the task1-xxx.txt, it shows nothing.
Should I download the DOTA dataset and should I put it in the postion mentioned in dota_image_split.py?
In general, I want to know if it's the right output, if I am wrong, can you please tell me how to solve it?
I an unfamiliar with computer vision, sorry for raising this question.
I will try to train model by myself later, thanks!

R3det is not in the detector registry

Failed to train on R3Det* mmdetection version based on PyTorch. I got an import error when running sh rtools/train.sh

Traceback (most recent call last):
File "tools/train.py", line 161, in
main()
File "tools/train.py", line 134, in main
cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
File "/home/xs/mtl/r3det-on-mmdetection-master/mmdetection-2.2.1/mmdet/models/builder.py", line 67, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/home/xs/mtl/r3det-on-mmdetection-master/mmdetection-2.2.1/mmdet/models/builder.py", line 32, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/xs/.conda/envs/torch140/lib/python3.6/site-packages/mmcv/utils/registry.py", line 157, in build_from_cfg
f'{obj_type} is not in the {registry.name} registry')
KeyError: 'R3Det is not in the detector registry'

Besides, I install mmdetection from https://github.com/open-mmlab/mmdetection, because your setup.py installation failed in my device and I found the reason that mmdetection 2.2.1 is needed. So I guess my problem may caused by not using your setup.py?

My environment is :
Pytorch: 1.4.0
Python: 3.6.10
CUDA: 10.0
GCC: 7.3.0

ImportError: dynamic module does not define module export function(PyInit_geo_cuda)

Failed to train on R3Det* mmdetection version based on PyTorch. I got an import error when running sh rtools/train.sh

Error message:
Traceback (most recent call last):
File "tools/train.py", line 13, in
from mmdet.apis import set_random_seed, train_detector
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/apis/init.py", line 1, in
from .inference import (async_inference_detector, inference_detector,
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/apis/inference.py", line 9, in
from mmdet.core import get_classes
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/core/init.py", line 2, in
from .bbox import * # noqa: F401, F403
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/core/bbox/init.py", line 1, in
from .assigners import (AssignResult, BaseAssigner, CenterRegionAssigner,
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/core/bbox/assigners/init.py", line 1, in
from .approx_max_iou_assigner import ApproxMaxIoUAssigner
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/core/bbox/assigners/approx_max_iou_assigner.py", line 4, in
from ..iou_calculators import build_iou_calculator
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/core/bbox/iou_calculators/init.py", line 3, in
from .riou2d_calculator import RBboxOverlaps2D, rbbox_overlaps
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/core/bbox/iou_calculators/riou2d_calculator.py", line 1, in
from mmdet.ops import rbbox_iou_iof
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/ops/init.py", line 19, in
from .rbbox_geo import rbbox_iou_iof
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/ops/rbbox_geo/init.py", line 1, in
from .rbbox_geo import rbbox_iou_iof
File "/home/ubuntu/anaconda3/envs/pytorch1.5/lib/python3.6/site-packages/mmdet-2.1.0+8f3868f-py3.6-linux-x86_64.egg/mmdet/ops/rbbox_geo/rbbox_geo.py", line 1, in
from . import rbbox_geo_cuda
ImportError: dynamic module does not define module export function (PyInit_rbbox_geo_cuda)

But no errors reported during compilation and my environment is:
torch:1.5.0
torchvision: 0.6.0
mmdet: 2.1.0+8f3868f
GCC: 7.3
CUDA : 10.1
CUDNN:7.5.1
The GPU is RTX 2080, only one GPU.

有没有大佬分享一下权重文件呢

Notice

There are several common situations in the reimplementation issues as below

  1. Reimplement a model in the model zoo using the provided configs
  2. Reimplement a model in the model zoo on other dataset (e.g., custom datasets)
  3. Reimplement a custom model but all the components are implemented in MMDetection
  4. Reimplement a custom model with new modules implemented by yourself

There are several things to do for different cases as below.

  • For case 1 & 3, please follow the steps in the following sections thus we could help to quick identify the issue.
  • For case 2 & 4, please understand that we are not able to do much help here because we usually do not know the full code and the users should be responsible to the code they write.
  • One suggestion for case 2 & 4 is that the users should first check whether the bug lies in the self-implemted code or the original code. For example, users can first make sure that the same model runs well on supported datasets. If you still need help, please describe what you have done and what you obtain in the issue, and follow the steps in the following sections and try as clear as possible so that we can better help you.

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

A clear and concise description of what the problem you meet and what have you done.

Reproduction

  1. What command or script did you run?
A placeholder for the command.
  1. What config dir you run?
A placeholder for the config.
  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 mmdet/utils/collect_env.py to collect necessary environment infomation 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.)

Results

If applicable, paste the related results here, e.g., what you expect and what you get.

A placeholder for results comparison

Issue fix

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

Feature refinement module (FRM) points

According to the paper, the FRM samples five vectors per feature point during feature refinement, However, after a closer look in the code I found out that it is only sampling the center point vector and not the other 4 corners. This setting cannot be changed through the config and is not obvious without looking deep into the code.

I just want to ask why the default setting is as such and not as said in the paper?

mmcv version

I reimplement this model on other dataset and process them the same as Dota dataset, but I found here is a Error [ConvWS is already registered in conv layer]. In the docs of mmcv, they say is the version of MMCV not suitable for MMDetecion, so I'm confused about which mmcv version is suitable for this model?

ValueError: need at least one array to concatenate

when I run sh rtools/train.sh, I meet the problem .How I can do to solve the error!

Traceback (most recent call last):
File "tools/train.py", line 161, in
main()
File "tools/train.py", line 157, in main
meta=meta)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+unknown-py3.7-linux-x86_64.egg/mmdet/apis/train.py", line 179, in train_detector
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 122, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 27, in train
for i, data_batch in enumerate(data_loader):
File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 291, in iter
return _MultiProcessingDataLoaderIter(self)
File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 764, in init
self._try_put_index()
File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 994, in _try_put_index
index = self._next_index()
File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 357, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/home/dl/anaconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 208, in iter
for idx in self.sampler:
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+unknown-py3.7-linux-x86_64.egg/mmdet/datasets/samplers/group_sampler.py", line 36, in iter
indices = np.concatenate(indices,0)
ValueError: need at least one array to concatenate

python setup.py install error

cc1plus: 警告:command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ mmdet/ops/nms/src/cpu/nms_cpu.cpp: 在函数‘at::Tensor nms_cpu_kernel(const at::Tensor&, float)’中: mmdet/ops/nms/src/cpu/nms_cpu.cpp:29:50: 错误:expected primary-expression before ‘>’ token auto suppressed = suppressed_t.data_ptr<uint8_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:29:52: 错误:expected primary-expression before ‘)’ token auto suppressed = suppressed_t.data_ptr<uint8_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:30:38: 错误:expected primary-expression before ‘>’ token auto keep = keep_t.data_ptr<int64_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:30:40: 错误:expected primary-expression before ‘)’ token auto keep = keep_t.data_ptr<int64_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:31:40: 错误:expected primary-expression before ‘>’ token auto order = order_t.data_ptr<int64_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:31:42: 错误:expected primary-expression before ‘)’ token auto order = order_t.data_ptr<int64_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:32:35: 错误:expected primary-expression before ‘>’ token auto x1 = x1_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:32:37: 错误:expected primary-expression before ‘)’ token auto x1 = x1_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:33:35: 错误:expected primary-expression before ‘>’ token auto y1 = y1_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:33:37: 错误:expected primary-expression before ‘)’ token auto y1 = y1_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:34:35: 错误:expected primary-expression before ‘>’ token auto x2 = x2_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:34:37: 错误:expected primary-expression before ‘)’ token auto x2 = x2_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:35:35: 错误:expected primary-expression before ‘>’ token auto y2 = y2_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:35:37: 错误:expected primary-expression before ‘)’ token auto y2 = y2_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:36:41: 错误:expected primary-expression before ‘>’ token auto areas = areas_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp:36:43: 错误:expected primary-expression before ‘)’ token auto areas = areas_t.data_ptr<scalar_t>(); ^ mmdet/ops/nms/src/cpu/nms_cpu.cpp: 在函数‘at::Tensor soft_nms_cpu_kernel(const at::Tensor&, float, unsigned char, float, float)’中: mmdet/ops/nms/src/cpu/nms_cpu.cpp:95:35: 错误:expected primary-expression before ‘>’ token

My environment is:
pytorch 1.5
Gcc:5.5.0

Thank you!

I need a help! I want to know what's the correct order to run the this project?

I want to know what's the correct order to run this project.
I do three steps to get prepared.

  1. I open my pychram(in windows system ) to find what the python modules I should install.

2.Then I pip all the python modules in the Linux and run the "python setup.py install".

3.At last I do these things before training.

"""""""
1)Change the paths in lines 97-98 & 102-103 of dota_image_split.py according to your local DOTA dataset directory.
Run python dota_image_split.py to crop train & val set images into smaller tiles, and generate per-tile label files into the directories you specified in step [1].
2)Change the lines 4-10 of dotav1_rotational_detection.py. Paths in lines 5-8 shall direct to the folders containing the cropped image tiles and label files generated in step [2].
3)Have fun with sh rtools/train.sh and watch the model train!
"""""""

I want to know my order is right? And I want to know whas is the function of the requirement.txt ?
Thank you very much!!!

Got this error when run the command "python setup.py install"

File "/home/cao/anaconda3/envs/open-mmlab/lib/python3.7/distutils/command/build_ext.py", line 363, in check_extensions_list
"each element of 'ext_modules' option must be an "
distutils.errors.DistutilsSetupError: each element of 'ext_modules' option must be an Extension instance or 2-tuple

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "setup.py", line 329, in
zip_safe=False)
File "/home/cao/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/init.py", line 163, in setup

Problems with sh rtools/train.sh && sh rtools/test.sh: undefined symbol: _ZN2at5sliceERKNS_6TensorElN3c108optionalIlEES5_l

I encounter a problem while getting start with repos. I followed the step and I finish data split and py setup.py.
However, I had a same problem with both test.sh and train.sh:

ImportError: /home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/ops/corner_pool/corner_pool_ext.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at5sliceERKNS_6TensorElN3c108optionalIlEES5_l

I currently running this command on a linux server with conda environment as requirement.txt
I wonder if this problem occur due to this file-->corner_pool_ext.cpython-36m-x86_64-linux-gnu.so
Thanks everyone who are going to help me in advance! I dont know if anyone encounter the same question.

Here is my Detail Problems:
(r3det-pytorch) shenzy@AI:~/lsd_temp_file/r3det-on-mmdetection$ sh rtools/train.sh
Traceback (most recent call last):
File "tools/train.py", line 13, in
from mmdet.apis import set_random_seed, train_detector
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/apis/init.py", line 1, in
from .inference import (async_inference_detector, inference_detector,
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/apis/inference.py", line 9, in
from mmdet.core import get_classes
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/core/init.py", line 2, in
from .bbox import * # noqa: F401, F403
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/core/bbox/init.py", line 1, in
from .assigners import (AssignResult, BaseAssigner, CenterRegionAssigner,
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/core/bbox/assigners/init.py", line 1, in
from .approx_max_iou_assigner import ApproxMaxIoUAssigner
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/core/bbox/assigners/approx_max_iou_assigner.py", line 4, in
from ..iou_calculators import build_iou_calculator
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/core/bbox/iou_calculators/init.py", line 3, in
from .riou2d_calculator import RBboxOverlaps2D, rbbox_overlaps
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/core/bbox/iou_calculators/riou2d_calculator.py", line 1, in
from mmdet.ops import rbbox_iou_iof
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/ops/init.py", line 3, in
from .corner_pool import CornerPool
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/ops/corner_pool/init.py", line 1, in
from .corner_pool import CornerPool
File "/home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/ops/corner_pool/corner_pool.py", line 4, in
from . import corner_pool_ext
ImportError: /home/shenzy/lsd_temp_file/r3det-on-mmdetection/mmdet/ops/corner_pool/corner_pool_ext.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at5sliceERKNS_6TensorElN3c108optionalIlEES5_l

annatation format标注格式

the annotation[x,y,w,h,0],how to define the w and h? Is theta the angle between the edge and the positive direction of X axis?which edge?
如何定义W和H?theta表示与x轴的锐角,变化范围为[-90,0),这里是x轴正方向吗?感谢

KeyError: 'ConvWS is already registered in conv layer'

When i run train.py, this error occured.

File "/home//PycharmProjects/Oriented_object_detect/r3det-on-mmdetection/mmdet/ops/conv_ws.py", line 23, in
class ConvWS2d(nn.Conv2d):
File "/home/
/anaconda3/envs/mmlab/lib/python3.7/site-packages/mmcv/utils/registry.py", line 122, in _register
module_class=cls, module_name=name, force=force)
File "/home/***/anaconda3/envs/mmlab/lib/python3.7/site-packages/mmcv/utils/registry.py", line 58, in _register_module
raise KeyError(f'{module_name} is already registered '
KeyError: 'ConvWS is already registered in conv layer'

RuntimeError: CUDA error: no kernel image is available for execution on the device (for V100)

when i run train.py ,this error is occured.
File "/home/caihua/desktop/r3det-on-mmdetection/mmdet/core/bbox/assigners/max_iou_assigner.py", line 119, in assign
assign_result = self.assign_wrt_overlaps(overlaps, gt_labels)
File "/home/caihua/desktop/r3det-on-mmdetection/mmdet/core/bbox/assigners/max_iou_assigner.py", line 143, in assign_wrt_overlaps
dtype=torch.long)
RuntimeError: CUDA error: no kernel image is available for execution on the device

my environment as foloows:
sys.platform: linux
Python: 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37) [GCC 9.3.0]
CUDA available: True
CUDA_HOME: /usr/local/cuda-10.1
NVCC: Cuda compilation tools, release 10.1, V10.1.243
GPU 0,1,2,3: Tesla V100-PCIE-32GB
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.5.1+cu101
PyTorch compiling details: PyTorch built with:

  • GCC 7.3
  • C++ Version: 201402
  • Intel(R) Math Kernel Library Version 2019.0.5 Product Build 20190808 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v0.21.1 (Git Hash 7d2fd500bc78936d1d648ca713b901012f470dbc)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • NNPACK is enabled
  • CPU capability usage: AVX2
  • CUDA Runtime 10.1
  • NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
  • CuDNN 7.6.3
  • Magma 2.5.2
  • Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_INTERNAL_THREADPOOL_IMPL -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-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF,

TorchVision: 0.6.1+cu101
OpenCV: 4.5.2
MMCV: 0.6.1
MMDetection: 2.1.0+8f3868f
MMDetection Compiler: GCC 7.5
MMDetection CUDA Compiler: 10.1

how to fix this problem? thanks a lot

MMdet安装成功却不能正常使用

按照作者给的步骤再次编译安装:
image
但开始训练报错,如下:
ImportError: /home/z/desktop/kongcaihua/R3Det/mmdet/ops/corner_pool/corner_pool_ext.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceIN3c107complexINS2_4HalfEEEEEPKNS_6detail12TypeMetaDataEv
之前安装成功mmdet正常使用,为何再次安装就出现以上错误呢?

IndexError: list index out of range

when I run "sh rtools/train.sh",I meet the error. How I can do to solve the problem?
2020-10-17 10:25:11,392 - mmdet - INFO - Saving checkpoint at 1 epochs
completed: 0, elapsed: 0sTraceback (most recent call last):
File "tools/train.py", line 161, in
main()
File "tools/train.py", line 157, in main
meta=meta)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/apis/train.py", line 179, in train_detector
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 122, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 46, in train
self.call_hook('after_train_epoch')
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 282, in call_hook
getattr(hook, fn_name)(self)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/core/evaluation/eval_hooks.py", line 28, in after_train_epoch
self.evaluate(runner, results)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/core/evaluation/eval_hooks.py", line 32, in evaluate
results, logger=runner.logger, **self.eval_kwargs)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/datasets/dotav1.py", line 187, in evaluate
logger=logger)
File "/home/dl/anaconda3/lib/python3.7/site-packages/mmdet-2.1.0+8f3868f-py3.7-linux-x86_64.egg/mmdet/core/evaluation/rmean_ap.py", line 196, in reval_map
num_classes = len(det_results[0]) # positive class num
IndexError: list index out of range

DOTA数据集训练报错!

我在使用裁剪后的dota_1024训练出现以下错误:
ValueError: could not convert string to float: '1006.0 649.0 1024.0 649.0 1024.0 722.0 1006.0 722.0 storage-tank 2\n'
请问是数据集格式问题吗?我该怎么解决呢?谢谢解答!
我的标签格式如下:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.