Git Product home page Git Product logo

ssd-tensorflow's Introduction

SSD-Tensorflow

声明:

更详细的代码解读Tensorflow实现SSD.
欢迎关注我的知乎.

运行环境:

Python3 + Tensorflow1.5 + OpenCV-python3.3.1 + Numpy1.13
windows和ubuntu环境都可以

准备工作:

请在SSD检测模型下载模型,并放到SSD_model文件夹下

文件说明:

1、ssd300_vgg.py:搭建ssd300网络模型,并解码网络输出

·ssd_layers.py:SSD中各种网络层的定义
·ssd_anchors.py:SSD的先验框anchor设置,与Caffe源码保持一致

2、utils.py:功能函数:

(1)预处理图片:白化、resize300x300、增加batchsize这一维度
(2)处理/筛选边界框:
·将边界框超出图片范围(0,0)-(300,300)的部分cut掉;
·按类别置信度scores降序,对边界框进行排序并仅保留top_k=400;
·计算IOU->采用NMS;
·还原相对原图片的边界框真实位置和大小.

3、drawbox.py:可视化最后的检测结果

4、Main.py:SSD主函数:

(1)搭建网络,解码网络输出并设置阈值去除得分低于阈值的边界框,得到边界框的类别、得分、位置大小
(2)导入训练好的SSD模型
(3)预处理图片-->处理/筛选边界框
(4)可视化最后的检测结果

5、SSD_data文件夹:

包含待检测输入图片car.jpg、检测后的输出图片detection.jpg、ssd_300_vgg网络各个层的名称var_name.txt

运行Main.py即可得到效果图:

1、car.jpg:输入的待检测图片

image

2、detection.jpg:检测结果可视化

image

ssd-tensorflow's People

Contributors

kod-chen 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

ssd-tensorflow's Issues

good code

代码简洁明了,逻辑清楚,没有一句多余的代码,而且还有注释,实属良心之作!

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.