Skip to main content


Showing posts from March, 2020

How to set Tensorflow 2 on

This simple tutorial show you how to set Tensorflow 2 version in google Colab. It is simple step by step, picture by picture guide.  I try to find a way to set Tensorflow 2 version on Colab. Are you using Colab? I love it. Set a version of Tensorflow To set the Tensorflow version in execute following code %tensorflow_version go to top menu - Runtime - Restart and Run all  [0]: % tensorflow_version 2.x Point 1 set Tensorflow version point 2 restart runtime Test the Tensorflow 2 version  After set version and restart of runtime try to use Tensorflow 2.0 and print version. If you have version of Tensorflow 1.x somethink weht wrong. Add new code section as follows In [0]: from __future__ import absolute_import , division , print_function , unicode_literals try : # %tensorflow_version only exists in Colab. % tensorflow_version 2.x except Exception : pass import tensorflow

Compile Opencv with GStreamer for Visual Studio 2019 on windows 10 with and contribution modules

The goal of this tutorial is a simple step by step compilation of Opencv 4.2 with contribution extra modules with GStreamer as a bonus. The environment is Windows 10, Visual Studio 2019 C++ application. This took me almost one day of correcting of CMake setting. The goal of this tutorial is: compiled a set of OpenCV libraries with GStreamer and FFmpeg on Windows. I focus mainly on GStreamer. It is a little bit more tricky. You will reach the following information about your Opencv environment by compile and run this simple code. The Opencv GStreamer is turned as YES. GStreamer gives you a great opportunity to stream OpenCV output video outside of your program, for example, web application. I recently compiled with opencv 4.4. The update at the end of the post.  It is working!! wow, The working app and configuration in future tutorials. #include   <opencv2/opencv.hpp> #include   <iostream> using namespace cv; int   main () {      std ::cout <<  &q

Download My custom trained Opencv Cascade Classifier for detectMultiScale

This tutorial contains a list of custom trained LBP and HAAR cascade trained for Opencv CascadeClassifier detect multiscale method. You can download and test these cascades to detect people, heads, and cars in OpenCV. They are of mixed quality and mainly tuned for performance. I preferred LBP exactly for the performance reason. The cascades are not perfect but available for free. The cascades are useful in many projects.  The training data are originally mine as well. Please cite the blog if you are using these cascades. Thanks Opencv Car Cascade Classifier Download car cascade HERE I created the car dataset from the video from my prone. The base set of positive car samples was very poor. Basically, I used background subtraction to extract moving bounding boxes over the highway. Then the dataset was clean manually. The duplicates and very similar pictures were removed for better robustness of the detector.  Opencv car Cascade Classifier properties <!-- T

Face mouth eyes, facial landmarks detection tutorial for Opencv C++

This tutorial shows simple and useful code on how to detect face and face landmarks in OpenCV C++. It is a very simple task for 30 minutes of your attention. The expected result of this tutorial is visible in the following picture. The main loop capture video from a web camera. This captured video frame is used further to detect the position of the face. Once the face is detected the predefined facial landmarks mask is calculated to match the position of landmarks of your face.  Opencv Face landmarks tutorial The setup description for OpenCV face landmark tutorial My environment is Windows 10 and Visual Studio 2019. The OpenCV library in this tutorial is 3.4b build with contribution modules. My project in Visual Studio is set up as follows. The include header files are set up as follows.   In my project, I am using opencv_world343.lib and opencv_world343.dll as follows. Opencv detector requirements This tutorial requires two files. The first is lbfmodel.yaml  f