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

July 30, 2020

Docker MariaDB Installation



More Reads - Link
Happy Learning!!!

July 26, 2020

Weekend Learning - Introducing KFServing: Serverless Model Serving on Kubernetes



KF Serving
  • Serving story for Kubeflow
  • The concepts behind Kubernetes
  • Serving Frameworks (Seldon core, ml lambdas, Tensorflow Serving)
  • Consistent interfaces for different frameworks
  • ServiceAccount for access
  • Canary - 2 way split (New / Old)
  • Default Standard Deployment
  • Canary - Addressable primary / default
  • Experimental traffic handling
  • Similar to A / B Testing
  • KFServing for ML Problems
  • Knative - Resource Model
  • Production Features of ML KFServing 0.2
  • Use cases at Bloomberg
  • Serving models in production
  • Scaling and handling traffic
  • End to End implementation/scalability and load handling
  • Model production requirements
  • A lot of out of box features for production-grade implementation

  • Bloombergs use cases
  • All data / NLP
KF Serving Transformer concept
  • Implement pre and post processing
  • Add transformer to inference service



Model Explanation
  • Alibi library
  • Accessibility to prediction URL
Kafka Implementation Example
A / B Testing Approach
CI / CD Pipeline


MNIST kfserving
  • Preprocess / postprocess in transformer
  • Download image
  • Run prediction
  • Result upload to bucket
  • Custom model to process
  • Upload to bucket
More Reads
Link1
Sample for KFServing SDK with a custom image
Predict on a InferenceService using Tensorflow

Happy Learning!!!

July 23, 2020

Day #337 - Lessons Learnt in Playing with Docker, Kubernetes, VOLUME in Docker vs VOLUME Kubernetes

Tip #1 - To make flask API multithreaded, Add the option threaded in app.run()

app.run(host= '0.0.0.0',port=4321,threaded=True)

Tip #2 - To run a flask API in Docker, which involves file operations we can specify VOLUME

VOLUME inside docker file definition - Basically with VOLUME command you get performance without externally mounting any volumes.
VOLUME ['/datadir']
Some good example use cases:
  • logs
  • temp folders
Ref - Stackoverflow Answer

Tip #3 - Alternate option to #2 - Provide volume while running docker

docker run -p 8080:8080 Demo-App --volume=/Users/tmp:/app Demo-App

Tip #4. Specify Volume - emptyDir inside Kubernetes for temporary data

Use emptyDir Option. emptyDir volume should NOT be used for persisting data. Data erased when pod is removed.

Happy Learning!!!

July 18, 2020

Inspiring and Interesting AI Startups

Startup #1 - AMP Robotics

Impressed with the Recycling, Waste Disposal Systems

Material Spotlight - PET from AMP Robotics on Vimeo.

All Categories of Waste
  • Electronics
  • Construction
  • Plastics 
Object Detection, Classification + Robotics - Very Good Case and Impactful

More Reads - Link

Startup #2 - inspekto - Computer Vision for Inspection
Startup #3 - Zivid - 3D Computer Vision for Vehicle Inspection

Food Packing App seems very inspiring. Automated Food Packing



Link

Future Learning Bookmark :) for Robotic Arm


Keep Thinking!!!

Tracking and Pedestrain Paper Reads

Paper #1 - Object Tracking for Autonomous Driving Systems
keynotes
  • The Different components of Autonomous driving System

I'm keen on Tracking - Prediction - Planning aspects
MOT - Multiple Object Tracking
  • Record and track moving objects over time
  • In Autonomous System tracking cars, pedestrians, signals, passing vehicles everything is key
Deep Learning in Video Multi-Object Tracking
  • Detection - Object Detection, Bounding boxes
  • Feature Extraction - CNN or Siamese networks employed
  • Affinity - Cosine Similarity, Euclidean distance, Intersection over union
  • Association - Matching trackets
Real-world challenges
  • Camera Motion
  • Occlusions
Deep Sort - DeepSORT extends SORT by incorporating appearance information for each tracked object into the affinity stage. The underlying Kalman filter and target state definition are unchanged, but a convolutional feature extraction model is used to process bounding box crops of targets into feature vectors

Novelty
Distractor-Aware Siamese Region Proposal - Networks - DaSiamRPN is a single object tracker that combines a Siamese feature extraction network with a novel training strategy to learn distractor-aware features.

Paper #2  - Estimating Pedestrian Densities, Wait Times, and Flows with Wi-Fi and Bluetooth Sensors

Key Notes
Tracking Approaches
  • Infrared, Thermal Sensors
  • Bluetooth, Mobile Phones
  • Automated Pedestrian Counting Technologies
Pedestrian Counting Techniques
  • Anonymize, filter and aggregate traces of pedestrians
  • Wifi, MAC-based approach
Paper #3 - Autonomous Vehicles that Interact with Pedestrians: A Survey of Theory and Practice
Key Notes
Different pedestrian vs Environment factors are
Decision-making Factors

SIMPLE ONLINE AND REALTIME TRACKING WITH A DEEP ASSOCIATION METRIC
Key Notes

  • Simple online and realtime tracking (SORT)
  • Standard Kalman filter with constant velocity motion and linear observation model
  • Kalman filtering, also known as linear quadratic estimation (LQE)
  • By using simple nearest neighbor queries without additional metric learning

SORT for Tracking - Git Project

Good Reads
ML6 Internship: Pedestrian tracking over multiple non-overlapping camera viewpoints

Keep Thinking!!!

July 16, 2020

Footfall trend - US Retailers, Restaurants

Attended webinar Sectors to Watch and Factors that Could Change the Retail Landscape. Below two slides capture the footfall drop between last year and current year rates.



Huge drop in numbers, :(.

Keep Thinking!!!

July 13, 2020

Docker Mac Days Experiment #1

Finally able to experiment with Docker on Mac. First basic examples

1. Passing arguments to the docker image
2. Install OpenCV
3. Print Image Shape, Can't use imshow inside docker image though :)

Dockerfile - this is case sensitive
1. The contents 
  • Define Workdir the location to default store project documents
  • Packages to install
  • Contents to Copy
  • Entrypoint to Start the code

2. Example code to run inside docker

3. Command to create a docker image
4. Command to run a container

Docker Image Examples





Happy Learning!!!

Interesting Computer Vision Startup - RedBot - http://redbotinnovations.com/

They have nailed down vision use cases across different domains.
  • Fruit Sorting based on Quality - Object Detection and Analysis
  • Surface defects, Seed Quality Inspection, Micro Crack Inspection - Contours, and Classification
  • Non-contact measurement - Distance and Counting 
  • Packaging label, Label inspection - OCR
  • Bottle Counting - Object Counting
  • Contactless facial recognition - Face Recognition, Face Match
My understanding is they have built a lot of custom models for different domains.

Keep Thinking!!!

July 12, 2020

Top trends post COVID in Retail

Top 10 trends post COVID in Retail
  1. Rise of Virtual Shopping - Link
  2. Voice Assistants for shopping - Link
  3. Adoption of Curb Side pickup - Link
  4. Virtual stores - Link
  5. Safe distancing AI apps on Rise
  6. Retailers going online, All offline retailers are onboarding in Shopify, Instagram, Facebook Shop, etc - Link
  7. Store closures on the rise - Link
  8. Instore shopping needs to evolve for better customer experience - Link
  9. Instore is the preferred mode for groceries - Link
  10. Rise of popup shops - Link
  11. Tech spending is on the rise - Link
It will take a few more months for public transportation, dine-in, malls, and entertainment halls. Till 2021 it's going to be a continuation and similar trend of the top 10 listed trends.

Keep Thinking!!!

July 05, 2020

Weekend Reads - Fashion Virtual Dress Creation - Papers

Paper #1 - M2E-Try On Net: Fashion from Model to Everyone
Key Notes
  • Pose alignment network (PAN)
  • Texture refinement network (TRN)
  • Fitting network (FTN)
Pose alignment network - (PAN) to align the model and clothes pose to the target pose. Each dense pose prediction has a partition of 24 parts

Texture refinement network (TRN) to enrich the textures and logo patterns to the desired clothes
Texture details, region of texture, binary mask with the same size. Merged images while still preserving the textual details on the garments
Fitting network (FTN) to merge the transferred garments to the target person images. Generative network to generate fashion images from textual inputs

Fitting Network is an encoder-decoder network, including three convolution layers as the encoder, six residual blocks for feature learning, followed by two deconvolution layers and one convolution layer as the decoder


Code - https://github.com/shionhonda/viton-gan

Paper #2 - VITON-GAN: Virtual Try-on Image Generator Trained with Adversarial Loss
Key Notes
  • U-net generator and thin plate spline (TPS)
  • Human parser
  • Pose estimator
GANs are able to generate fine, high-resolution, and realistic images because adversarial loss can incorporate perceptual features that are difficult to define mathematically

Try-on module (TOM)
  • Trained adversarially against the discriminator that uses the TOM result image
  • Person representation as inputs and judges whether the result is real or fake VITON-GAN generated hands and arms
Paper #3 - The Conditional Analogy GAN: Swapping Fashion Articles on People Images

Key Notes
  • GAN - a model G that learns a data distribution from example data, and a discriminator D that attempts to distinguish generated from training data
  • These models learn loss functions that adapt to the data, and this makes them perfectly suitable for image-to-image translation tasks
  • (cGAN) learns to generate images as function of conditioning information from a dataset, instead of random noise from a prior, as in standard GAN
Training of the CAGAN model involves learning a generator G to generate plausible images which fool a discriminator D. The discriminator D needs to answer two questions:
  • does an image x look reasonable, i.e. indistinguishable from the training distribution of human images {xi}?
  • does the article y look well-painted on the human model image x
More Reads
GENERATIVE ADVERSARIAL NETWORK-BASED VIRTUAL TRY-ON WITH CLOTHING REGION

Keep Thinking!!!

Research Paper Reads - People Counting

Paper #1 - PaDNet: Pan-Density Crowd Counting

Key Notes
  • Density-Aware Network (DAN) contains multiple subnetworks pretrained on scenarios with different densities
  • Capturing pandensity information
  • Feature Enhancement Layer (FEL) effectively captures the global and local contextual features
  • Feature Fusion Network (FFN) embeds spatial context and fuses these density-specific features
Real World Challenges
  • Inconsistent densities due to camera perspective
Existing Methods
  • Sliding window detector
  • Regression-based approaches
  • Hand-crafted features
  • detection-based methods affected by severe occlusions
Switch-CNN
  • Switch-CNN through training the switch classifier to select the optimal regressor for one input patch
  • Each subnetwork of Switch-CNN is trained on a specific density subdataset and thus cannot utilize the whole dataset
  • High computation complexity in predicting the global and local contexts
Network Design
  • FEN extracts low-level feature of image
  • DAN employs multiple subnetworks to recognize different density levels in crowds and to generate the feature map
Regression Based Methods
  • Mapping from low-level features extracted from local image patches to the count
Features
  • Extracted features include foreground features, edge features, textures, and gradient features such as local binary pattern (LBP), and histogram oriented gradients (HOG)
  • Regression approaches include linear regression [24], piecewise linear regression [25], ridge regression [26], and Gaussian process regression
MCNN architecture
  • Five-branch contextual pyramid CNN
  • GANs-based method to generate highquality density maps
Density-Aware Network (DAN)
  • Input: input crowd image patches dataset S
  • Output: output the parameters ΘPaDNet
  • Init: Dividing the whole image patches S into N clusters S1, S2...SN via K-means clustering algorithm.
  • P is the number of people in an image patch, dij represents the distance between the ith subject and its jth nearest neighbor
Paper #2 - Point in, Box out: Beyond Counting Persons in Crowds
Crowd Counting Challenges
Heavy occlusions, perspective distortions, scale variations and varying density of people
Combine the detection result with regression result for crowd counting

Implementation
Point-level annotations on person heads
Novelty
  • Online pseudo ground truth updating scheme which initializes the pseudo ground truth bounding boxes from point-level annotations
  • Novel locally-constrained regression loss
  • Curriculum learning strategy
Key Lessons
  • Patch-based density estimation
Paper #3 - Revisiting Perspective Information for Efficient Crowd Counting
  • Estimate crowd counts via the detection of each individual pedestrian Regression of density maps 
  • Crowd counting is casted as estimating a continuous density function
Multi-scale architecture of convolutional neural networks (CNNs) to regress the density maps at different resolutions
Average distance from certain head at j to its K-nearest neighbors (K-NN)

Datasets
  • ShanghaiTech
  • WorldExpo’10
  • UCF CC 50
  • UCSD
Paper #4 - CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly
Congested Scenes
  • Convolutional neural network
  • Front-end for 2D feature extraction and a dilated CNN for the back-end
  • Multi-column based architecture (MCNN) for crowd counting.
  • Dilated convolutional layers have been demonstrated in segmentation tasks with significant improvement of accuracy
  • Dilated convolution shows distinct advantages compared to the scheme of using convolution + pooling + deconvolution. 

Deep Learning-Based Crowd Scene Analysis Survey
Detection based approaches
Datasets

Make it a High / Medium / Low crowd scenario


July 03, 2020

Research Paper Reads - Edge Analytics

Microsoft has made a lot of progress on edge analytics. Sighted few papers which provide good pointers on case studies, implementation examples.

Paper #1 - Demo: Video Analytics - Killer App for Edge Computing
Key Notes
Microsoft Video Analytics Stack
  • Combination of Edge + Cloud Analytics
  • Lite and Heavier version of models
  • Hybrid approach
Pipeline Steps
  • Decoder
  • Background subtractor
  • Deep neural network
Performance Challenges
  • Edge device is not overloaded
  • Edge device used for cheap filtering
  • Data sent between the edge and the cloud does not overload the network
Cloud Features
  • Efficient cross-camera analytics
  • Querying stored videos
Paper #2 - Traffic Video Analytics 
Key Notes
  • Ground Truth - under-counts, over-counts
  • Ground truths were obtained using extensive labeling
  • Line-counter is that it captures the “state transition” of the lines
  • State of the line changes from unoccupied to occupied, and then back to unoccupied, before it increases the count for said line
Paper #3 - The Emerging Landscape of Edge-Computing.
Key Notes
  • Edge Computing - tolerate cloud outages and the scarcity of network bandwidth
  • This slide on real-world deployments is very impressive
  • Existing edge applications often consist of an ensemble of custom and off-the-shelf containers
  • Use Case - Cracks can cause the wheel to break and derail the entire train
  • Oil - ExxonMobile continuously monitors its multi-million dollar oil rigs
  • Network bandwidth and reliability drive the use of edge computing
  • Autonomous Edge devices

Visor: Privacy-Preserving Video Analytics as a Cloud Service