Our OpenCV Framework has got several APIs to execute Caffe2, Tensorflow, OpenVINO Models, etc.

OpenCV provides a unified API to test the accuracy of video inference, accuracy of deep learning models, benchmarking the desired app as well as testing the performance of the model in terms of:

GFlops and Mb of the model data

Caffe2 Model (.caffemodel) consists of model weights and the entire blob memory which is output from the OpenCV API.

Please go through this critical code.

import cv2weights = self.find_dnn_file("dnn/{caffemodel name}.caffemodel", required=False)config = self.find_dnn_file("dnn/{prototxt name}.prototxt", required=False)if weights is None or config is None:


Introduction

When converting the model, upon ending up with UserObjects error, the tensorflow side of the conversion detects that the Custom Ops have not been implemented in the ONNX conversion model meta description.

Our usual method for conversion is to follow the command line utility tf2onnx.convert

This must be avoided!!!!!!

The Way Out

Follow the tutorial to convert the Tensorflow model into ONNX which is described in: @tf2onnx

python -m tf2onnx.convert --saved-model tensorflow-model-path --output model.onnx

The Custom Ops

Using the Custom Ops requires trial and error method of converting the model.

First, try in the command line option.

Command Line Option

python -m tf2onnx.convert --saved-model tensorflow-model-path --output model.onnx --extra-ops 'ai.onnx.contrib:1'


Learn Machine Learning Algorithms

OLS Regression

Regression technique is explained by Setosa visually in Explained Visually. We do know OLS technique but the intricacies of the algorithm has been explained here in later sections. The OLS technique has been comparatively presented in this article, Linear Regression Simplified — Ordinary Least Square vs Gradient Descent.

In the above article, one considers the formulaic representation of Ordinary Least Squares (OLS) and explains it against it’s Gradient Descent (SGD) Implementation. OLS Regression is used in many problems of analysis varying from Determination of Positions of Galaxies by the velocity observed to Determination of House Prices by Room size and…


Enron Fall of Wall Street Darling

Introduction

Enron Corporation was an American energy, commodities, and services company based in Houston, Texas. It was founded by Kenneth Lay in 1985 as a merger between Lay’s Houston Natural Gas and InterNorth, both relatively small regional companies.

Financial instruments

MTM:

One of the reasons for the failure of Enron was due to an off the market accounting process known as Mark-to-Market (MTM) Accounting in which the price of goods and services are determined from the current market value. This enabled the profits to be judged from current market value and not actual market value including its elements of risk. Enron had huge losses…


The Rainforest Biome and Mediterranean Biome

Recently when I read and saw the pictures about the G7 Summit in the media, I recollected about my visit to the Eden Project in 2018.

I was really fascinated by how they maintain the temperature and humidity of the Tropical Rainforest biome and Mediterranean biome.

It was a great experience for me to visit the place in Cornwall, Eden Project, which is an educational charity. The globe like structures called biomes are nestled within a huge crater. It contains the largest rainforest in captivity.

Rainforest Biome

I saw plants from the entire planet and it is built with a picture of…


PhaserJS plays like the helicopter game

PhaserJS is a game engine for the web. It is easy to build games on web and mobile platforms.

Game Initialization

Every PhaserJS Game start has init, preload, create and update methods. The Update method is an event loop that is used to even restart the game initialization. These methods can be appended to the Game or a Scene, which we will later describe in this article.

Game or Scene Restart

In a game it is typical to reset the assets that the game holds. This could be based on an underlying data that the game or scene holds. In a game restart, the preload method…


Best Fit Distribution by AIC

Goodness of fit

When the input is the data, and the data is random, the appropriate distribution is fit with the data such that the cost function is minimized. The distributions from scipyenable us to fit the data to their distribution. This will further help in parameter estimation and an AIC (Akaike Information Criterion) estimation.

I happened to find an excel spreadsheet consisting of a variety of data distributions. The excel spreadsheet has been shared below.

22 spreadsheet to study distributions (quantitativeskills.com)

The excel spreadsheets enable you to develop the data distribution. These data distributions are generated from…

Aswin Vijayakumar

Writer | DS Researcher | Software Developer | Intel Edge AI Scholar and Developer | Top 10 20/20 ADLINK

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store