Giter VIP home page Giter VIP logo

bbavectors-oriented-object-detection's People

Contributors

piantic avatar sxj731533730 avatar yijingru 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  avatar  avatar  avatar

bbavectors-oriented-object-detection's Issues

关于测试的问题

你好,我想问一下,你在测试和验证的时候有对图像进行裁剪吗?我用你的代码跑了dota,evaluate的时候,会生成result_data,但是在merge的时候会报错,我看result_data 中生成的文件是merge之后的,所以,你在evaluate的时候有对图像裁剪吗?是使用的原图测试的吗?

ModuleNotFoundError

!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'
er

Is it args for data_path(Train / Validation Set)?

Hi, First thanks for sharing your results.

I found your repo a few hours ago.
I'm trying to train my custom datasets.

  1. How to set Train / Validation data_path?
    I want to split datasets for cross-validation.

├─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.

  1. How to use your pretrained weights?

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.)

  1. Some wrong help in parser

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!

RuntimeError: CUDA out of memory.

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)".

question about evaluate

When I evaluate the model by phase eva , a error is occured.Could you help me to solve it ?
And I want to ask you how to calculate the ap or map?
Thank you,Best wish
图片

Pre Trained model?

Really Nice Work..
Can you share your pretrained model on DOTA dataset and a corresponding testing script to do inference on single image?

image resizing case

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?

About original CenterNet performance on DOTA

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?

nan loss

When I train the model on the DOTA dataset, the value of "hm loss" is NAN after 40 epochs. Do you know what is wrong?
image

And where can I find the "hrsc_evaluation_task1" file referred in the dataset_hrsc.py?
Thank you,Best wish.

main.py: error: unrecognized arguments: --epochs 80

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训练

作者您好,请问代码有多GPU训练的部分吗?我训练发现默认是1个GPU训练,速度比较慢。不知道是不是我没找到多GPU的设置。望指教。

DOTA v1.0 test results achieved 0.620, a little far from 0.723

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.

How to generate HRSC datasets

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.
3
4

我在训练的过程中遇到了AttributeError: 'Tensor' object has no attribute 'bool'

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'

HRSC2016 download link

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!

image resizing

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?

About bl tl tr br return by cv2.points

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.

change the backbone and the training is terminated in the process

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 ?

About Loss NaN

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.

Where are the text files for load_img_ids in dataset_dota.py?

def load_img_ids(self):
if self.phase == 'train':
image_set_index_file = os.path.join(self.data_dir, 'trainval.txt')
else:
image_set_index_file = os.path.join(self.data_dir, self.phase + '.txt')
assert os.path.exists(image_set_index_file), 'Path does not exist: {}'.format(image_set_index_file)
with open(image_set_index_file, 'r') as f:
lines = f.readlines()
image_lists = [line.strip() for line in lines]
return image_lists

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!

ModuleNotFoundError

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),我在源码中没能找到heatmap的生成代码(可能晚辈能力不够),可否指点一下或者推荐几篇相关论文。

十分感谢!!

About parameter settings

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 AP的计算

测试代码进行可视化的时候hrsc的检测结果是平行四边形,而test.py和eval.py的后处理都是一样的,所以计算ap的时候是使用预测的平行四边形和gt在计算ap,是不是有问题

训练自己的数据集,很多目标预测置信度很低

作者你好,这几天使用您分享的模型对自己的数据集进行训练时,发现了一些问题,这里想跟您请教一下:
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,学习率后面训练的时候在原来的基础上乘了百分之一。

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.