Git Product home page Git Product logo

timmmgz / bounding-box-regression-gui Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 3.0 5.61 MB

This program shows how Bounding-Box-Regression works in a visual form. Intersection over Union ( IOU ), Non Maximum Suppression ( NMS ), Object detection, 边框回归,边框回归可视化,交并比,非极大值抑制,目标检测。

Java 100.00%
bounding-box-regression predicted-boxes nms mnist bounding-box neural-network object-detection iou intersection-over-union

bounding-box-regression-gui's Introduction

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

image

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:
    image

  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:
    image

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:
image

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) image 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. image

bounding-box-regression-gui's People

Contributors

timmmgz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.