Coder Social home page Coder Social logo

hslol / rotation-retinanet-pytorch Goto Github PK

View Code? Open in Web Editor NEW
56.0 1.0 6.0 2.94 MB

A Rotation RetinaNet Pytorch Implementation on HRSC and SSDD Dataset.

Python 94.92% Makefile 0.03% Cython 5.04%
rotation rotation-detection retinanet object-detection sensing-images

rotation-retinanet-pytorch's Introduction

Hi, I'm Zhonghao Fang. 👋

  • 😄 I’m currently working on Horizontal and Oriented Object Detection Based on Remote Sensing Images.
  • 🔭 I’m currently focusing on BEV Perceptron and Occupancy Netowrk in Auto Driving.
  • 📫 How to reach me: [email protected].
  • ✨ HomePage: https://hslol.github.io/

HsLoL's GitHub stats

Top Langs

rotation-retinanet-pytorch's People

Contributors

hslol 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

Watchers

 avatar

rotation-retinanet-pytorch's Issues

ssdd 精度问题

博主你好,我在mmrotate上实验ssdd,发现map只能到80,而我看你的实验可以到84以上,想问一下你的实验和mmrotate里面的retina有什么区别吗

make 文件问题

博主你好,请问执行完make指令后,运行训练脚本仍然提示ModuleNotFoundError: No module named 'utils.rotation_overlaps.rbox_overlaps'该如何解决呢。

cpu运行问题

你好博主,可以在cpu上训练吗,如何调整,如果可以的话能否增添更新代码

horizontal_overlaps计算是否存在问题?

您好,看了您的代码,非常适合初学者读。这里有一个问题请教,网络产生的anchor是 [xc, yc, w, h, angle]的形式,由于gt也是 [xc, yc, w, h, angle]的形式,所以在计算horizontal_overlaps 的时候您将gt通过obb2hbb_oc转成了hbb的形式,但是anchor并没有转啊,这怎么求horizontal_overlaps的呢?

horizontal_overlaps = bbox_overlaps(
anchor.clone(), # generate anchor data copy
obb2hbb_oc(bbox_annotation[:, :-1]))

我理解应该是
horizontal_overlaps = bbox_overlaps(
obb2hbb_oc(anchor.clone()), # generate anchor data copy
obb2hbb_oc(bbox_annotation[:, :-1]))
请问我的理解是否存在偏差?

对poly2obb_np_oc注释的疑问

您好,感谢您的代码.我在自己的机器上跑通了您的代码,并且效果很好.学习您的代码过程中,我有一个小问题.
您的代码中poly2obb_np_oc是这样写的


def poly2obb_np_oc(poly):
    """ Modified !!
    Convert polygons to oriented bounding boxes.
    Args:
        polys (ndarray): [x0,y0,x1,y1,x2,y2,x3,y3]
    Returns:
        obbs (ndarray): [x_ctr,y_ctr,w,h,angle] modified -> [x_ctr, y_ctr, h, w, angle(radian)]
    """
    bboxps = np.array(poly).reshape((4, 2))
    rbbox = cv2.minAreaRect(bboxps)
    x, y, h, w, a = rbbox[0][0], rbbox[0][1], rbbox[1][0], rbbox[1][1], rbbox[2]
    # assert 0 < a <= 90, f'error from poly2obb_np_oc function.'
    if w < 2 or h < 2:
        return
    while not 0 < a <= 90:
        if a == -90:
            a += 180
        else:
            a += 90
            w, h = h, w
    a = a / 180 * np.pi
    assert 0 < a <= np.pi / 2
    return x, y, h, w, a

在cv2.__version__为4.5.5的环境中,我进行了测试.我认为
x, y, h, w, a = rbbox[0][0], rbbox[0][1], rbbox[1][0], rbbox[1][1], rbbox[2]
应该为
x, y, w, h, a = rbbox[0][0], rbbox[0][1], rbbox[1][0], rbbox[1][1], rbbox[2]
即w应该为rbbox[1][0],h应该为rbbox[1][1].并且,我在mmrotate上找到同样的函数


def poly2obb_np_oc(poly):
    """Convert polygons to oriented bounding boxes.
    Args:
        polys (ndarray): [x0,y0,x1,y1,x2,y2,x3,y3]
    Returns:
        obbs (ndarray): [x_ctr,y_ctr,w,h,angle]
    """
    bboxps = np.array(poly).reshape((4, 2))
    rbbox = cv2.minAreaRect(bboxps)
    x, y, w, h, a = rbbox[0][0], rbbox[0][1], rbbox[1][0], rbbox[1][1], rbbox[
        2]
    if w < 2 or h < 2:
        return
    while not 0 < a <= 90:
        if a == -90:
            a += 180
        else:
            a += 90
            w, h = h, w
    a = a / 180 * np.pi
    assert 0 < a <= np.pi / 2
    return x, y, w, h, a

mmrotate该函数实现
所以我很困惑您注释中的
obbs (ndarray): [x_ctr,y_ctr,w,h,angle] modified -> [x_ctr, y_ctr, h, w, angle(radian)].

How to predict multi-scale outputs?

Really appreciate your work. In your code, RetinaNet only predict a single scale bbox, so how to design a multi-scale output (like YOLO series)? I am actually concerned about how to code about loss and decoder in models/model.py.

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.