"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

November 18, 2018

Day #150- Gabor filter

What is Gabor filter ?
  • Linear filter used for texture analysis
  • Gabor filter allow a certain band of frequency and reject the others
What are its Significance ?
  • Edges and texture changes captured
  • Filters are convolved with signal and Gabor space is obtained
  • 2D Gabor filter is Gaussian Kernel modulated by a sinusoidal plane wave in spatial domain
Example Code ?


This also can be applied for feature extraction from images.

Ref - Link1 , Link2

Happy Learning!!!

November 14, 2018

Day #149 - Thoughts on Multi Object Classification for Retail Store

We cannot classify all the million objects in Retail Store with a Single Model. We need a mix of different approaches to Detect, extract, Classify and Identify.
  • Yolo for bounding boxes and object boundaries
  • Model to Detect Humans in Picture
  • High-level category classification (Bags, Dresses, Groceries)
  • Models for Individual product level Identification (Nike, Puma, American Tourister Bags)
Data preparation depends on Lighting, Environment Factors, We need to use the Surveillance, existing video setup to leverage them for Dataset prpreparationContinually evaluate and re-label false positives. Also, Add Data Augmentation critical to improving on algorithm accuracy.

Next Level Challenges are
  • Object Tracking between frames
  • Object Occlusion
  • Counting and Tracking of Items
The Data Sources / Factors for Billing Items Counting are
  • Timeframe of transaction
  • Distinct Objects in the timeframe
  • Duplicate Objects in a single frame
  • Totally we need to have Distinct Object Type and Values, Unique Object Count
Data Issues While Training / Testing
  • Class Imbalance
  • Projection of camera and angle between training and test images
  • Discarding frames with multiple products as (Others)
  • Worked on Re-training dataset dozen times to get 80+ accuracy using Random Forest Model
  • Ensemble techniques to arrive at multiple predictions and considering voting majority
Improving Model Accuracy
  • Ensemble Models
  • Voting based classifiers
  • Use Adaboost / XGBoost
More Techniques
  • Leverage Yolo
  • Try Both Contour Detection Techniques
  • Try with White background (Contrast Improve)
Setting up a Model for Retail Environment
  • Automate Data collection
  • Duplicate Yolo with Retail Objects
  • First of the kind to come up with Retail Model 
  • Keep Objects with a boxed structure / white backgroud
  • Generic to customer / POS Checkoout
  • Yoflow already tensorflow implementation available
  • https://github.com/johnwlambert/YoloTensorFlow229
#LearningContinues

November 12, 2018

AI for Internet Policing

Given the massive data growth, social media there is a lot of data out there. Internet largely is un-managed platform with both good / bad data available for all ages and groups.

Online censorship / monitoring / hate speech / dark web / restricted content has always been a point of discussion vs privacy concerns.

Privacy - There is no such 100% privacy in internet. Your social media, browsing pattern, buying pattern everything is somewhere stored in bits and bytes. Our deep desires, searches, keywords everything is ingrained in the web

Web Addiction - A lot of young population life goes around in web for games / social media / whatsapp / facebook / instagram. However educational content is available from many MOOC courses. Still the hours spent on non-productive things are way too much compared to efforts and hours spent.

Free Data / Low cost Smartphones - Almost every household and every member has a smart phone. Tons of apps, videos, dub-smash, social media a lot of time spent only on internet. Our social circle is limited only to our mobile phones

Data Consumption vs Productivity - From the volume of Data consumed / Time spent Vs positive Impact on the person. Duplication of News, Likes of events / actions, Discussions / Debates. Emotional wellness how much does it help to have a positive impact. There is no central monitor to alert / recommend / supervise our actions. We are responsible for our lives.

AI could potentially monitor / recommend / alert
  • Recommendations for Children
  • Recommendation based on Gender
  • Recommendation based on Criminal Background
  • Censorship based on browsing history (Alert proactively)
  • Excess usage / Depression / Suicide Tendency Detection
  • Emotional Wellness Monitor
  • Abuse Detection and Prevention
This is always a debate on privacy vs censorship. Another question is how do we prepare the kids who are going to be the future generation. Alt least minimally there need to be censorship for the young generation.

What we achieve depends on what we do today. AI could effectively applied for Internet Censorship and Monitoring

More Read - How a Discriminatory Algorithm Wrongly Accused Thousands of Families of Fraud

This needs a lot of #opensource #crowdsource data, central monitoring, #datalabelling, #NLP, #Video Analytics to arrive at use cases / monitoring. 

#Mythoughts

AI in Education


Use cases for AI in Education Sector
  • Interactive Sentiment Analysis of Class Room Discussion based on Voice
  • Attention Analysis
  • Drowsiness Detection
  • Face based Attendance 
  • Loitering Detection
  • Arms / Knife / Banned items detection / Alert
  • Monitor Chats / Conversations for Depression
  • Distraction Alertness
  • Intrusion Detection / Monitoring
  • Detect Crowds / Fights
  • Health Analytics for Games /Fitness
  • Teaching Method vs Performance, Video Analytics to identify insights
  • Emotion Analytics (Happiness / Sadness / Anger )
Happy Learning!!!

Day #148 - One Pager Summary - Neural Networks

One page summary for my reference, Similar to a cheat sheet modified with key points from several sources.




Ref  - Link1 , Link2

Happy Learning!!!

November 07, 2018

Day # 147 - Part II - Deep Learning techniques for Computer Vision applied to embedded systems

A very interesting Final Year Paper - Deep Learning techniques for Computer Vision applied to embedded systems

Part Two Series.

Creating a custom Object Detector Machines

Steps Involved
  • Dataset Preperation (Download images using - Fatkun Batch Download Images)
  • Label Images by Hand (Painful process) - RectLabel Tool for manually labelling
  • Convert into .tfrecords - Custom Tensorflow code to prepare .tfrecords
  • Create labels with .pbtxt format
  • Create bounding boxes
  • Set TF Object Detection API
  • Create Pipeline for Training - Configure model, train_config, train_input_header, eval_config, eval_input_reader
  • Perform Training
  • Monitor Performance
  • Export Graph
  • Compile for Vision Bonnet
  • Deploy and Test
This is the first and most exhaustive step-by-step documentation neatly mentioned.

Happy Learning!!!

November 06, 2018

Day # 146 - Part I - Deep Learning techniques for Computer Vision applied to embedded systems

A very interesting Final Year Paper - Deep Learning techniques for Computer Vision applied to embedded systems

Key points I loved in this paper, Re-posted from the paper. Very Good ML training and learning paper. Excellent Work.


Machine Learning Problems
  • Classification - Train from a labelled dataset, Classify new incoming data to the class it belongs to. SVM, Decision Trees, Neural Networks, K Nearest Neighbors. Works on Discrete values
  • Clustering - Grouping data that share similar characteristics. Data not labelled. Maximum Distance between clusters, Minimize distance between points in identified cluster. K-Means, Hierarchical Clustering, DBScan
  • Regression - Considers continuous variable as output. Map input function to continuous output variable
  • PCA - Principal Component Analysis. Exploit Matrix Decomposition, Eigen Values to retain principal Eigen Vectors, Reduce dimension retaining critical components
  • Artificial Neural Network - Feedforward because output goes to next layer. Fully Connected - Each neuron propagates the result of computation to next neuron in following layer. Feed Forward + Fully Connected = Multi Layer Perceptron
Key Layers of Neural Network Design
  • Activation Functions to use in Each Layer
  • Loss Function to minimise Overfitting
  • Backpropagation Algorithm to find right weights (CNN)
  • Backpropagation Algorithm uses Stochastic Gradient Descent to compute Learning Rate
Computer Vision Applications
  • Image Classification - Assigning class / label based on pretrained classes. 
  • Image Classification and Localisation - Finding most relevant object in given image and bounding box of the relevant object in given image
  • Object Detection - Extract Relevant Object and their location
  • Instance Segmentation - Creates Overlap of detected objects/contours from extracted image. 
Deep Architecture
R-CNN - Region CNN
  • First step is identify regions
  • Second Step use CNN for identification
  • Not suitable for real time applications
  • Fast R-CNN, Improvement of R-CNN
Yolo
  • Single Neural Network Applied to entire image
  • You Only Look Once
  • Bounding box created with probabilities containing the object
  • Uses Predefined Grid Cells
SSD
  • Single Shot Multi Box Detector
  • Speeds up processing by Eliminating RPN
  • Feature maps extracted and Convolution filter is applied
For Real-time processing Yolo - 45 FPS, SSD 59 FPS. 

Happy Learning!!!

November 02, 2018

Computer Vision - Learning OpenCV

Outline of Exercises to understand basic image manipulations using OpenCV, available packages
  • Day #1 - Basic Image Manipulations (Flip / Rotate / Blur)
  • Day #2 - Image Sharpening, Edge Detection, Sobel, Laplacian Filters, SIFT
  • Day #3 - Contour Detection, Haar Face Detection, Haar Eye Detection, HOG Based Person Detection
  • Day #4 - OCR Detection from Image, Working with Tesseract
  • Day #5 - PCA on Image - Dimensionality Reduction, Split into Channels RGB, HSV
  • Day #6 - Working with Videos, Converting from Videos to Frames in OpenCV
#OpenCVGuidance

OpenCV Techniques for Feature Engineering
Perform below operations, Normalize and Convert into 1D array to train ML Model
  • Edge Detection - Canny Edge, Hough Transform
  • Image Sharpening, Threshold, Dialation, Erosion
  • Filters - Sobel, Laplace, Texture
  • Histogram Equalzation
  • Segmentation, Contours, HSV
References
OpenCV Examples
Snake Game in OpenCV
Record Specific Window in OpenCV
Add Image in Live Camera Feed
Object Tracking with Colors
OCR and OpenCV

Happy Learning!!!

Banking Analytics Use Cases

Banking Analytics Use Cases


Happy Learning!!!

Analytics for Textile Domain

For Textiles (Analytics)
  • Similar Fabrics Real time 
  • Quality Assessment
  • Seasonality Demand Forecasting
  • Pricing Recommendation
  • Surge based dynamic pricing recommendations
  • Region based recommendation
  • Gender / Trend / Location / Religion Personalized recommendations
  • Video Based Analysis
Sources of Data (Data Pipeline)
  • Images
  • Sensor Data
  • Data collected from Suppliers
  • Social Media
  • Fashion Trends
Dashboards / Reporting (Know how your business works)
  • Current/ Monthly / Seasonality
  • Small / Medium / Clustered Segments
  • Pricing / Quality / Demand KPIs
Happy Learning!!!