Git Product home page Git Product logo

ceasc's Introduction

CEASC: Adaptive Sparse Convolutional Networks with Global Context Enhancement for Faster Object Detection on Drone Images

The repo is the official implementation of CEASC.

Our CEASC module is at mmdet/models/dense_heads

Our Sparse Convolution Implementation is at Sparse_conv

Our config file is at configs/UAV

Requirement

Please follow docs/en/get_started.md and install the mmdetection toolbox.

a. Install Pytorch 1.10.1

b. Install MMDetection toolbox, required mmdet >= 2.7.0, mmcv-full >= 1.4.2.

  • Our project utilizes mmdet == 2.24.1, mmcv-full == 1.5.1

c. Install albumentations and other packages.

pip install nltk
pip install -r requirements/albu.txt

d. Install our Sparse Convolution Implementation

cd ./Sparse_conv
python setup.py install
cd ..

Usage

1. Data preparation

You could download VisDrone and UAVDT dataset (COCO Format) from official links or from other repositories like UFPMP-Det.

2. Training

% training on a single GPU
python tools/train.py /path/to/config-file --work-dir /path/to/work-dir

% training on multi GPUs
bash tools/dist_train.sh /path/to/config-file num-gpus --work-dir /path/to/work-dir

Checkpoints:

We provide the following checkpoints:

3. Test

python tools/test.py /path/to/config-file /path/to/work-dir/latest.pth --eval bbox

Citation

If you find our paper or this project helps your research, please kindly consider citing our paper in your publication.

@misc{ceasc,
      title={Adaptive Sparse Convolutional Networks with Global Context Enhancement for Faster Object Detection on Drone Images}, 
      author={Bowei Du and Yecheng Huang and Jiaxin Chen and Di Huang},
      year={2023},
      eprint={2303.14488},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

ceasc's People

Contributors

cuogeihong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar chichuang avatar  avatar  avatar  avatar  avatar buffalo avatar  avatar LvRuH avatar  avatar  avatar  avatar  avatar  avatar  avatar Zhang Xu avatar  avatar Li Jiaping avatar  avatar  avatar huang avatar  avatar  avatar 肖鹏 avatar  avatar 雨轩 avatar Yan Jiang avatar  avatar kikiXiong avatar  avatar b-yanchao avatar  avatar xzh_23 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar Howard NG avatar yzlicloud avatar  avatar  avatar  avatar FrankHe avatar  avatar  avatar kong en avatar  avatar gholf avatar GT-Wei avatar Dim Du avatar  avatar  avatar  avatar  avatar Liang DeZhi avatar  avatar NS-5 avatar  avatar  avatar  avatar Danny avatar  avatar  avatar  avatar Ivans Saponenko avatar 魔鬼面具 avatar An-zhi WANG avatar Saquib Nadeem Hashmi avatar Ryan_wu avatar Jixiang Wu avatar Aju avatar 久绊A avatar  avatar river_cold avatar  avatar  avatar Austorm avatar  avatar Wen-Liang, Du avatar  avatar JackJun avatar DexterYan avatar  avatar  avatar Lucky~ avatar swan avatar  avatar wave789 avatar  avatar Liu Kai avatar  avatar  avatar WangQvQ avatar

Watchers

 avatar

ceasc's Issues

Dataset format problem.

I think UFPMP-Det coco format train-set made a mistake. take 9999937_00000_d_0000077.txt as a example. UFPMP-Det coco format:
[[9, 499, 15, 27], [150, 463, 37, 42], [165, 404, 15, 22], [176, 426, 15, 23], [219, 441, 76, 33], [522, 480, 80, 41], [673, 601, 224, 128], [727, 798, 343, 243], [883, 526, 85, 49], [1326, 228, 11, 13], [1335, 221, 29, 19], [1381, 207, 36, 23], [1455, 843, 39, 32], [1465, 837, 23, 25], [1476, 871, 31, 34], [1478, 867, 23, 29], [1568, 178, 46, 42], [1577, 841, 38, 34], [1587, 165, 99, 34], [1588, 830, 18, 35], [1624, 159, 39, 20], [1638, 218, 45, 27], [1649, 316, 59, 30], [1684, 207, 48, 27], [1764, 138, 52, 20], [1775, 120, 73, 31], [1786, 185, 42, 23], [1866, 289, 49, 34]]
correct coco format is:
[[10, 500, 14, 26], [151, 464, 36, 41], [166, 405, 14, 21], [177, 427, 14, 22], [220, 442, 75, 32], [523, 481, 79, 40], [674, 602, 223, 127], [728, 799, 342, 242], [884, 527, 84, 48], [1327, 229, 10, 12], [1336, 222, 28, 18], [1382, 208, 35, 22], [1456, 844, 38, 31], [1466, 838, 22, 24], [1477, 872, 30, 33], [1479, 868, 22, 28], [1569, 179, 45, 41], [1578, 842, 37, 33], [1588, 166, 98, 33], [1589, 831, 17, 34], [1625, 160, 38, 19], [1639, 219, 44, 26], [1650, 317, 58, 29], [1685, 208, 47, 26], [1765, 139, 51, 19], [1776, 121, 72, 30], [1787, 186, 41, 22], [1867, 290, 48, 33]]
because cat 9999937_00000_d_0000077.txt result is:
151,464,36,41,1,6,0,0
220,442,75,32,1,6,0,0
523,481,79,40,1,4,0,1
166,405,14,21,1,10,0,1
177,427,14,22,1,10,0,1
674,602,223,127,1,6,0,1
884,527,84,48,1,4,0,0
1382,208,35,22,1,5,0,0
1336,222,28,18,1,7,0,0
1327,229,10,12,1,10,0,0
1569,179,45,41,1,6,0,0
1588,166,98,33,1,6,0,1
1625,160,38,19,1,4,0,0
1650,317,58,29,1,4,0,0
1639,219,44,26,1,5,0,1
1685,208,47,26,1,6,0,1
728,799,342,242,1,6,0,0
1867,290,48,33,1,4,1,0
1776,121,72,30,1,6,0,1
1765,139,51,19,1,5,0,0
1787,186,41,22,1,4,0,1
1466,838,22,24,1,2,0,1
1456,844,38,31,1,10,0,1
1479,868,22,28,1,2,0,1
1477,872,30,33,1,10,0,1
1578,842,37,33,1,3,0,0
1589,831,17,34,1,2,0,1
10,500,14,26,1,1,0,0
Extra 1s have been added to annotation.

About test

In the repo, you said use ./tools/test.py to evaluate the result. How did you handle the ignore region in Visdrone? The original matlab script drops gts and dets in ignore region.

config file

hello
thanks for implementation sharing
it was interesting for me

I have two question:

  1. I want to train to train network with YOLOv5 baseline detector. did you shared any config file for training?
  2. there are some sample config file in CEASC/configs/UAV/ directory . and others in CEASC/configs/ directory. which one we can use for training VisDrone dataset?

Appreciate if share YOLOv5 config file if there isn't.
thank you.

关于CEASC在GFL V1基线上结果复现的问题

我参考了已经close的几个问题来尝试解决,但是目前为止我根据您的代码对Visdrone数据集进行训练并不能得到和您数据集里相同的结果(准确来说都差好多,并且在我的重复训练中越来越差)。
我直接使用您提供的checkpoint是能获得您论文中的结果的。
下面是我的几个训练日志,希望您能给我提出一些最有可能影响到我训练结果的可能性。
非常感谢您在百忙之中给我提供的帮助。
20231020_155829.log
20231015_203331.log
9a9ab8e0bd04f934fc58178e55c24cc

上图是我能跑出来的最好的结果

About spconv

ImportError: /opt/conda/lib/python3.7/site-packages/sparse_conv-0.0.0-py3.7-linux-x86_64.egg/sparse_conv.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at8internal23OpaqueOptionalTensorRefD1EvImportError
: /opt/conda/lib/python3.7/site-packages/sparse_conv-0.0.0-py3.7-linux-x86_64.egg/sparse_conv.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at8internal23OpaqueOptionalTensorRefD1Ev

I followed your steps to install spconv, but I got this error when I import spconv. My environment is pytorch 1.10.0 cuda 11.3 python 3.7.

ModuleNotFoundError: No module named 'sparse_conv'

作者你好,首先非常感谢您优秀的工作,我在复现您的代码的时候碰到以下问题:
/usr/local/lib/python3.8/dist-packages/mmdet/utils/compat_config.py:28: UserWarning: config is now expected to have a runner section, please set runner in your config.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/mmdet/utils/setup_env.py:38: UserWarning: Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/mmdet/utils/setup_env.py:48: UserWarning: Setting MKL_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
warnings.warn(
Traceback (most recent call last):
File "tools/test.py", line 270, in
main()
File "tools/test.py", line 213, in main
dataset = build_dataset(cfg.data.test)
File "/usr/local/lib/python3.8/dist-packages/mmdet/datasets/builder.py", line 82, in build_dataset
dataset = build_from_cfg(cfg, DATASETS, default_args)
File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 58, in build_from_cfg
raise KeyError(
KeyError: 'UAVDataset is not in the dataset registry'
希望您能帮我看一下

About ceasc module

@Cuogeihong Hi!I could not find the specific location of module CEASC clearly. Where is the module of CEASC in the code, in which files or in which part?

How to set the lr?

great work!
Iwant to know If I had 2 gpu,each gpu batch size is 8,then how should I set the lr?

在GFL V1的CEASCE方法下的复现问题

作者您好,我按照您的readme文件配置好环境后,分别进行训练和测试,但是结果有一些偏差。
下图是我用您的checkpoints得到的结果
07635199ca9b7253711d7b672838d96

然后我训练出来的模型结果如下:
c26ae1ee2b0eb3eb30163ca51574c0d

其中AP50在48附近,和论文结果AP50=50.7有差距,我想知道这个复现结果的差距是正常的吗?非常希望能得到您的指导!

list index out of range error while building spars-conv

hello
I got this error while I was trying to build Spars_conv/ setup.py:

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Traceback (most recent call last):
File "setup.py", line 4, in
setup(
File "/usr/local/lib/python3.8/site-packages/setuptools/init.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/install.py", line 80, in run
self.do_egg_install()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/install.py", line 129, in do_egg_install
self.run_command('bdist_egg')
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/command/install_lib.py", line 111, in build
self.run_command('build_ext')
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
self.build_extensions()
File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 843, in build_extensions
build_ext.build_extensions(self)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "/usr/local/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
objects = self.compiler.compile(
File "/usr/local/lib/python3.8/site-packages/setuptools/_distutils/ccompiler.py", line 600, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 581, in unix_wrap_single_compile
cflags = unix_cuda_flags(cflags)
File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 548, in unix_cuda_flags
cflags + _get_cuda_arch_flags(cflags))
File "/usr/local/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1773, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range

what should I do?
I instahhed pytorch2.0.0 instead torch1.10.1 because of colab limitations in cuda versions installation.

关于图4的绘制问题

我尝试在测试过程中输出了retina_dy_head的mask但是全是0,请问图4是怎么生成的呢?

An error is reported when sparse conv compiles

creating build/temp.linux-x86_64-cpython-38
gcc -pthread -B /home/han/anaconda3/envs/py38/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/han/anaconda3/envs/py38/include -fPIC -O2 -isystem /home/han/anaconda3/envs/py38/include -fPIC -I/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include -I/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/TH -I/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/han/anaconda3/envs/py38/include/python3.8 -c sparse_conv_cuda.cpp -o build/temp.linux-x86_64-cpython-38/sparse_conv_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=sparse_conv -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
/usr/local/cuda-11.8/bin/nvcc -I/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include -I/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/TH -I/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/han/anaconda3/envs/py38/include/python3.8 -c sparse_conv_cuda_kernel.cu -o build/temp.linux-x86_64-cpython-38/sparse_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
_ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' --extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=sparse_conv -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_89,code=compute_89 -gencode=arch=compute_89,code=sm_89 -std=c++17
/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/irange.h(54): warning #186-D: pointless comparison of unsigned integer with zero
detected during:
instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, >::operator==(const c10::detail::integer_iterator<I, one_sided, > &) const [with I=size_t, one_sided=false, =0]"
(61): here
instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, >::operator!=(const c10::detail::integer_iterator<I, one_sided, > &) const [with I=size_t, one_sided=false, =0]"
/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/c10/core/TensorImpl.h(77): here

/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/c10/util/irange.h(54): warning #186-D: pointless comparison of unsigned integer with zero
detected during:
instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, >::operator==(const c10::detail::integer_iterator<I, one_sided, > &) const [with I=std::size_t, one_sided=true, =0]"
(61): here
instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, >::operator!=(const c10::detail::integer_iterator<I, one_sided, > &) const [with I=std::size_t, one_sided=true, =0]"
/home/han/anaconda3/envs/py38/lib/python3.8/site-packages/torch/include/ATen/core/qualified_name.h(73): here

sparse_conv_cuda_kernel.cu(244): warning #177-D: variable "D" was declared but never referenced

sparse_conv_cuda_kernel.cu(170): error: too many arguments for class template "at::native::WelfordData"

sparse_conv_cuda_kernel.cu(172): error: too many arguments for class template "at::native::WelfordOps"

sparse_conv_cuda_kernel.cu(172): error: expected a ";"

3 errors detected in the compilation of "sparse_conv_cuda_kernel.cu".
error: command '/usr/local/cuda-11.8/bin/nvcc' failed with exit code 2

When I compile sparse conv, I report the above error, why is that?
Whether I use colab or wsl2, this error is reported, I don't think it's my computer's problem

版本问题

您好,我一开始用了CUDA11.7,pytorch1.13.1,mmcv-full1.5.1,mmdet2.24.1,测试mmdet也显示是安装成功了,之后运行train.py,出现了以下错误:
File "tools/train.py", line 237, in
main()
File "tools/train.py", line 211, in main
model.init_weights()
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\runner\base_module.py", line 116, in init_weights
m.init_weights()
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\runner\base_module.py", line 105, in init_weights
initialize(self, self.init_cfg)
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\cnn\utils\weight_init.py", line 613, in initialize
_initialize(module, cp_cfg)
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\cnn\utils\weight_init.py", line 517, in _initialize
func(module)
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\cnn\utils\weight_init.py", line 489, in call
load_checkpoint(
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\runner\checkpoint.py", line 581, in load_checkpoint
checkpoint = _load_checkpoint(filename, map_location, logger)
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\runner\checkpoint.py", line 520, in _load_checkpoint
return CheckpointLoader.load_checkpoint(filename, map_location, logger)
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\runner\checkpoint.py", line 285, in load_checkpoint
return checkpoint_loader(filename, map_location)
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\runner\checkpoint.py", line 425, in load_from_torchvision
model_urls = get_torchvision_models()
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\runner\checkpoint.py", line 132, in get_torchvision_models
model_urls = mmcv.load(json_path)
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\fileio\io.py", line 57, in load
with StringIO(file_client.get_text(file)) as f:
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\fileio\file_client.py", line 1028, in get_text
return self.client.get_text(filepath, encoding)
File "D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\fileio\file_client.py", line 552, in get_text
with open(filepath, 'r', encoding=encoding) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\Anaconda3\envs\xxm\lib\site-packages\mmcv\model_zoo/torchvision_0.12.json'

缺少这个torchvision0.12.json文件,我看了目录,确实没有这个文件,于是我想是不是我版本问题,所以我又重新创建了虚拟环境,在自己虚拟环境下安装了CUDA11.3,pytorch1.10.1,mmcv-ful1.5.1,mmdet2.24.1,但在测试mmdet是否安装成功的时候,显示这种错误,但我pip list看了是存在sparse-conv0.0.0。所以我在想是我CUDA的问题吗,一台服务器不能有两个CUDA吗,而且我是在我虚拟环境中安装的(呜呜呜,救救孩子吧,周一开组会汇报,非常感谢非常感谢非常感谢!!!)

Traceback (most recent call last):
File "demo/image_demo.py", line 5, in
from mmdet.apis import (async_inference_detector, inference_detector,
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\apis_init_.py", line 2, in
from .inference import (async_inference_detector, inference_detector,
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\apis\inference.py", line 13, in
from mmdet.datasets import replace_ImageToTensor
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\datasets_init_.py", line 13, in
from .utils import (NumClassCheckHook, get_loading_pipeline,
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\datasets\utils.py", line 11, in
from mmdet.models.dense_heads import GARPNHead, RPNHead
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\models_init_.py", line 7, in
from .dense_heads import * # noqa: F401,F403
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\models\dense_heads_init_.py", line 44, in
from .fsaf_dy_head import FSAFDYHead
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\models\dense_heads\fsaf_dy_head.py", line 11, in
from .retina_dy_head import RetinaDYHead
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\models\dense_heads\retina_dy_head.py", line 9, in
from .cuda_dynamic_conv_module import DyConv2D
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\models\dense_heads\cuda_dynamic_conv_module.py", line 6, in
from .sparse_conv_net import *
File "D:\Anaconda3\envs\amm\lib\site-packages\mmdet-2.24.1-py3.8.egg\mmdet\models\dense_heads\sparse_conv_net.py", line 17, in
import sparse_conv
ImportError: DLL load failed while importing sparse_conv: 找不到指定的程序。

Question about testing FPS

Hello,

I'm trying to test the FPS and I'm having trouble getting accurate results. I tried using the benchmark.py script in mmdetection but the results are different from what was presented in the paper.

Here are two results I got.

  1. dynamic_gfl_res18_visdrone.py

image

  1. baseline_gfl_res18_visdrone.py

image

This is your paper results.

image

What is the possible reseason? Could you please explain how to properly test FPS using mmdetection or suggest an alternative method?

Thank you!

yolo改进

作者,您好!我想问一下您在config中给出的好像都是原生的yolo、yolox检测头,您提出的这些模块可以针对yolo进行改进吗?

instances_UAVtrain_v1.json

FileNotFoundError: UAVDataset: [Errno 2] No such file or directory: '/home/pq/CEASC/datasetannotations/instances_UAVtrain_v1.json
I encountered the above problem during training. I can't find instances_UAVtrain_v1.json . How can I solve it

关于mask的预测问题

尊敬的作者:

您好!

我看到您对于mask的监督目标是要预测前景部分,请问如果不包含背景信息的话,是否会导致检测结果不准呢?

期待您的回复

感谢!!

代码复现

作者您好!我想我问一下你README文件中python tools/train.py /path/to/config-file --work-dir /path/to/work-dir ,/path/to/config-file这个文件路径的配置文件是什么?我设置了您给的.pth文件,报错了

调用configs/UAV/dynamic_fasterrcnn_res18_visdrone.py报错

您好,我在复现您的代码的时候,通过python tools/train.py configs/UAV/dynamic_fasterrcnn_res18_visdrone.py --work-dir work这个命令,但是运行出现了如下的报错
2023-11-24 00:02:16,742 - mmdet - INFO - Set random seed to 72903423, deterministic: False
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 66, in build_from_cfg
return obj_cls(**args)
File "/usr/local/lib/python3.8/dist-packages/mmdet/models/detectors/faster_rcnn.py", line 19, in init
super(FasterRCNN, self).init(
File "/usr/local/lib/python3.8/dist-packages/mmdet/models/detectors/two_stage.py", line 41, in init
self.rpn_head = build_head(rpn_head_)
File "/usr/local/lib/python3.8/dist-packages/mmdet/models/builder.py", line 40, in build_head
return HEADS.build(cfg)
File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 234, in build
return self.build_func(*args, **kwargs, registry=self)
File "/usr/local/lib/python3.8/dist-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 58, in build_from_cfg
raise KeyError(
KeyError: 'RPNDYHeadExpand is not in the models registry'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tools/train.py", line 238, in
main()
File "tools/train.py", line 208, in main
model = build_detector(
File "/usr/local/lib/python3.8/dist-packages/mmdet/models/builder.py", line 58, in build_detector
return DETECTORS.build(
File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 234, in build
return self.build_func(*args, **kwargs, registry=self)
File "/usr/local/lib/python3.8/dist-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/usr/local/lib/python3.8/dist-packages/mmcv/utils/registry.py", line 69, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
KeyError: "FasterRCNN: 'RPNDYHeadExpand is not in the models registry'",我不太清楚我哪里配置的有问题,我运行别的配置文件是可以正常的训练的。麻烦您看看,非常感谢您。

the code of fig3 and fig4

Hello, I would like to ask if the code in Figures 3 and 4 below is implemented in the code provided?

安装Sparse_conv模块报错

error: invalid initialization of reference of type ‘const c10::TensorOptions&’ from expression of type ‘const c10::nullopt_t’

CAFFE2_API Tensor empty_like(const Tensor & self, const TensorOptions & options={}, c10::optional memory_format=c10::nullopt);
^~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1

Excuse me, what is the reason for this error when installing Sparse_conv?

About image number of UAVDT.

There is a sentence "UAVDT contains 23,258 training images and 15,069 testing images with a resolution of 1,024×540 from 3 classes." in your paper.
However, I found that UAVDT downloaded in README contains 40,735 images (23258 + 15069 = 38,327 in paper).
Could you explain the reason and how did you split UAVDT?
Thanks!

训练日志

请问能否提供一份训练日志,谢谢

梯度回传

感谢您杰出的工作。请问SparseConv中,采样mask与feature之间的梯度是怎么传递的呢?将mask与feature相乘吗?

assert module.num_classes == len(dataset.CLASSES), \

我完全按照你的配置文件进行训练,结果报错
assert module.num_classes == len(dataset.CLASSES),
AssertionError: The num_classes (1) in RPNHeadExpand of MMDataParallel does not matches the length of CLASSES 10) in RepeatDataset
环境配置就只有cuda版本跟你不同,其他都相同

安装Sparse_conv时出现错误

您好,我在安装SC模块时,运行python setup.py install命令时,出现以下错误,是因为什么呢,期待您的答复!
D:\Anaconda3\envs\CEASC\lib\site-packages\torch\include\pybind11\detail/common.h(152): warning C4005: 'HAVE_SNPRINTF': macro redefinition
D:\Anaconda3\envs\CEASC\include\pyerrors.h(315): note: see previous definition of 'HAVE_SNPRINTF'
sparse_conv_cuda.cpp(11): fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
error: command 'D:\vs20190\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2

GFL v1 reimplementation performance question.

I used your config baseline_gfl_res18_visdrone.py without change. The result is below(tested with matlab 2021a).
截屏2023-03-30 19 05 59

which is far below your paper result AP 28.4, AP50 50.0.
截屏2023-03-30 19 01 38

What is the possible reseason? Could you give me your checkpoint or possible explanation, please!

CEASC+YOLOV7

作者您好,请问CEASC可否应用于YOLOv7呢?

How to get the GFLOPs of the model?

I noticed that the paper mentioned the GFLOPs of the model, which was used to prove the effect of spconv. But how to get it ? Did the author calculate this by hand ? Or is there any useful code to get it automatically ?

我注意到论文中提到了该模型的GFLOPs,用于证明spconv的效果。但是如何获得它呢?这是作者亲手计算的吗?或者有什么有用的代码可以自动获取它吗?

关于实验结果的复现

在对ceasc的gfl进行复现时,使用的是您提供的训练权重,在visdrone上进行eval,AP和论文中基本一致,但是AR却相差的很大,请问是什么原因导致的呢?
Snipaste_2023-09-14_16-57-12

How to calculate the FLOPs of SparseConv?

Hello, author. I am trying to replicate your work. I am using mmdetection/tools/analysis_tools/get_flops.py to obtain the model's FLOPs. However, I have noticed that this function does not capture the FLOPs for DyConv2D. Could you please explain how you calculate FLOPs for sparse convolutions?Thanks
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.