Git Product home page Git Product logo

drn_cvpr2020's Introduction

DRN and SKU110K-R

Xingjia Pan, Yuqiang Ren, Kekai Sheng, Weiming Dong, Haolei Yuan, Xiaowei Guo, Chongyang Ma, Changsheng Xu

Work in process.

Dynamic Refinement Network for Oriented and Densely Packed Object Detection[Paper Link]

Figure 1. Overall framework of our Dynamic Refinement Network. The backbone network is followed by two modules, i.e., feature selection module (FSM) and dynamic refinement heads (DRHs). FSM selects the most suitable features by adaptively adjusting receptive fields. The DRHs dynamically refine the predictions in an object-aware manner.

SKU110K-R

Figure 2. Some sample images from SKU110K. The images in top row are annotated with horizontal bounding boxes while the images in bottom row are with oriented bounding boxes.

To use SKU110K-R,

  1. Download the original SKU110K data set from website and extract images

  2. Generate SKU110K-R using our rotate augment script

   python rotate_augment.py path/to/images
  1. Download the annotations for SKU110K-R from website

The annotation is in coco format.

Evaluation tools

cocoapi_ro

we provide a variant of cocoapi for evaluation of rotated bounding boxes.

  1. Install cocoapi_ro(similar with cocoapi)
   cd PythonAPi
   make
  1. Replace pycocotools with pycocotools_ro

FROM

   import pycocotools.coco as coco
   from pycocotools.cocoeval import COCOeval

TO

   import pycocotools_ro.coco as coco
   from pycocotools_ro.cocoeval import COCOeval
  1. Update the evaluation code.

FROM

   coco_eval = COCOeval(self.coco, coco_dets, "bbox")

TO

   coco_eval = COCOeval(self.coco, coco_dets, "rbbox")
   coco_eval.params.maxDets = [1, 10, 300]

angle_nms

we provide angle_nms for nms of rotated bounding box in post process.

   from angle_nms.angle_soft_nms import angle_soft_nms
   # Example
   result_after_nms = angle_soft_nms(all_dets, Nt=0.5, method=1,threshold=0.05)
   # all_dets: detection results
   # Nt: iou threshold 
   # method: 1, linear soft nms; 2, gaussian soft nms; other, nms
   # threshold: the minimum confidence valu to retain the detection bbox

Rotation Conv Layer

  1. To use the rotation conv layer, you need to install dcn_v2 first,
    # git clone -b pytorch_1.0.0 https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch.git
    # mv Deformable-Convolution-V2-PyTorch DCNv2
    cd DCNv2
    ./make.sh
  1. Then you need to modify the import path of dcnv2 in rotation_conv_utils.py.
from path\to\DCNv1.modules.modulated_deform_conv import ModulatedDeformConv
from path\to\DCNv2.functions.modulated_deform_conv_func import ModulatedDeformConvFunction

  1. We provide a simple example to use the rotation conv layer in test_rcl.py.

Citation

If you find this project useful for your research, please use the following BibTeX entry.

@article{pan2020dynamic,
  title={Dynamic Refinement Network for Oriented and Densely Packed Object Detection},
  author={Xingjia Pan and Yuqiang Ren and Kekai Sheng and Weiming Dong and Haolei Yuan and Xiaowei Guo and Chongyang Ma and Changsheng Xu},
  booktitle={CVPR},
  pages={1--8},
  year={2020}
}

Contacts

If you have any questions about our work, please do not hesitate to contact us by emails.
Xingjia Pan: [email protected]
Yuqiang Ren: [email protected]

drn_cvpr2020's People

Contributors

anymake avatar panxjia 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drn_cvpr2020's Issues

Could you share the SKU110K-R dataset?

Hello.
I want to conduct an experiment on the SKU110K-R dataset.

Could you share the SKU100K-R dataset which contains annotations for oriented bounding box?

python rotate_augment.py path/to/images?

python rotate_augment.py '/home/hs/hao/data/SKU-110K/SKU110K_fixed/images'
Premature end of JPEG file
Premature end of JPEG file
Corrupt JPEG data: premature end of data segment
Premature end of JPEG file
Premature end of JPEG file

What is it about?
Hope to get your reply

已放出的这部分代码与论文中是否存在一定出入?

代码中在FSM模块中的attention map似乎与论文中有一定出入?论文中的attention map Ai维度是HW1,并且是在得到attention map后再concat+softmax; 而代码中先将三个分支相加,然后通过AdaptiveAvgPool2d使attention map的H和W维度均变为了1(这样看的话似乎论文中是空间注意力而代码中是通道注意力?)。不知我的理解是否有误?

What is the specific structure of Gc

In the paper,you said that the Gc represents the dynamic filter generator and Kc are the learned example-wise kernel weights. So can you explain the specific structure of Gc? Thank you.

How to train this model?

Hi, Pan! It seems does not contain the complete steps about how to train this model. Could you describe these steps in readme?

Feature Selection Module

大家有人跑了这个模块吗,我遇到一个问题AttributeError: 'NoneType' object has no attribute 'data',应该是反向传播时梯度更新的问题,请问怎样解决。

When can you publish the code?

First of all, thank you for your excellent work! I am also engaged in the direction of target detection. I am very interested in your article. When can you publish the code? Best wishes to you!

the number of train epoch

thank you for your excellent work!
I am using you FSM in my object. I have a question that whether your method need more epoch to fit data. As you mentioned in your article, in DOTA and HRSC2016, your need 140 epochs to train.
thank for your reply

full code

Can you source the full code, includeing training and testing.

COCO-fashion evaluation code for oriented objects

Hello.

I want to evaluate the performance of an oriented object in COCO fashion.

I heard you evaluate the performance of the SKU110K-R dataset in the same way as COCO.

Did you calculate rotated IoU for performance evaluation?

Also, could you share the COCO-style evaluation code for rotated objects?

I look forward to your answer.

question about conf_thresh

How much did you get conf_thresh when validating the test set? 0.1?
This threshold has an influence on the detection results, so I would like to ask what threshold is usually used in your own experiments and the comparative tests you do.

Centrernet training dota data set

你好,我看你的论文中DOTA数据集测试的结果中,有一个baseline用的是centernet网络吧,你是怎么计算obb的结果?
还想问下你是怎么centernet训练到65.04的?能给下的你训练的配置吗?谢谢了!

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.