yijingru / bbavectors-oriented-object-detection Goto Github PK
View Code? Open in Web Editor NEW[WACV2021] Oriented Object Detection in Aerial Images with Box Boundary-Aware Vectors
License: MIT License
[WACV2021] Oriented Object Detection in Aerial Images with Box Boundary-Aware Vectors
License: MIT License
你好,我想问一下,你在测试和验证的时候有对图像进行裁剪吗?我用你的代码跑了dota,evaluate的时候,会生成result_data,但是在merge的时候会报错,我看result_data 中生成的文件是merge之后的,所以,你在evaluate的时候有对图像裁剪吗?是使用的原图测试的吗?
为什么调整batch_size后mAP可以得到如此大的提升?
!python main.py --data_dir='/content/drive/My Drive/Bba' --num_epoch=80 --batch_size=16 --dataset=dota --phase=train
File "main.py", line 6, in
from datasets.dataset_hrsc import HRSC
File "/content/BBAVectors-Oriented-Object-Detection/datasets/dataset_hrsc.py", line 6, in
from .DOTA_devkit.hrsc_evaluation_task1 import voc_eval
ModuleNotFoundError: No module named 'datasets.DOTA_devkit.hrsc_evaluation_task1'
在您3.4中里有写了2*4向量,这个2是怎么理解呢?
一个4向量是obb的[t,r,b,l],那另外一个也是[t,r,b,l]吗?另外一个是什么样的框呢?
Hi, First thanks for sharing your results.
I found your repo a few hours ago.
I'm trying to train my custom datasets.
├─dataset
│ ├─train
│ │ ├─images
│ │ └─labelTxt
│ └─val
│ ├─images
│ └─labelTxt
I checked dataset_dota.py but i don't know exactly.
I just found difficulty in DOTA format but it seems not option for k-fold.
(I am not familiar with the DOTA format. My datasets label format is geojson.)
If not in code, I probably need to write code.
p.s. I recently used efficientDet, yolov5, DETR,
so I have some format_change code except for dota format.
I also checked this point,
is it '--resume' args?
(It's like resume, but I think that it seems like a purpose to learn again in the middle.)
I found that '--resume' and '--dataset' helps are same.
parser.add_argument('--resume', type=str, default='model_44.pth', help='weights to be resumed')
parser.add_argument('--dataset', type=str, default='dota', help='weights to be resumed')
And '--phase' is also same others.
parser.add_argument('--data_dir', type=str, default='../Datasets/dota', help='data directory')
parser.add_argument('--phase', type=str, default='test', help='data directory')
parser.add_argument('--wh_channels', type=int, default=8, help='data directory')
Not long after checking the code, I added it to the issue without making pull requests right away.
If I succeed in using the custom dataset later, I will contribute.
Thanks!
After executive the train command, it report error "RuntimeError: CUDA out of memory. Tried to allocate 182.00 MiB (GPU 0; 7.79 GiB total capacity; 6.52 GiB already allocated; 127.31 MiB free; 69.56 MiB cached)".
模型文件可以放到百度云上一份吗,谷歌网盘下载不了,谢谢啦
@yijingru
Where do you get the training.txt file?
Really Nice Work..
Can you share your pretrained model on DOTA dataset and a corresponding testing script to do inference on single image?
Impressive research!
just one quick question is
If we use a different image size from 608, do we need to change 'down_ratio' for evaluation?
Hello, Thanks for your nice work again!
I also want to adopt CenterNet by just adding an extra angle prediction branch as which mentioned in your paper. For data, I used the same data as BBAVecotrs, except for negative images that do not contain any objects. I changed the backbone from hourglass104 into ResNet101 and upsampling layers as the same as BBAVectors. The losses are just followed the original CenterNet and the weight of angle loss is 0.1. After training for 120 epochs, I got the mAP of 0.62, which is lower than your result of 0.6887.
Did I miss some key steps? Or the negative images are very important to improve the performance?
could you share trained model ?
When the execution the train command, python main.py --data_dir dataPath --epochs 80 --batch_size 16 --dataset dota --phase train, it repoyt an error "main.py: error: unrecognized arguments: --epochs 80".
你好,我将自己的数据做成dota格式后进行训练,这里类别我改成了1类,在测试的时候可视化结果和原图一样,预测的result列表是空的,这是怎么回事呢
作者您好,请问代码有多GPU训练的部分吗?我训练发现默认是1个GPU训练,速度比较慢。不知道是不是我没找到多GPU的设置。望指教。
Hello,
I have trained the model followed by your settings with a batch size of 20 on 4 RTX 2080Ti GPUs. I cropped the images into 600x600 with a stride of 100 using ImgSpit_multi_process.py of the official repo, but only got 54717 images on trainval when preserving negative samples with no objects in them. Finally after 40 epochs of training, I got mAP of 61.95 on test dataset, a little far from 72.32 showed in the paper. Can you help me with that? Besides, I can't got 69377 cropped images of trainval set. Thank you.
can you provide the HRSC2016 dataset download url. The url in HRSC2016 (http://www.escience.cn/people/liuzikun/DataSet.html) can not be found.
Sorry to bother you, I have a question whether the HRSC datasets just resize to 600600 or 608608,or follow the Dota datasets,using splitdata(1) and slitdata(0) with crop size 600*600,stride 100 ,Thank you
您好,我在用您开源的这个模型训练完自己的数据集之后进行测试,发现了一个奇怪的现象:预测目标的置信度普遍很低,分布大概在0.2到0.4左右,然后很多目标都具有完全重叠(检测框的坐标一模一样)的检测框,而完全重叠的这些框显示的类别却不一样,请问这种现象您觉得会是什么原因造成的呢?面对这种情况,请问能给一些建议吗?
ps:目前的做过的第一个尝试是根据置信度来筛选检测框(判定条件为若有完全重叠的检测框,选择置信度最高的那一个),而这样做的结果并不理想,甚至准确度会下降很多;第二个尝试是提高检测的阈值conf_thresh到0.25甚至0.3,但就如前面提到过的那样,预测目标的置信度普遍很低,这样做的结果就会导致许多目标检测不出来。
测试情况:数据集大概为2700张图片,没有做数据增强,训练了大概800个epoch(我觉得已经足够多了哈哈),每张图片分辨率为1024x1024.
Traceback (most recent call last): File "main.py", line 57, in <module> ctrbox_obj.train_network(args) File "/home/px/PycharmProjects/BBAVectors-Oriented-Object-Detection/train.py", line 132, in train_network criterion=criterion) File "/home/px/PycharmProjects/BBAVectors-Oriented-Object-Detection/train.py", line 167, in run_epoch loss = criterion(pr_decs, data_dict) File "/home/px/anaconda3/envs/px-lab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in __call__ result = self.forward(*input, **kwargs) File "/home/px/PycharmProjects/BBAVectors-Oriented-Object-Detection/loss.py", line 115, in forward wh_loss = self.L_wh(pr_decs['wh'], gt_batch['reg_mask'], gt_batch['ind'], gt_batch['wh']) File "/home/px/anaconda3/envs/px-lab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in __call__ result = self.forward(*input, **kwargs) File "/home/px/PycharmProjects/BBAVectors-Oriented-Object-Detection/loss.py", line 68, in forward mask = mask.unsqueeze(2).expand_as(pred).bool() AttributeError: 'Tensor' object has no attribute 'bool'
Thank you for your wonderful work,I was wondering if you can give me the HRSC2016 dataset download link, I can not find the download linke on the Internet. Appreciate!
Impressive research!
just one quick question is
If we use a different image size from 608, do we need to change 'down_ratio' for evaluation?
I have read the code about generating the groud truth,and I visiual the image and plot bl tl tr br points in original image.
I found that the bl point is not always the bottom left. It will change with the change of x,y w,h ,theta.I am wondering if you can help me in this problem.Does it will affct the definition in the paper, I am little confused.
Thanks for you code, I have changed the backbone and train the model, but the error appears as following:
File "BBAVectors-Oriented-Object-Detection-master/train.py", line 211, in run_epoch
for data_dict in data_loader:
File "anaconda3/envs/maskrcnn/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 193, in iter
return _DataLoaderIter(self)
File "anaconda3/envs/maskrcnn/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 469, in init
w.start()
File "anaconda3/envs/maskrcnn/lib/python3.7/multiprocessing/process.py", line 112, in start
self._popen = self._Popen(self)
File "anaconda3/envs/maskrcnn/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "anaconda3/envs/maskrcnn/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "anaconda3/envs/maskrcnn/lib/python3.7/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "anaconda3/envs/maskrcnn/lib/python3.7/multiprocessing/popen_fork.py", line 70, in _launch
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
Could you give some suggestions and have you tried any other backbones ?
Hello, Thanks for your nice work! And I have some problems.
I trained on my own dataset. After some epochs of training, loss would become Nan. I added the minimum in Focalloss, but the wh_loss and off_loss also are Nan and inf. Could you give me some advice. Thanks.
BBAVectors-Oriented-Object-Detection/datasets/dataset_dota.py
Lines 47 to 56 in e070d39
I'm really thank you for your sharing!
I have one question.
Where are the text files for load_img_ids
in dataset_dota.py
?
Since this file was not found, I manually created a file containing path information.
But this causes problems in ResultMerge_multi_process.py
.
I think it is because the file name is different.
In this code, the x and y coordinates are included in the file name., but I can't figure out where to find that information.
How can I solve this issue?
Thank you!
I have install the all environment and download and install the DOTA_devkit,but when I run python main.py --data_dir dataPath --epochs 80 --batch_size 16 --dataset dota --phase train 。This error happend:“ModuleNotFoundError: No module named 'datasets.DOTA_devikit' ”.
could you ask me how to solve this question?
您好,我成功使用了您公开的代码完成了效果复现,效果很好,非常感谢!
我是一名初学者,您论文中通过heatmap找到了物体的中心点,对此我不是理解:
不明白文中heatmap是怎么样生成的(heatmap通道代表类别数情况下,每个通道是通过什么方式使其只生成当前类的物体的heatmap),我在源码中没能找到heatmap的生成代码(可能晚辈能力不够),可否指点一下或者推荐几篇相关论文。
十分感谢!!
bro, what's your pytorch version?
when i try to use your trained-models named as 'model_43.pth' and 'model_50.pth' , error occur.
RuntimeError: version_number <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /pytorch/caffe2/serialize/inline_container.cc:131, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 1. Your PyTorch installation may be too old. (init at /pytorch/caffe2/serialize/inline_container.cc:131)
version of my pytorch is 1.2.0
测试代码进行可视化的时候hrsc的检测结果是平行四边形,而test.py和eval.py的后处理都是一样的,所以计算ap的时候是使用预测的平行四边形和gt在计算ap,是不是有问题
Hi, this is a very enlightening job! Can you help me with my question?
How to ensure that the BBA vectors are pairwise orthogonal in the forward process? For example, the vectors t and r should be orthogonal, or t and b should be reversed. Is it necessary?
你好,请问是否能将您的环境打包成docker镜像呢?这样更易于运行您的工程。
作者你好,这几天使用您分享的模型对自己的数据集进行训练时,发现了一些问题,这里想跟您请教一下:
1.一开始训练时损失下降的很快,但是到80个epoch时,损失大概徘徊在0.7左右下不来了,后面继续训练了200个epoch也还是0.7左右,请问这样算是正常的吗,是否存在模型没收敛的情况呢?
2.在进行测试时,发现对很多目标的预测置信度很低,最高大概只有0.7左右,最低的可能只有0.2,您觉得这可以如何改进呢。
ps:数据集图片数量为2000张,batch_size设置为8(GPU为2块GTX2080TI),conf_thresh设置为0.1,学习率后面训练的时候在原来的基础上乘了百分之一。
我们按照流程对DOTA_devkit工具包进行了编译,但是在训练时,总是出现错误" No module named 'dota_kit'" ,麻烦作者给予解答,谢谢!
Hi, thanks for ur excellent work. What modifications should i made to train on my own dataset?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.