All Projects → stevenobadja → Math_object_detection

stevenobadja / Math_object_detection

An image recognition/object detection model that detects handwritten digits and simple math operators. The output of the predicted objects (numbers & math operators) is then evaluated and solved.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Math object detection

Tensorflow-Wide-Deep-Local-Prediction
This project demonstrates how to run and save predictions locally using exported tensorflow estimator model
Stars: ✭ 28 (-46.15%)
Mutual labels:  tensorflow-tutorials, tensorflow-experiments, tensorflow-models, tensorflow-examples
TensorFlow-Multiclass-Image-Classification-using-CNN-s
Balanced Multiclass Image Classification with TensorFlow on Python.
Stars: ✭ 57 (+9.62%)
Mutual labels:  tensorflow-tutorials, tensorflow-experiments, tensorflow-models
Yolov3 Tf2
YoloV3 Implemented in Tensorflow 2.0
Stars: ✭ 2,327 (+4375%)
Mutual labels:  object-detection, tensorflow-tutorials, tensorflow-examples
Dog-or-Cat-TensorflowSharp-Example
An example for TensorflowSharp - classify an image as a dog or cat.
Stars: ✭ 15 (-71.15%)
Mutual labels:  tensorflow-tutorials, tensorflow-experiments, tensorflow-examples
Tf Object Detection
Simpler app for tensorflow object detection API
Stars: ✭ 91 (+75%)
Mutual labels:  object-detection, tensorflow-models, tensorflow-examples
Efficientdet.pytorch
Implementation EfficientDet: Scalable and Efficient Object Detection in PyTorch
Stars: ✭ 1,383 (+2559.62%)
Mutual labels:  object-detection, coco, detection
Awesome-Tensorflow2
基于Tensorflow2开发的优秀扩展包及项目
Stars: ✭ 45 (-13.46%)
Mutual labels:  tensorflow-experiments, tensorflow-models, tensorflow-examples
Free Tensorflow
Tensorflow 免费中文视频教程,开源代码,免费书籍.
Stars: ✭ 83 (+59.62%)
Mutual labels:  tensorflow-tutorials, tensorflow-models, tensorflow-examples
Android-Machine-Learning-With-TensorFlow
Tensor Flow implementation for Android
Stars: ✭ 17 (-67.31%)
Mutual labels:  tensorflow-experiments, tensorflow-models, tensorflow-examples
Foveabox
FoveaBox: Beyond Anchor-based Object Detector
Stars: ✭ 353 (+578.85%)
Mutual labels:  object-detection, coco, detection
Letslearnai.github.io
Lets Learn AI
Stars: ✭ 33 (-36.54%)
Mutual labels:  tensorflow-tutorials, tensorflow-models, tensorflow-examples
Ml Classifier Ui
A UI tool for quickly training image classifiers in the browser
Stars: ✭ 224 (+330.77%)
Mutual labels:  tensorflow-tutorials, tensorflow-examples, tensorflow-experiments
Androidtensorflowmachinelearningexample
Android TensorFlow MachineLearning Example (Building TensorFlow for Android)
Stars: ✭ 1,369 (+2532.69%)
Mutual labels:  tensorflow-tutorials, tensorflow-models, tensorflow-examples
Tensorflow Object Detection Tutorial
The purpose of this tutorial is to learn how to install and prepare TensorFlow framework to train your own convolutional neural network object detection classifier for multiple objects, starting from scratch
Stars: ✭ 113 (+117.31%)
Mutual labels:  object-detection, tensorflow-models, detection
Ml Classifier
A tool for quickly training image classifiers in the browser
Stars: ✭ 97 (+86.54%)
Mutual labels:  tensorflow-tutorials, tensorflow-examples, tensorflow-experiments
Age-Gender Estimation TF-Android
Age + Gender Estimation on Android with TensorFlow Lite
Stars: ✭ 34 (-34.62%)
Mutual labels:  tensorflow-experiments, tensorflow-models, tensorflow-examples
Tensorflow Sentiment Analysis On Amazon Reviews Data
Implementing different RNN models (LSTM,GRU) & Convolution models (Conv1D, Conv2D) on a subset of Amazon Reviews data with TensorFlow on Python 3. A sentiment analysis project.
Stars: ✭ 34 (-34.62%)
Mutual labels:  tensorflow-tutorials, tensorflow-examples, tensorflow-experiments
Tensorlayer Tricks
How to use TensorLayer
Stars: ✭ 357 (+586.54%)
Mutual labels:  tensorflow-tutorials, tensorflow-models, tensorflow-experiments
Tensorflow Serving sidecar
Serve machine learning models using tensorflow serving
Stars: ✭ 41 (-21.15%)
Mutual labels:  object-detection, tensorflow-tutorials, coco
Tensorflow 2.x Tutorials
TensorFlow 2.x version's Tutorials and Examples, including CNN, RNN, GAN, Auto-Encoders, FasterRCNN, GPT, BERT examples, etc. TF 2.0版入门实例代码,实战教程。
Stars: ✭ 6,088 (+11607.69%)
Mutual labels:  tensorflow-tutorials, tensorflow-examples

Math Operators Object Detection (Video Demo)

Test 1 - Simple Math Problems

Custom Math Operators TensorFlow Object Detection - Test 1

Test 2 - Linear Algebra

Linear Algebra TensorFlow Object Detection - Test 2

Utilizing TensorFlow Object Detection API open source framework makes it feasible to construct, train and deploy a custom object detection model with ease. The detection model shown above uses TensorFlow's API and detects handwritten digits and simple math operators. In addition, the output of the predicted objects (numbers & math operators) are then evaluated and solved. Currently, the model created above is limited to basic math and linear algebra.

Model

Powered by: Tensorflow

Model: ssd_mobilenet_v1_coco_2017_11_17
Config: ssd_mobilenet_v1_coco

SSD Mobilenet Architecture

SSD Mobilenet Architecture

  • Convolution Neural network - The convolutional layer is the core building block of a CNN. The layer's parameters consist of a set of learnable filters (or kernels), which have a small receptive field, but extend through the full depth of the input volume. During the forward pass, each filter is convolved across the width and height of the input volume, computing the dot product between the entries of the filter and the input and producing a 2-dimensional activation map of that filter. As a result, the network learns filters that activate when it detects some specific type of feature at some spatial position in the input. (Source: Wikipedia)

  • Batch Normalization - Batch normalization potentially helps in two ways: faster learning and higher overall accuracy. The improved method also allows you to use a higher learning rate, potentially providing another boost in speed. Normalization (shifting inputs to zero-mean and unit variance) is often used as a pre-processing step to make the data comparable across features. As the data flows through a deep network, the weights and parameters adjust those values, sometimes making the data too big or too small again - "internal covariate shift". By normalizing the data in each mini-batch, this problem is largely avoided. (Source: Derek Chan ~ Quora)

  • Rectified linear unit or (ReLU) - ReLu is an activation function. In biologically inspired neural networks, the activation function is usually an abstraction representing the rate of action potential firing in the cell. In its simplest form, this function is binary—that is, either the neuron is firing or not. ReLU is half rectified from the bottom. It is f(s) is zero when z is less than zero and f(z) is equal to z when z is above or equal to zero. With a range of 0 to infinity. (Source: Towards Data Science)

Batch Normalization

ReLu

Summary of training this model

Step 1:

Create an image library - The pre-existing ssd_mobilenet_v1_coco model was trained with a custom, created from scratch, image library (of math numbers & operators). This image library can be substituted with any object or objects of choice. Due to the constraint of time, the model above was trained on a total of 345 images of which 10% was allocated for test validation.

train image

Step 2:

Box & label each class - In order to train and test the model, TensorFlow requires that a box is drawn for each class. To be more specific, it needs the X and Y axis (ymin, xmin, ymax, xmax) of the box in relation to the image. These coordinates is then respectively divided by the lenght or width of the image and is stored as a float. An example of the process is shown below. (Note: the current model contains 23 classes) Thanks to tzutalin tzutalin, labelImg, with the creation of GUI that makes this process easy.

Box Process

Step 3:

Convert files - Once the labeling process is complete the folder will be full with XML files, however this cannot be used yet by TensorFlow for training and testing. Instead the XML files needs to be converted into a CSV file. Then the CSV file will then be converted to tfrecords file for training.

Step 4:

Create pbtxt - Create a pbtxt file by creating ID's and Name (labels) for each class. This file will be used with the finished model as an category_index.

Step 5:

Train the model - (See model above)
Summary: input layer --> 3x3 CNN --> batch normalization --> activation function: ReLu --> 1x1 CNN --> batch normalization --> activation function: ReLu --> output layer.

After the output layer, it compares the output to the intended output --> cost function (weighted_sigmoid) --> optimization function (optimizer) --> minimize cost (rms_prop_optimizer, learning rate = 0.004)

1 cycle of summary above = 1 Global Step

Global Step

This process requires heavy computing power, due to the constraints of hardware (CPU only), it took approximately 4 days & 7 hours to complete 50k Global Step.

Duration

Graph

Step 6:

Export inference graph - Once a model is trained with an acceptable loss rate. It is stopped by the user manually. As the model is being trained it is creates a checkpoint file after each set milestone. This checkpoint file is then converted into an inference graph which is used for deployment/serving.

Source & Support Files

Google's object detection (Link)

Will contain:

  • train.py
  • export_inference_graph.py
  • All other support docs...

Tensorflow detection model zoo (Link)

Will contain:

  • ssd_mobilenet_v1_coco_2017_11_17 (model used for this demo)
  • All other models released by Tensorflow...

Tensorflow config files (Link)

Will contain:

  • ssd_mobilenet_v1_coco (config used for this demo)
  • All other configs released by Tensorflow...

Racoon's object detection (Link)

Will contain:

  • xml_to_csv.py
  • generate_tfrecord.py

Label images with labelImg (Link)

Will contain:

  • labelImg.py

Special Thanks!

To Harrison Kinsley (Sentdex)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].