Closed hu-wei-carrzy closed 1 year ago
非常感谢您的回复! 但是我在按照环境配置后出现一些问题 导入报错
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年4月4日(星期二) 晚上6:26 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Xuyihaoby/rotate_detection] 请问有没有详细的使用手册,数据集路径啥的是和mmdetection一样的么,本人小白,看到大佬的框架非常佩服,非常感谢 (Issue #1)
是的,数据路径都是差不多的。基本上就是基于mmedetection修改出来的。
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
方便提供相关导入报错信息吗?
以下是我的报错
/home/giant/miniconda3/envs/hw_rotate/bin/python /media/giant/Data/WorkSpace/hw/rotate_detection-main/tools/train.py /media/giant/Data/WorkSpace/hw/rotate_detection-main/configs/oriented_rcnn/oriented_rcnn_r50_fpn_1x.py /media/giant/Data/WorkSpace/hw/rotate_detection-main/workdirs/oriented_rcnn/oriented_rcnn_r50_fpn_1x Traceback (most recent call last): File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/tools/train.py", line 15, in <module> from mmdet.apis import set_random_seed, train_detector File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/apis/init.py", line 1, in <module> from .inference import (async_inference_detector, inference_detector, File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/apis/inference.py", line 10, in <module> from mmdet.core import get_classes File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/core/init.py", line 2, in <module> from .bbox import * # noqa: F401, F403 File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/core/bbox/init.py", line 1, in <module> from .assigners import (AssignResult, BaseAssigner, CenterRegionAssigner, File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/core/bbox/assigners/init.py", line 1, in <module> from .approx_max_iou_assigner import ApproxMaxIoUAssigner File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/core/bbox/assigners/approx_max_iou_assigner.py", line 4, in <module> from ..iou_calculators import build_iou_calculator File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/core/bbox/iou_calculators/init.py", line 3, in <module> from .riou2d_calculator import RBboxOverlaps2D, ConvexOverlaps2D, rbbox_overlaps, rbbox_overlaps_v2, rbbox_overlaps_v3 File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/core/bbox/iou_calculators/riou2d_calculator.py", line 1, in <module> from mmdet.ops import rbbox_iou_iof, obb_overlaps File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/ops/init.py", line 5, in <module> from .polygon_geo import polygon_iou File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/ops/polygon_geo/init.py", line 1, in <module> from .polygon_geo import polygon_iou File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/ops/polygon_geo/polygon_geo.py", line 1, in <module> from . import polygon_geo_cpu ImportError: cannot import name 'polygon_geo_cpu' from partially initialized module 'mmdet.ops.polygon_geo' (most likely due to a circular import) (/media/giant/Data/WorkSpace/hw/rotate_detection-main/mmdet/ops/polygon_geo/init.py)
Process finished with exit code 1
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年4月4日(星期二) 晚上7:09 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Xuyihaoby/rotate_detection] 请问有没有详细的使用手册,数据集路径啥的是和mmdetection一样的么,本人小白,看到大佬的框架非常佩服,非常感谢 (Issue #1)
方便提供相关导入报错信息吗?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
是否有运行以下命令去编译算子 pip install -v -e . # or "python setup.py develop"?
有运行命令python setup.py develop
成功编译了?
我重头再按教程来一次
没事儿,如果实在不太好编译的话,这里也更加推荐原作者版或者mmrotate,我在reference下也已经贴明链接 :)
我之前用的就是mmrotate
conda create -n hw-rotate python=3.7 -y conda activate hw-rotate pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html pip install mmcv-full==1.2.5 -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.0/index.html pip install -r requirements/build.txt python setup.py develop
/home/giant/miniconda3/envs/hw-rotate/bin/python /media/giant/Data/WorkSpace/hw/rotate_detection-main/tools/train.py /media/giant/Data/WorkSpace/hw/rotate_detection-main/configs/ReDet/faster_rcnn_re50_refpn_1x.py /media/giant/Data/WorkSpace/hw/rotate_detection-main/workdirs/ReDet/faster_rcnn_re50_refpn_1x
Traceback (most recent call last):
File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/tools/train.py", line 15, in
我尝试 pip install pycocotools==12.0.2 都没有这个版本
实在抱歉,又来打扰了
你可以尝试搜索一下,有些可能是mmdetection之前遗留下来的问题;以下是我搜到的结果https://github.com/open-mmlab/mmdetection/issues/3761
是的我也找到了,又有新的缺包,了我的天
/home/giant/miniconda3/envs/hw-rotate/bin/python /media/giant/Data/WorkSpace/hw/rotate_detection-main/tools/train.py /media/giant/Data/WorkSpace/hw/rotate_detection-main/configs/ReDet/faster_rcnn_re50_refpn_1x.py /media/giant/Data/WorkSpace/hw/rotate_detection-main/workdirs/ReDet/faster_rcnn_re50_refpn_1x
Traceback (most recent call last):
File "/home/giant/miniconda3/envs/hw-rotate/lib/python3.7/site-packages/cupy/init.py", line 16, in
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/media/giant/Data/WorkSpace/hw/rotate_detection-main/tools/train.py", line 15, in
If you are using wheel distribution (cupy-cudaXX), make sure that the version of CuPy you installed matches with the version of CUDA on your host. Also, confirm that only one CuPy package is installed: $ pip freeze
If you are building CuPy from source, please check your environment, uninstall CuPy and reinstall it with: $ pip install cupy --no-cache-dir -vvvv
Check the Installation Guide for details: https://docs.cupy.dev/en/latest/install.html
original error: libcudart.so.10.1: cannot open shared object file: No such file or directory
Process finished with exit code 1
在build.txt中cupy-cuda101 # note: depend on cuda version,是这个的·原因吗
是的 你可以选择安装正确的cupy 或者直接在框架下把使用这个包的代码以及相关文件屏蔽
pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio==0.7.0 -f
我下载的是cupy-cuda110,但是还是这个报错
这个可能需要你自己根据报错情况进行相关调整了
好像配好了,没有导入报错,也可以生成workdirs了,数据集格式好像不太对报错 0.0,今天真是麻烦大哥了
请问我训练之后,提交到dota官网,报错。我之前在mmrotate生成的可以提交成功。
好像区别就是图片名称
请问是没有切割test数据集么
我使用 但是 没有切割test数据集,这是提交的结果 请问是要怎么操作额
total_epochs=12 evaluation = dict(interval=24, metric='bbox') 我改成 evaluation = dict(interval=1, metric='mAP') 没有效果,没有每轮训练输出mAP,要怎么才能看到每轮的训练效果呀 麻烦您了。
在这里生成文件的步骤是分开的,test数据集是切割之后检测再合并的;关于每轮的eval,由于训练效率原因直接将其flag设置为了False,所以这么改是没有效果的。这个框架不像mmrotate那么容易上手,更多的是我自己的一些记录,有些问题可能需要自己阅读源码进行相应的修改:)
这是我用的命令,您说的步骤是分开的要怎么操作额,合并要怎么合并额,打扰您了。
还有就是怎么设置才能看到每轮的eval,我好像没有找到您说的将flag设置为了False,麻烦您了。
测试集同样需要使用DOTA-devkit进行切割,输出使用test输出pkl文件后,利用parse results进行后处理,具体可以参考[https://github.com/csuhan/ReDet];在train中把eval默认参数进行修改,之后如若出现一些bug,你可以深入源码尝试自行修改。
在trian.py中修改eval的默认参数,是train_detector中的validate么我修改为true后,在每轮训练的时候就卡在那里不动了 实在不好意思,尝试了一晚上没有效果,又得打扰一下您了
在线训练验证确实有可能遇到这样的问题,你可以选择自行更深入的修改,或者离线通过保存每一轮的epoch进行离线验证。
是的,数据路径都是差不多的。基本上就是基于mmedetection修改出来的。