"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" ;

May 31, 2021

Concepts - Heuristics vs ML, Deterministic vs. stochastic models

Heuristics vs ML

  • A heuristic is a way to find the solution to some problem without exhaustively trying all possible solutions, or without knowing the answer ahead of time.
  • A heuristic is a strategy for finding a solution to a problem faster or approximating a solution for it
  • The term heuristic is used for algorithms that find solutions among all possible ones,but they do not guarantee that the best will be found

Ref - Link

  • Heuristic is any approach to problem-solving, learning, or discovery that employs a practical method not guaranteed to be optimal or perfect, but sufficient for the immediate goals.

Ref - Link

Machine Learning is different, in that instead of teaching the computer the technique that you found for solving the problem 

Sampling-based techniques

  • Do not require first or second derivative
  • Exhaustive search
  • Simulated annealing
  • Genetic Algos

Gradient-based techniques

  • Branch and bound

Algorithms for Decision Making: Optimization, Heuristics and Machine Learning

Deterministic vs. stochastic models

  • In deterministic models, the output of the model is fully determined by the parameter values and the initial conditions.
  • Stochastic models possess some inherent randomness. The same set of parameter values and initial conditions will lead to an ensemble of different outputs
  • Demographic stochasticity describes the randomness that results from the inherently discrete nature of individuals
  • In deterministic algorithm, for a given particular input, the computer will always produce the same output going through the same states
  • non-deterministic algorithm, for the same input, the compiler may produce different output in different runs

Ref Link

P, NP, NP-Hard & NP-complete problems

It takes time to connect all the dots and plot the big picture. Keep Plotting!!!

Branch and Bound for Mixed Integer Solutions

Continuous Variables - Variables can attain any value between lower and upper bound

Discrete - Variables with particular values - Size, Binary, Set of values

Ref - Link1  

Branch-and-Bound (BB) method. – the framework for almost all commercial software for solving
mixed integer linear programs. Basis of all modern MILP codes.

Algo ref


Branch and Cut - Pure cutting plane algorithms. Ineffective for large Mixed Integer Linear Programming.

Ref - Link 2


Notes
If the given problem is a discrete optimization problem, a branch and bound is a good choice.
Branch and bound work efficiently on the combinatory optimization problems

Ref - Link 

Papers

Keep Exploring!!!

May 30, 2021

Lecture - Visual Question Answering Based on Image and Video - Thao Minh Le

Visual Question Answering Application

demo -  Link

Pics and videos are everywhere, words are how humans communicate




  • Vision + ML + NLP - Interesection of all fields
  • The Flow
    • Low level image processing
    • Objects and Shapes
    • Object recognition, Relationship between objects
    • Relationship between object, events
    • Pizza, Type of pizza 
Applications
  • Visually impaired assistance

  • Video Analytics analysis
  • Check a piece of information
  • Open-ended questions
  • Choice-based questions
  • Counting type questions
Next Steps
  • Perception - Reasoning - Multistep reasoning
  • Difficult for a single model to address
  • Obtain knowledge - Form Relationships 
  • Dataset - 1 Million questions
  • bag of words to embed
  • BOW + LSTM

  • Reasoning - Chaining of relative predicates to arrive at the conclusion


  • Objects - RCNN
  • Contextual words - Bidirectional LSTM
  • Connect all objects in sequence
  • Semantic similarities representation
  • Relational Reasoning on Visial QA

  • Conditional Relation Network Unit


Every weekend makes me feel guilty about vision current state of art vs what I am working on when I will bridge the knowledge gap!!!

May 29, 2021

Deepfake detection reads and papers

Paper #1 - Deep Learning for Deepfakes Creation and Detection: A Survey

Key Notes

  • Deep Fake Models


How it works

  • A deepfake creation model using two encoder-decoder pairs
  • Two networks use the same encoder but different decoders for training process
  • An image of face A is encoded with the common encoder and decoded with decoder B to create a deepfake (bottom).

Deep Fake Detection Techniques

  • Eye blinking
  • Inconsistency between frames
  • Face warping artifacts, Inconsistency of surrounding areas
  • Head poses 
  • Exploit facial texture differences
  • Emotion audiovisual affective cues

Paper #2 - Video and audio deepfakes detection using Deep Learning

Key Notes

To summarize, given an image of a face, the FWA facial warping artifacts (FWA) captures the face features using dlib CNN face detector then it blurs the captured face feature and affine warps it back to the original face image. This procedure emulates deepfake faces and it is much simpler to generate compared to using autoencoders

We will be feeding in both the real and fake faces into the neural network and this may cause confusions during the training phase

Projects link

Keep Exploring!!!

May 28, 2021

Interesting Vision projects

Project #1 - Enabling Those with Low Vision to Run Independently

Key Summary

  • Predict runners the sidewalks of road / Visually impaired
  • Segmentation model, Lane detection, Mobile deployment model
  • Transfer Learning based on mobilenet. Segmentation model built

My Thoughts - Without segmentation with binary threshold, OpenCV as well we can attempt the same. Applying sobel / laplacian filters extract edges and attempt to find

Project #2 - Smart Toilet

Data upload - Link

Project - Link

  • Purpose - Insights from human feces
  • Classification - patient’s stool form (i.e., loose, normal or constipated) 
  • Detect blood in stool

Can't imagine this use case. So many use cases beyond what we think.

Vision Repos

Keep Thinking!!!


May 27, 2021

Essentials of Metaheuristics

Essentials of Metaheuristics

Key Notes

  • Stochastic optimization -  employ some degree of randomness to find optimal solutions
  • Metaheuristics are applied to I know it when I see it problems
  • Hill-climbing is a simple metaheuristic algorithm
  • All metaheuristics are essentially elaborate combinations of hill-climbing and the random search


  • To Tweak a vector we might (as one of many possibilities) add a small amount of random noise to each number
  • Single-State Global Optimization Algorithms

Simulated Annealing

  • Simulated Annealing gets its name from annealing, a process of cooling molten metal
  • If R is better than S, we’ll always replace S with R as usual. But if R is worse than S, we may still replace S with R with a certain probability P(t, R, S):

Iterated Local Search

  • Iterated Local Search (ILS) tries to search through this space of local optima in a more intelligent fashion: it tries to stochastically hill-climb in the space of local optima

The Genetic Algorithm

To breed, we begin with an empty population of children. We then select two parents from the original population, copy them, cross them over with one another, and mutate the results.

More Reads

Keep Exploring!!!

May 25, 2021

Python coding review tools - Docker, Kubernetes

Good read on code quality Tools - Link

Picked and checked on below tools for example project
  • Bandit - security issues
  • Pylint - coding standard 
  • pycodestyle - code style 
Download Project - Link



Result #1

Result #2


Result #3


This CI / CD 8th Lab video  was motivational to explore these tools. Need to re-read this session again.

Tool Links
code - link

Todo List

Good Reads
  • Exploring Shap - Link1, Link2
  • Python Best Practices for a New Project in 2021 - Link1
  • ML-Ops_ModelDeployment_k8s - Link1
Keep Exploring!!!

Lecture Notes - Google Machine Learning System Design Mock Interview

 

Key Notes

  • Billions of videos, Millions of users
  • Recommend video for right user / time / context
  • Start small, Scale to current needs
  • Recommendation based on the entire corpus of content
  • Meat in the middle approach
  • Pick a Small dataset
  • Video, User1, Completion %%
  • Video, User2, Completion %%
  •  Use for a similar taste
  • Similarity-based on some model
  • The user doesn't like video
  • Collaborative filtering techniques
  • Activity, Attributes, Demographics
  • User - User
  • Demographics, Age, locale, Historical data
  • Weightage of recent vs previous topics
  • Topic Continuity based recommendations
  • Reference / Approximation
  • Comparing across videos/users
  • Auto recommendations / Next list to display
  • Map user/item vector and compare with Cartesian steps
  • Edge cases - Cold start / new user content
  • The initial filter of videos based on preferences then include trending videos in the domain, Add scoring
  • Use choices long/short videos 
  • Ranking step / Filtering Step

My thoughts

  • Clustering and they recommending based on cluster they belong
  • Custom models for each locale, interests then getting it prioritized
Machine Learning System Design (YouTube Recommendation System)

Key Notes

Multitask ranking system


  • Two stage pattern
  • Select narrowed down candidates
  • Ranking approach to check those candidates
  • Funnel Fashion
  • Could be SQL query / Watched by users
  • Regression to narrow down further
  • Finding relevant candidates for users


  • Current watched video + context
  • 700 users / second / scalable system





  • Predict the probability of engagement for a video
  • For each value multiple predictions
  • Combine all outputs, ensemble them



Keep Thinking!!!

May 24, 2021

Paper Review - Neural Generation Meets Real People: Towards Emotionally Engaging Mixed-Initiative Conversations

Neural Generation Meets Real People: Towards Emotionally Engaging Mixed-Initiative Conversations


Youtube session - Link
Demo - Link, Link1

Key components
  • Global navigational intent classifier
  • Entity tracker
  • Response priority system

Navigational Intent Classifier
  • Find topic
  • Check positive / Negative intent
  • Manually-constructed regexes
Entity Tracker
  • Priority-ordered list of possible entities

Response Priority Ranking System
  • The priority levels are clear to understand and make it easy to modify behavior.
Dialogue Act Classifier
  • Dialogue acts can support understanding of user intent
Question Classifier
  • Fine-tuned a RoBERTa model on an simplified version of the Dialogue Act training data, framing the task as binary classification, conditioned only on the user utterance
  • Movies / Music data
  • Music response generator
  • Movie resposne generator
More Reads

Keep Exploring!!!

May 23, 2021

Weekly Tech Bytes - Consumer Tech reads

Article #1 - How Big Pharma Finds Sick Users on Facebook

Summary - Based on users' interests target drug personalized ads. Diabetes, Heartattack etc depending on the groups enrolled.

Article #2 - The secret tricks hidden inside restaurant menus

  • Font italic typeface conveys a perception of quality
  • Wine labeled with a difficult-to-read script was liked more by drinkers 
  • This is not just a pudding - Adding Indulgent Descriptions
  • The more description you have the higher the value of the item

Article #3 - Welcome to Good Faith

Internet poisoning is when someone spends so much time online that they come to believe that real life is as warped and strange as the internet

Article #4 - Machine Learning is a Marvelously Executed Scam

It’s still early days; technology is built upon iterative improvements


Keep Questioning!!!

Interesting Vision Projects

Product #1 - Open Vision API - open source computer vision API based on open source models.

source code - Link

Product #2 - Which Frame? - Link

Search a video semantically

Product #3 - Selfie based facial skin assessment

Dermatology dataset - Link

Project #1 - Link 

Project #2 - Skin lesion detection from dermoscopic images using Convolutional Neural Networks

Project #3 - Deep convolutional network to predict 23 classes of skin disease

Papers 

Keep Exploring!!!

May 22, 2021

Streamlit vision demo

 




Happy Learning!!!!

May 21, 2021

Streamlit calculator demo

 



Keep Adding more relevant examples!!!


May 19, 2021

Reusing Computer Vision Tools

 This is a great work to reuse 

Complete vision end to end is integrated as a tool.

For custom object training BMW has shared their opensource framework. It is a packaged version of the complete object detection setup. (Yolo / TensorFlow this is good set of tools)

May 18, 2021

MIT 6.S191: AI in Healthcare

Key Notes
AI in healthcare 




Maturation of DL / GPU / Open source labeled public datasets



  • Need in healthcare
  • Automation
  • Avoid human error


Lung cancer signs detection from images




Tissue architecture
Differentiate types of tumors
Breast cancer detection from pathology images
Genome sequencing






Healthcare is fragmented, distributed






Get multiple opinions / collate results




Keep Thinking!!!