icey-zhang / E2E-MFD

E2E-MFD-OOD
50 stars 2 forks source link

lack the dronevehicle_m.py , can u provide the dronevehicle.py file? #4

Open jimuIee opened 1 month ago

kaka-Cao commented 1 month ago

Hello, the file path is here https://github.com/icey-zhang/E2E-MFD/blob/main/tools/cfg/dronevehicle_m.py, https://github.com/icey-zhang/E2E-MFD/blob/main/mmrotate/datasets/dronevehicle.py. In addition, we have modified some source codes in the mmcv library and mmdet library. The mmcv and mmdet libraries with modified codes are already provided. If you want to install the source code yourself, the source code installation may cause the loss of our modified parts. Therefore, after installation, you need to replace the following files in the source code installation library with the files in our warehouse. The specific modified files are: mmdet/datasets/pipelines/formatting.py mmdet/datasets/pipelines/transforms.py mmdet/models/detectors/base.py mmcv/runner/hooks/optimizer.py In addition to the above, if you still encounter the situation of a lack of files, you can find them in this warehouse. Thank you for your attention

jimuIee commented 1 month ago

作者您好,请问可以提供你们代码运行环境的环境配置吗,我根据你们提供的log文件对比了一下,但是运行train.py时一直报错 /home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmcv/init.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details. warnings.warn( Traceback (most recent call last): File "/mnt/home/lzk/E2E-MFD-main/./tools/train.py", line 13, in from mmcv.runner import get_dist_info, init_dist File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmcv/runner/init.py", line 3, in from .base_runner import BaseRunner File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmcv/runner/base_runner.py", line 19, in from .hooks import HOOKS, Hook File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmcv/runner/hooks/init.py", line 26, in from .optimizer import (Fp16OptimizerHook, GradientCumulativeFp16OptimizerHook, File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmcv/runner/hooks/optimizer.py", line 17, in from mmrotate.adm.optim import File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmrotate/init.py", line 5, in from .core import # noqa: F401, F403 File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmrotate/core/init.py", line 2, in from .anchor import # noqa: F401, F403 File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmrotate/core/anchor/init.py", line 2, in from .anchor_generator import PseudoAnchorGenerator, RotatedAnchorGenerator File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmrotate/core/anchor/anchor_generator.py", line 4, in from mmdet.core.anchor import AnchorGenerator File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmdet/core/init.py", line 3, in from .bbox import # noqa: F401, F403 File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmdet/core/bbox/init.py", line 8, in from .samplers import (BaseSampler, CombinedSampler, File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmdet/core/bbox/samplers/init.py", line 12, in from .score_hlr_sampler import ScoreHLRSampler File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmdet/core/bbox/samplers/score_hlr_sampler.py", line 3, in from mmcv.ops import nms_match File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmcv/ops/init.py", line 3, in from .active_rotated_filter import active_rotated_filter File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmcv/ops/active_rotated_filter.py", line 10, in ext_module = ext_loader.load_ext( File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg/mmcv/utils/ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "/home/lzk/mydata/anaconda3/envs/E2E-MFD/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named 'mmcv._ext' 我的环境配置如下(罗列了部分配置): e2cnn 0.2.3 /mnt/home/lzk/E2E-MFD-main/src/e2cnn mmcv-full 1.7.2 mmdet 2.28.2 mmrotate 0.3.4 /mnt/home/lzk/anaconda3/envs/E2E-MFD/lib/python3.9/site-packages/mmrotate-0.3.4-py3.9.egg model-index 0.1.11 mpmath 1.3.0 networkx 3.2.1 numpy 1.23.0 nvidia-cublas-cu11 11.10.3.66 nvidia-cublas-cu12 12.1.3.1 nvidia-cuda-cupti-cu11 11.7.101 nvidia-cuda-cupti-cu12 12.1.105 nvidia-cuda-nvrtc-cu11 11.7.99 nvidia-cuda-nvrtc-cu12 12.1.105 nvidia-cuda-runtime-cu11 11.7.99 nvidia-cuda-runtime-cu12 12.1.105 nvidia-cudnn-cu11 8.5.0.96 nvidia-cudnn-cu12 9.1.0.70 nvidia-cufft-cu11 10.9.0.58 nvidia-cufft-cu12 11.0.2.54 nvidia-curand-cu11 10.2.10.91 nvidia-curand-cu12 10.3.2.106 nvidia-cusolver-cu11 11.4.0.1 nvidia-cusolver-cu12 11.4.5.107 nvidia-cusparse-cu11 11.7.4.91 nvidia-cusparse-cu12 12.1.0.106 nvidia-nccl-cu11 2.14.3 nvidia-nccl-cu12 2.20.5 nvidia-nvjitlink-cu12 12.6.77 nvidia-nvtx-cu11 11.7.91 nvidia-nvtx-cu12 12.1.105 opencv-python 4.10.0.84 opendatalab 0.0.10 openmim 0.3.9 openxlab 0.1.1 ordered-set 4.1.0 py 1.11.0 pycocotools 2.0.8 pycodestyle 2.12.1 setuptools 60.2.0 torch 2.0.1 torchaudio 2.0.2 torchvision 0.15.2

kaka-Cao commented 1 month ago

您好!这个错是torch cuda和mmcv-full版本不对应导致的,请在安装MMCV-full1.7.2时选择与你的环境相对应的torch cuda版本。参考https://blog.csdn.net/wjinjie/article/details/115164251

jimuIee commented 1 month ago

您好!这个错是torch cuda和mmcv-full版本不对应导致的,请在安装MMCV-full1.7.2时选择与你的环境相对应的torch cuda版本。参考https://blog.csdn.net/wjinjie/article/details/115164251

感谢您的解答!请问作者如果方便的话可以分享一下你们使用的Dronevehicle数据集吗,或者是上传一个标注文件作为示例(因为dronevehicle的数据标注确实过于混乱QAQ)。

kaka-Cao commented 1 month ago

我们所使用的Dronevehicle数据集的训练和测试标签在这里查看https://drive.google.com/drive/folders/1gmFlz1AyRG8NmK3iCh1QWcLsCbdhSiVu?usp=sharing

jimuIee commented 1 month ago

我们所使用的Dronevehicle数据集的训练和测试标签在这里查看https://drive.google.com/drive/folders/1gmFlz1AyRG8NmK3iCh1QWcLsCbdhSiVu?usp=sharing

您好!方便上传一下lsknet的预训练权重吗

LKXHZD commented 1 month ago

I meet a problem,please help me,thanks. Traceback (most recent call last): File "/root/E2E-MFD/./tools/train.py", line 193, in main() File "/root/E2E-MFD/./tools/train.py", line 182, in main train_detector( File "/root/E2E-MFD/mmrotate/apis/train.py", line 144, in train_detector runner.run(data_loaders, cfg.workflow) File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run epoch_runner(data_loaders[i], **kwargs) File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/mmcv/runner/epoch_based_runner.py", line 49, in train for i, data_batch in enumerate(self.data_loader): File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 442, in iter return self._get_iterator() File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 388, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1085, in init self._reset(loader, first_iter=True) File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1118, in _reset self._try_put_index() File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1352, in _try_put_index index = self._next_index() File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 624, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 254, in iter for idx in self.sampler: File "/opt/conda/envs/E2E-MFD/lib/python3.9/site-packages/mmdet/datasets/samplers/group_sampler.py", line 36, in iter indices = np.concatenate(indices) ValueError: need at least one array to concatenate

LKXHZD commented 1 month ago

I would like to ask what are the appropriate settings for training on a small graphics card, such as samples_per_gpu, worker_per_gpu, and max_epochs? Because if I reduce these parameters, there will be an error of 'needed at least one array to concatenate', and if I increase these parameters, there will be another error of 'DataLoader worker is killed by signal: Terminated'. Can you tell me how to solve it? Please forgive my ignorance, as I am a novice. Thank you very much.