Giter Club home page Giter Club logo

ryolov3research-pytorch-master's Introduction

An oriented bounding boxes implement of YOLOv3 with SEnet , Deformable Convolution and rotated NMS written in CUDA.

enviroment: ubuntu16.04 pytorch1.1

requirement: numpy opencv matplotlib tensorboardX shapely

install:

cd ./yolo/nms

python setup.py build_ext --inplace

usage:

1.make your own dataset by labeImage https://github.com/woshiwwwppp/ryolov3research-pytorch-master/blob/master/labelImg.exe

2.use generate_data.py to get label file

3.set the parameter in object_classes_all.txt and config.py

3.use train.py to train

image

ryolov3research-pytorch-master's People

Contributors

woshiwwwppp 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

Watchers

 avatar  avatar  avatar

ryolov3research-pytorch-master's Issues

跑程序的问题

很佩服您的代码能力,这么麻烦的程序写的很随性漂亮。真的很厉害!!(膜拜大佬)
最近想跑一下程序检测斜框目标,有几个疑问想请教一下:

  1. valid的一个bug:

    out_box, out_score, out_class = convert_yolo_outputs(out_puts, input_shape, ratio, anchors,
    classes, confidence, NMS, CUDA=True)
    for k, v in enumerate(val_lines[step * batch_size:(step + 1) * batch_size]):
    gt_boxes = []
    gt_classes = []
    for gt in v.strip().split(' ')[1:]:
    gt_boxes.append(list(map(float, gt.split(',')[:-1])))
    gt_classes.append(classes[int(gt.split(',')[-1].strip())])
    out_classes = out_class[k]
    out_boxes = out_box[k]
    # 计算ap
    for i in range(len(out_classes)):
    for j in range(len(gt_classes)):
    if rbox_iou(gt_boxes[j], out_boxes[i]) > matchIou and gt_classes[j] == out_classes[i]:
    precision[out_classes[i]].append(1)
    break
    上面代码处out_box的维度是(num_boxes,5),但是后面遍历batch内图像时out_boxes = out_box[k]只取出一个box;导致计算AP遍历时的下面这句报错:
    if rbox_iou(gt_boxes[j], out_boxes[i]) > matchIou and gt_classes[j] == out_classes[i]:
    因为out_boxes[i]是取出上面那个box的第一个坐标信息的标量,无法传入rbox_iou计算iou。不知道是不是我哪里的理解有误...==

  2. 速度
    riou实现用的是shapely,没有cuda计算overlap,会不会检测的速度很慢?我自己写的斜框检测奇慢无比,请问大佬有用cuda试着加速嘛

  3. test检测报错
    注释掉eval的部分直接训练2000epoch,让程序过拟合一张图片,得到的权重用test.py进行检测,报错如下:

Traceback (most recent call last):
  File "test.py", line 40, in <module>
    classes,confidence = config.dataSet['confidence'],NMS = config.dataSet['NMS'],CUDA= True)
  File "/py/ryolo/yolo/utility.py", line 230, in convert_yolo_outputs
    cla_id = torch.argmax(res[:,6:],dim=1)
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

将conf阈值设置为0.002才能跳过这个错误,似乎是2k轮都没学到东西....
然后在此基础上,继续检测得到这里的bug:

for i,box in enumerate(out_boxes):
label = out_classes[0][i]

报错是IndexError: string index out of range,因为我是单类目标检测label都是ship,out_classes[0]='ship',进而out_classes[0][i]索引的有误了,请问这个是不是我的设置有问题导致的?

  1. 检测结果
    避开上述问题,在输出侧将label直接赋值为'sihp',训练3000epoches,loss基本下降到0附近不变,但是检测的结果都丢了:(我的anchor设置就是按照gt的尺寸设的,理论上不怎么回归就能达到极小值,角度也按大佬的设置为0-pi)
    pic_screenshot_16 11 2019

  2. 模型可视化
    train.py中用您提供的tensorboardX接口记录计算图模型时报错:

  File "train.py", line 97, in <module>
    w.add_graph(yolo, (dummy_input,))
  File "/home/bit530/anaconda3/envs/torch1.1/lib/python3.7/site-packages/tensorboardX/writer.py", line 738, in add_graph
    self._get_file_writer().add_graph(graph(model, input_to_model, verbose, **kwargs))
  File "/home/bit530/anaconda3/envs/torch1.1/lib/python3.7/site-packages/tensorboardX/writer.py", line 138, in add_graph
    graph = graph_profile[0]
TypeError: 'GraphDef' object is not subscriptable

上面五个问题希望能帮忙解答,因为想先用起来再慢慢看程序,所以有的地方还不是很明白,感谢解答~~

weights path?

which weights path is used here and could you please add more information on training I am not able to train.

DCN

你好,我想文艺下DCN是如何加入到网络结构的 如果检测的话 要跑哪个代码呢

在install的时候出现了错误导致安装不成功

dalao你好,上周我在使用你推荐的命令进行安装时,cmd中出现了以下错误:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include\crt/host_config.h(143): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions between 2013 and 2017 (inclusive) are supported!
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\nvcc.exe' failed with exit status 2
翻译了一下大概就是yolo不支持vs2019,之前我在编译darknet的时候也出现过这个问题,通过修改2019添加vs2015的工具箱成功编译了。但是对于dalao的这个repo,不知道在命令行中如何解决,如果dalao有空的话,希望可以告诉我一下解决方案~

预训练模型

请问该项目是否使用了预训练模型?或者作者能否分享一下训练好的weights呢,想做迁移学习用。。

生成label文件

将xml文件转换成txt文件时,小白不太明白下面这段程序的意图,您能否帮我解答一下?
image

win7打开图片会报错

image
请问一下这是什么原因呢,之前在win10上一点问题都没有,cgvict项目中的issue也有类似的问题,是不是原先作者就没打算要兼容win7呢

labelImg打不开图片

图片时jpg格式的,用这个标注工具打不开,如何操作可以实现标注呢?

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.