人工智能目标检测:边框回归

栏目: IT技术 · 发布时间: 4年前

内容简介:This program shows how Bounding-Box-Regression works in a visual form.I am going to modify the above program in my free time, add this Bounding Box Regression along with ROI Align layer(

Bounding-Box-Regression-GUI

This program shows how Bounding-Box-Regression works in a visual form.

Updating soon for Digit-Recognition-CNN-and-ANN-using-Mnist-with-GUI

https://github.com/timmmGZ/Digit-Recognition-CNN-and-ANN-using-Mnist-with-GUI

I am going to modify the above program in my free time, add this Bounding Box Regression along with ROI Align layer( https://github.com/timmmGZ/ROIAlign-Bounding-Box-ROI-Align-of-Mask-RCNN-GUI ) in it, make it become a MNIST object detection.

First of all, Let's see how it works

人工智能目标检测:边框回归

Predefine

Download the MNIST digit 60000 train set and 10000 test set here:

https://drive.google.com/open?id=1VwABcxX0DaQakPpHbMaRQJHlJf3mVONf
  1. Put both files to ../dataset/, and then go to "tool" package.

  2. Run the "CreatePictureForObjectDetectionFromMNIST.java", it will create random pictures base on MNIST datasets in ../dataset/pictures.

  3. After step 2, run the "CreateForeOrBackgroundSample.java", it will create random foreground(in ../dataset/foreground) and background(in ../dataset/background) datasets based on output pictures of step 2, you could see it more clearly in ../dataset/groundTruthExamples.

    as below:

    人工智能目标检测:边框回归
  4. Both step 2 and 3 will create Label-files in ../dataset/standardOutput, you could see the column names in first line of each Label-files

  5. Make sure you have big enough RAM if you want to store more datasets in RAM, watch below picture:

    人工智能目标检测:边框回归

Start

Run the MainFrame.java, if you don't want to train the model, click "Menu" then "Read Weight", that is my trained weights around 94% accuracy on both train and test set(70000 datasets in total, I define it is true prediction if Predicted-Bounding-Box has higher IOU with Ground-Truth-Bounding-Box than it has with input Bounding-Box).

Warning

Actually the number of predicted boxes should = the number of classes(e.g. one Bounding-Box can have both Apple and Bird inside it), but this program is just a Digit-Detection, for convenience and higher FPS in real-time detection, I make it have only one predicted box, see the advantage of having normal number of predicted boxes as below picture:

人工智能目标检测:边框回归

Bounding-Box-Regression is used after NMS(Non Maximum Suppression)

For each picture, we will get so many Bounding-Box(Region-Propasal), NMS is used for filtering out the best Bounding-Boxes, below gif shows what will look like if we only use ROI-Align-layer(not necessary but better use it) and NMS but not use Bounding-Box-Regression:

Predefine about ROI-Align-layer: sample size=1, output size=7, feature maps=16( https://github.com/timmmGZ/ROIAlign-Bounding-Box-ROI-Align-of-Mask-RCNN-GUI ) 人工智能目标检测:边框回归 Let's cut one picture from the gif, when the object is small like below picture, and the number of objects is big, obviously we need to do Bounding-Box-Regression, or it will be a mess. 人工智能目标检测:边框回归


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

树莓派学习指南

树莓派学习指南

[英]Peter Membrey、[澳]David Hows / 张志博、孙峻文 / 人民邮电出版社 / 2014-4 / 49.00元

树莓派(Raspberry Pi)是一款基于Linux系统的、只有一张信用卡大小的卡片式计算机。由于功能强大、性能出色、价格便宜等特点,树莓派得到了计算机硬件爱好者以及教育界的欢迎,风靡一时。 《树莓派学习指南(基于Linux)》是学习在树莓派上基于Linux进行开发的一本实践指南。全书共3个部分11章,第一部分是前两章,讲述如何设置和运行图形用户界面(GUI)。第二部分是第3章到第7章,讲......一起来看看 《树莓派学习指南》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试