July 30, 2020
July 26, 2020
Weekend Learning - Introducing KFServing: Serverless Model Serving on Kubernetes
KF Serving
- Serving story for Kubeflow
- The concepts behind Kubernetes
- 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
- Bloombergs use cases
- All data / NLP
- Implement pre and post processing
- Add transformer to inference service
- Alibi library
- Accessibility to prediction URL
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
Link1
Sample for KFServing SDK with a custom image
Predict on a InferenceService using Tensorflow
Happy Learning!!!
Labels:
Docker,
KFServing,
Kubernetes
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()
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.
Tip #3 - Alternate option to #2 - Provide volume while running docker
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!!!
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
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!!!
Labels:
Data Science,
Docker,
Kubernetes
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.Impressed with the Recycling, Waste Disposal Systems
All Categories of Waste
- Electronics
- Construction
- Plastics
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!!!
Labels:
AI Startups
Tracking and Pedestrain Paper Reads
Paper #1 - Object Tracking for Autonomous Driving Systems
keynotes
I'm keen on Tracking - Prediction - Planning aspects
MOT - Multiple Object Tracking
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
Key Notes
Different pedestrian vs Environment factors are
Decision-making Factors
SIMPLE ONLINE AND REALTIME TRACKING WITH A DEEP ASSOCIATION METRIC
Key Notes
SORT for Tracking - Git Project
Good Reads
ML6 Internship: Pedestrian tracking over multiple non-overlapping camera viewpoints
Keep Thinking!!!
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
- Detection - Object Detection, Bounding boxes
- Feature Extraction - CNN or Siamese networks employed
- Affinity - Cosine Similarity, Euclidean distance, Intersection over union
- Association - Matching trackets
- Camera Motion
- Occlusions
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
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.
Keep Thinking!!!
Huge drop in numbers, :(.i like the implication here that the first thing to do in a pandemic is stop buying celery https://t.co/he6RViZdw6 pic.twitter.com/7U7ngIxb8E— Matt Levine (@matt_levine) March 2, 2020
Keep Thinking!!!
Labels:
Retail
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!!!
Labels:
Docker,
DockerDefinition
Interesting Computer Vision Startup - RedBot - http://redbotinnovations.com/
They have nailed down vision use cases across different domains.
Keep Thinking!!!
- 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
Keep Thinking!!!
Labels:
AI Startups,
Data Science
July 12, 2020
Top trends post COVID in Retail
Top 10 trends post COVID in Retail
Keep Thinking!!!
- Rise of Virtual Shopping - Link
- Voice Assistants for shopping - Link
- Adoption of Curb Side pickup - Link
- Virtual stores - Link
- Safe distancing AI apps on Rise
- Retailers going online, All offline retailers are onboarding in Shopify, Instagram, Facebook Shop, etc - Link
- Store closures on the rise - Link
- Instore shopping needs to evolve for better customer experience - Link
- Instore is the preferred mode for groceries - Link
- Rise of popup shops - Link
- Tech spending is on the rise - Link
Keep Thinking!!!
Labels:
Retail
July 05, 2020
Weekend Reads - Fashion Virtual Dress Creation - Papers
Paper #1 - M2E-Try On Net: Fashion from Model to Everyone
Key Notes
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
Try-on module (TOM)
Key Notes
Keep Thinking!!!
Key Notes
- Pose alignment network (PAN)
- Texture refinement network (TRN)
- Fitting network (FTN)
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
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
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
- 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
Keep Thinking!!!
Labels:
Data Science,
Data Science Tips,
Fashion,
Fashion Papers,
Retail
Research Paper Reads - People Counting
Paper #1 - PaDNet: Pan-Density Crowd Counting
Key Notes
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
Average distance from certain head at j to its K-nearest neighbors (K-NN)
Datasets
Congested Scenes
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
- Inconsistent densities due to camera perspective
- Sliding window detector
- Regression-based approaches
- Hand-crafted features
- detection-based methods affected by severe occlusions
- 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
- 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
- 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
- Five-branch contextual pyramid CNN
- GANs-based method to generate highquality density maps
- 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
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
- Patch-based density estimation
- Estimate crowd counts via the detection of each individual pedestrian Regression of density maps
- Crowd counting is casted as estimating a continuous density function
Average distance from certain head at j to its K-nearest neighbors (K-NN)
Datasets
- ShanghaiTech
- WorldExpo’10
- UCF CC 50
- UCSD
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
Code
Congested Scene Recognition called CSRNet
Ref Code
Dilated convolutional layers to aggregate the multiscale contextual information in the congested scenes.
More Papers
Benchmark data and method for real-time people counting in cluttered scenes using depth sensors
Learning Spatial Awareness to Improve Crowd Counting
Image Crowd Counting Using Convolutional Neural Network and Markov Random Field
Fast Video Crowd Counting with a Temporal Aware Network
Paper with Code - Reference
Example - Keras - Dilated Convolution
7 Technologies that Count People (Buildings & Offices)
Keep Thinking!!!
Congested Scene Recognition called CSRNet
Ref Code
Dilated convolutional layers to aggregate the multiscale contextual information in the congested scenes.
More Papers
Benchmark data and method for real-time people counting in cluttered scenes using depth sensors
Learning Spatial Awareness to Improve Crowd Counting
Image Crowd Counting Using Convolutional Neural Network and Markov Random Field
Fast Video Crowd Counting with a Temporal Aware Network
Paper with Code - Reference
Example - Keras - Dilated Convolution
7 Technologies that Count People (Buildings & Offices)
Keep Thinking!!!
Labels:
Data Science,
Data Science Tips
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
Key Notes
Key Notes
Visor: Privacy-Preserving Video Analytics as a Cloud Service
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
- Decoder
- Background subtractor
- Deep neural network
- Edge device is not overloaded
- Edge device used for cheap filtering
- Data sent between the edge and the cloud does not overload the network
- Efficient cross-camera analytics
- Querying stored videos
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
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
Labels:
AI Startups,
Data Science,
Data Science Tips
Subscribe to:
Posts (Atom)