SlideShare a Scribd company logo
GROUP MEMBERS
Jawad Sajid FA16-BCS-181
Mutahhar Ahmad FA16-BCS-122
Usman Sajid FA16-BCS-288
Introduction and Problem
Statement
• Strive for Industry 4.0
• These perspectives are not just ideas!
• Current situation of Pakistani Industry
• What are the problems we focus on?
1. Govern Access
2. Monitor Activities in Real-time
3. Alert to Environmental Risks
Honeywell’s Video Analytics
Microsoft’s Amazing Works!
Amazon Works!
“Real-world Anomaly Detection in Surveillance
Videos” by Waqas Sultani, Chen Chen and
Mubarak Shah
“A Review of the Applications of Computer
Vision to Construction Safety” by Brian H.W
Guo, Yang Zou and Long Chen
On-site 3D Vision Tracking of Construction Personnel
by Francisco Cordava and Joannis Brilakis
MobileNets: Efficient Convolutional Neural
Networks for Mobile Vision Applications by Google
Deep Face Recognition by University of Oxford
OpenPose: Realtime Mutli-Person 2D Pose
Estimation using Part Affinity Fields
Simple Online and Realtime Tracking With Deep
Association Metric by Queensland University
• Problem of
Deploying the
Application?
• Why two
databases?
• Importance of API
Layer
• System logins?
Why?
• Policy Oriented
Structure
DATABASE API DESIGN FACIAL
RECOGNITION
UNIFORM
DETECTION
POSE
RECOGNITION
UI
INTEGRATION
COMMUNICATI
ON MODULE
• Initial Database
• Not Normalized
• Repeated
Information
• Not Any Centralized
Table
• Duty Rostrum
Missing
• Normalized
• Duty Rostrum
• Centralized
Information
API and
Database
• Apache Thrift Services
• Command: thrift --gen <language>
<.Thrift File>
• Reusable Interfaces
• Server based on C# with Thrift
• Client based on Python with Thrift
• TBinary Protocol Layer
• TSocket Transport Layer
• MSSQL Server DB
• DJango Admin Panel
• Thrift Architecture
• API Interfaces
• C# Thrift Server
• Attaining an Admin Panel with Django and Database
Face Recognition
Face Recognition Pipeline
• Locate and Extract faces
• Identify Facial Features
• Represent Face As Measurement
• Compare Faces
Our Works
1- Face Recognition Using VGG-Face (Transfer Learning)
2- DLIB based Facial Recognition
VGG-FACE? LABELED FACES IN
THE WILD (LFW)
TRANSFER
LEARNING?
OUR DATASET?
FACE DETECTION? MMOD FACE DETECTOR
FACE EMBEDDINGS?
REMOVING THE LAST ACTIVATION LAYER?
OUR CLASSIFIER?
Accuracy loss: 0.0421
Accuracy: 0.9962
Validation Loss: 0.1581
Validation Accuracy: 0.9423
Our Results!
Problems? Scope?
•Training time requires time.
•Dataset too small.
•Did augmentation help? According to
requirement, no. Although better results.
•Runtime training?
Functionalities
• DLIB Face Detector
• Face Locations
• CNN based
• HOG based*
• Face Encodings (128
measurements)
• Compare Faces
Multi-label Classification
Problem!
Workflow
• Creating Dataset
• Preprocessing Data
• Train Our Model
• Testing Our Model
Creating Our
Dataset!
• Firstly, we scraped
images from
Google. Problem?
• Using Microsoft’s
Bing Image Search
API.
Preprocessing Data!
• Extract Multi-class Labels
• Labels list is a “lists of lists”
• Scaling
• Binarize the labels – MultiLabelBinarizer
• transform? Two-hot encoding
• Our Model?
SmallerVGGNet!
• Image Augmentation
Accuracy Loss: 0.0405,
Accuracy: 0.9857
Validation Loss: 0.0429
Validation Accuracy:
0.9842
Testing!
OpenPose
DeepSort
Activity Recognition?
What is OpenPose?
Ildoo Kims Amazing Work
Pipeline
• Heatmaps and PAFs
• NMS – get part candidates
• Bipartite Graphs
• Line Integral
• Assignment
• Merging!
Pretrained Model. Why
not the pyopenpose
library?
Trained on Coco dataset
with Thin MobileNet
Depth-wise? Point to
point wise convolutions.
EXTENSION OF SORT
(SIMPLE REAL-TIME
TRACKER)
THE KALMAN FILTER THE ASSIGNMENT
PROBLEM
DISTANCE METRIC EFFICIENT ALGORITHM
– HUNGARIAN
ALGORITHM
THE APPEARANCE
FEATURE VECTOR
Pretrained Model on:
• MARS Dataset (Motion
Analysis and Re-
identification Set)
DeepSort
Activity Recognition
To get started with Activity Recognition:
• Using OpenCV
• Kinetics Dataset – Created on 2017
• 400 Activities (78.4 – 94.5% Accuracy)
• “Can Spatiotemporal 3D CNNs Retrace the History of 2D
CNNs and ImageNet”? - 2019
To understand pose
recognition we
need to help of
human pose
estimation
Dataset!
stand = 0, walk = 1,
operate = 2,
fall_down = 3
model = Sequential()
model.add(Dense(units=128, activation='relu'))
model.add(BatchNormalization())
model.add(Dense(units=64, activation='relu'))
model.add(BatchNormalization())
model.add(Dense(units=16, activation='relu'))
model.add(BatchNormalization())
model.add(Dense(units=4, activation='softmax'))
Integration
Direct Approach
• Using Models for Predictions Directly
Integrated with UI
• Cannot Use Parallel Approach for
Recognitions
• Can Only Be Used On a Single
Machine At a Time
Service Oriented Approach
• Distributed Approach
• Uses Django REST API services
• All recognition applications are
services
• Parallel request handling for multiple
requests
• Uses POST request for data
• JSON data for each service
• PyQt5
• Application UI
• Output UI
• Training UI
Conclusion
• To be completed?
• Our Integration.
• Our Communication Module.
• Scope?
• Our goals in the future?
Our Dataset
 Face Detection?
 Mmod_human-face_detector used!
 Cropped Images
• Vgg-Face to create
embeddings!
• (224,224) Target Image
• (1,2262) Dimensional
Tensor
• Output layer
• vgg_face=Model(inputs
=model.layers[0].input
,outputs=model.layers
[-2].output)
Before Discarding Output Layer After Discarding Output Layer
• Our Classifier!
• Tuning parameters
• Learning rate?
• Epochs?
model.add(Conv2D(32, (3, 3), padding="same",
input_shape=inputShape))
model.add(Activation("relu"))
model.add(BatchNormalization(axis=chanDim))
model.add(MaxPooling2D(pool_size=(3, 3)))
model.add(Dropout(0.25))
# (CONV => RELU) * 2 => POOL
model.add(Conv2D(64, (3, 3), padding="same"))
model.add(Activation("relu"))
model.add(BatchNormalization(axis=chanDim))
model.add(Conv2D(64, (3, 3), padding="same"))
model.add(Activation("relu"))
model.add(BatchNormalization(axis=chanDim))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))
# (CONV => RELU) * 2 => POOL
model.add(Conv2D(128, (3, 3), padding="same"))
model.add(Activation("relu"))
model.add(BatchNormalization(axis=chanDim))
model.add(Conv2D(128, (3, 3), padding="same"))
model.add(Activation("relu"))
model.add(BatchNormalization(axis=chanDim))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))
# first (and only) set of FC => RELU layers
model.add(Flatten())
model.add(Dense(1024))
model.add(Activation("relu"))
model.add(BatchNormalization())
model.add(Dropout(0.5))
# softmax classifier
model.add(Dense(classes))
model.add(Activation(finalAct))
• Parts and Pairs?
• Heatmaps? Marks Confidence for a
Part.
• Part Affinity Fields? Position and
Orientation of Pairs.
• Non Maximum Suppression? Transform
Confidence into Certainty.
• Extract the Local Maximums
• Compare and Suppress!
• Bipartite Graph?
Connect to Form Pairs.
• Assignment Problem!
Edge Should Have
Weights.
• Line Integral! Measure the effect of a field
along a connection.
• Assignment!
• Merging! Keeping in
mind the same index.
• Results!
Object
Tracking
• Detecting Objects
• Analyzing Temporal Information
• Challenges!
1. Occlusion
2. Variation in View Points
3. Non-stationary Camera
4. Annotating Training Data
Traditional Methods
• Centroid Tracking
• Meanshift
• Optical Flow
• Kalman Filter
Deep Learning
based approaches
• ROLO-Recurrent YOLO
Centroid Tracking
Step 1 – Accept
bounding box
coordinates and
compute centroids
Centroid Tracking
Step 2 – Compute
Euclidean distance
between new bounding
boxes and existing
objects
Centroid Tracking
Step 3 – Update (x,y)
coordinates of existing
objects.
Lonely objects?
Associate centroid with
minimum distances
between subsequent
frames.
Centroid Tracking
Step 4 – Register new
objects.
Step 5 – Deregister old
objects.
Object lost?
Disappeared? Left the
field of view.
Object Tracking
Limitations of Centroid Tracking
1 – Using computationally expensive object detector,
frame detection pipeline will slow down
tremendously.
2 - Underlying assumption of centroid tracking?
Overlapping? Object ID switching.
3 – Just Euclidean distance? Need more heuristics.
Meanshift or Mode seeking
• Used in clustering and unsupervised problems
• Replaces centroid technique of calculating
clusters with a weighted average
• Gives importance to points closer to mean
• Find modes in the given data distribution
• Extract certain features
• Tracks new largest mode in each frame
Object Tracking
Optical Flow
• Uses spatio-temporal image brightness variations at a pixel level
• Focus on displacement vector
• Assumptions
1 – Brightness Consistency
2 – Spatial Coherence
3 – Temporal Persistence
4 – Limited Motion
• Lucas-Kanade method to obtain equation for the velocity of certain
points to be tracked.
DeepSort
The Kalman Filter
• Core idea? Use available detections and previous predictions.
• Errors?
• Constant Velocity Model.
• Noise component? Process Noise? Measurement Noise?
• Recursive Nature.
• Why Kalman works? Gaussian Realm.
The Kalman Filter
• Our state contains 8 variables (u,v,a,h,u’,v’,a’,h’)
• Assumptions? Variables have absolute positions and velocity factors.
• Kalman? Good fit for bounding boxes.
• For every detection, create a track.
• Track, delete tracks and eliminate tracks.
DeepSort
The Assignment Problem - How to
associate new detections with new
predictions?
We need two things:
1 – A Distance Metric
2 – An Efficient Algorithm
The Distance Metric
Squared Mahalanobis distance to incorporate the
uncertainties from the Kalman filter.
The Efficient Algorithm
Hungarian Algorithm for simple data association problem.
The question is “WHERE IS DEEP LEARNING IN ALL THIS?”
New distance metric on the basis of “appearance” of the
object.
(D = Lambda * D_k + (1 - Lambda) * D_a)
Smart environment for industry 4.0
Smart environment for industry 4.0

More Related Content

Similar to Smart environment for industry 4.0

RS in the context of Big Data-v4
RS in the context of Big Data-v4RS in the context of Big Data-v4
RS in the context of Big Data-v4
Khadija Atiya
 
Rapid object detection using boosted cascade of simple features
Rapid object detection using boosted  cascade of simple featuresRapid object detection using boosted  cascade of simple features
Rapid object detection using boosted cascade of simple features
Hirantha Pradeep
 

Similar to Smart environment for industry 4.0 (20)

AWS re:Invent 2016: Transforming Industrial Processes with Deep Learning (MAC...
AWS re:Invent 2016: Transforming Industrial Processes with Deep Learning (MAC...AWS re:Invent 2016: Transforming Industrial Processes with Deep Learning (MAC...
AWS re:Invent 2016: Transforming Industrial Processes with Deep Learning (MAC...
 
Webinar: How We Evaluated MongoDB as a Relational Database Replacement
Webinar: How We Evaluated MongoDB as a Relational Database ReplacementWebinar: How We Evaluated MongoDB as a Relational Database Replacement
Webinar: How We Evaluated MongoDB as a Relational Database Replacement
 
Automated_attendance_system_project.pptx
Automated_attendance_system_project.pptxAutomated_attendance_system_project.pptx
Automated_attendance_system_project.pptx
 
Cutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneCutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for Everyone
 
NVIDIA 深度學習教育機構 (DLI): Medical image segmentation using digits
NVIDIA 深度學習教育機構 (DLI): Medical image segmentation using digitsNVIDIA 深度學習教育機構 (DLI): Medical image segmentation using digits
NVIDIA 深度學習教育機構 (DLI): Medical image segmentation using digits
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance Tuning
 
陸永祥/全球網路攝影機帶來的機會與挑戰
陸永祥/全球網路攝影機帶來的機會與挑戰陸永祥/全球網路攝影機帶來的機會與挑戰
陸永祥/全球網路攝影機帶來的機會與挑戰
 
ICIECA 2014 Paper 05
ICIECA 2014 Paper 05ICIECA 2014 Paper 05
ICIECA 2014 Paper 05
 
pydataPointCloud.pptx
pydataPointCloud.pptxpydataPointCloud.pptx
pydataPointCloud.pptx
 
Kitchen Occupation Project Presentation
Kitchen Occupation Project PresentationKitchen Occupation Project Presentation
Kitchen Occupation Project Presentation
 
20160000 Cloud Discovery Event - Cloud Access Security Brokers
20160000 Cloud Discovery Event - Cloud Access Security Brokers20160000 Cloud Discovery Event - Cloud Access Security Brokers
20160000 Cloud Discovery Event - Cloud Access Security Brokers
 
Distributed Deep Learning Using Java on the Client and in the Cloud
Distributed Deep Learning Using Java on the Client and in the CloudDistributed Deep Learning Using Java on the Client and in the Cloud
Distributed Deep Learning Using Java on the Client and in the Cloud
 
RS in the context of Big Data-v4
RS in the context of Big Data-v4RS in the context of Big Data-v4
RS in the context of Big Data-v4
 
Deep LearningフレームワークChainerと最近の技術動向
Deep LearningフレームワークChainerと最近の技術動向Deep LearningフレームワークChainerと最近の技術動向
Deep LearningフレームワークChainerと最近の技術動向
 
Hack The Future: 10 technical disciplines
Hack The Future: 10 technical disciplinesHack The Future: 10 technical disciplines
Hack The Future: 10 technical disciplines
 
ICPC06.ppt
ICPC06.pptICPC06.ppt
ICPC06.ppt
 
Computer vision for transportation
Computer vision for transportationComputer vision for transportation
Computer vision for transportation
 
The Data Science Process - Do we need it and how to apply?
The Data Science Process - Do we need it and how to apply?The Data Science Process - Do we need it and how to apply?
The Data Science Process - Do we need it and how to apply?
 
(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305
 
Rapid object detection using boosted cascade of simple features
Rapid object detection using boosted  cascade of simple featuresRapid object detection using boosted  cascade of simple features
Rapid object detection using boosted cascade of simple features
 

Recently uploaded

RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
Atif Razi
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
Kamal Acharya
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 

Recently uploaded (20)

RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
 
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data StreamKIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
KIT-601 Lecture Notes-UNIT-3.pdf Mining Data Stream
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdfA CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
IT-601 Lecture Notes-UNIT-2.pdf Data Analysis
IT-601 Lecture Notes-UNIT-2.pdf Data AnalysisIT-601 Lecture Notes-UNIT-2.pdf Data Analysis
IT-601 Lecture Notes-UNIT-2.pdf Data Analysis
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Toll tax management system project report..pdf
Toll tax management system project report..pdfToll tax management system project report..pdf
Toll tax management system project report..pdf
 
fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answer
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker project
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projection
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 

Smart environment for industry 4.0

  • 1. GROUP MEMBERS Jawad Sajid FA16-BCS-181 Mutahhar Ahmad FA16-BCS-122 Usman Sajid FA16-BCS-288
  • 2. Introduction and Problem Statement • Strive for Industry 4.0 • These perspectives are not just ideas! • Current situation of Pakistani Industry • What are the problems we focus on? 1. Govern Access 2. Monitor Activities in Real-time 3. Alert to Environmental Risks
  • 3. Honeywell’s Video Analytics Microsoft’s Amazing Works! Amazon Works! “Real-world Anomaly Detection in Surveillance Videos” by Waqas Sultani, Chen Chen and Mubarak Shah “A Review of the Applications of Computer Vision to Construction Safety” by Brian H.W Guo, Yang Zou and Long Chen
  • 4. On-site 3D Vision Tracking of Construction Personnel by Francisco Cordava and Joannis Brilakis MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications by Google Deep Face Recognition by University of Oxford OpenPose: Realtime Mutli-Person 2D Pose Estimation using Part Affinity Fields Simple Online and Realtime Tracking With Deep Association Metric by Queensland University
  • 5. • Problem of Deploying the Application? • Why two databases? • Importance of API Layer • System logins? Why?
  • 7. DATABASE API DESIGN FACIAL RECOGNITION UNIFORM DETECTION POSE RECOGNITION UI INTEGRATION COMMUNICATI ON MODULE
  • 8.
  • 9. • Initial Database • Not Normalized • Repeated Information • Not Any Centralized Table • Duty Rostrum Missing
  • 10. • Normalized • Duty Rostrum • Centralized Information
  • 11.
  • 12. API and Database • Apache Thrift Services • Command: thrift --gen <language> <.Thrift File> • Reusable Interfaces • Server based on C# with Thrift • Client based on Python with Thrift • TBinary Protocol Layer • TSocket Transport Layer • MSSQL Server DB • DJango Admin Panel
  • 13. • Thrift Architecture • API Interfaces • C# Thrift Server • Attaining an Admin Panel with Django and Database
  • 14.
  • 15.
  • 16. Face Recognition Face Recognition Pipeline • Locate and Extract faces • Identify Facial Features • Represent Face As Measurement • Compare Faces Our Works 1- Face Recognition Using VGG-Face (Transfer Learning) 2- DLIB based Facial Recognition
  • 17. VGG-FACE? LABELED FACES IN THE WILD (LFW) TRANSFER LEARNING?
  • 18. OUR DATASET? FACE DETECTION? MMOD FACE DETECTOR FACE EMBEDDINGS? REMOVING THE LAST ACTIVATION LAYER? OUR CLASSIFIER?
  • 19. Accuracy loss: 0.0421 Accuracy: 0.9962 Validation Loss: 0.1581 Validation Accuracy: 0.9423
  • 21. Problems? Scope? •Training time requires time. •Dataset too small. •Did augmentation help? According to requirement, no. Although better results. •Runtime training?
  • 22. Functionalities • DLIB Face Detector • Face Locations • CNN based • HOG based* • Face Encodings (128 measurements) • Compare Faces
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Multi-label Classification Problem! Workflow • Creating Dataset • Preprocessing Data • Train Our Model • Testing Our Model
  • 28. Creating Our Dataset! • Firstly, we scraped images from Google. Problem? • Using Microsoft’s Bing Image Search API.
  • 29. Preprocessing Data! • Extract Multi-class Labels • Labels list is a “lists of lists” • Scaling • Binarize the labels – MultiLabelBinarizer • transform? Two-hot encoding
  • 30. • Our Model? SmallerVGGNet! • Image Augmentation Accuracy Loss: 0.0405, Accuracy: 0.9857 Validation Loss: 0.0429 Validation Accuracy: 0.9842
  • 32.
  • 34. What is OpenPose? Ildoo Kims Amazing Work Pipeline • Heatmaps and PAFs • NMS – get part candidates • Bipartite Graphs • Line Integral • Assignment • Merging!
  • 35. Pretrained Model. Why not the pyopenpose library? Trained on Coco dataset with Thin MobileNet Depth-wise? Point to point wise convolutions.
  • 36.
  • 37. EXTENSION OF SORT (SIMPLE REAL-TIME TRACKER) THE KALMAN FILTER THE ASSIGNMENT PROBLEM DISTANCE METRIC EFFICIENT ALGORITHM – HUNGARIAN ALGORITHM THE APPEARANCE FEATURE VECTOR
  • 38. Pretrained Model on: • MARS Dataset (Motion Analysis and Re- identification Set)
  • 40. Activity Recognition To get started with Activity Recognition: • Using OpenCV • Kinetics Dataset – Created on 2017 • 400 Activities (78.4 – 94.5% Accuracy) • “Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet”? - 2019
  • 41.
  • 42. To understand pose recognition we need to help of human pose estimation Dataset! stand = 0, walk = 1, operate = 2, fall_down = 3
  • 43.
  • 44. model = Sequential() model.add(Dense(units=128, activation='relu')) model.add(BatchNormalization()) model.add(Dense(units=64, activation='relu')) model.add(BatchNormalization()) model.add(Dense(units=16, activation='relu')) model.add(BatchNormalization()) model.add(Dense(units=4, activation='softmax'))
  • 45.
  • 46.
  • 47. Integration Direct Approach • Using Models for Predictions Directly Integrated with UI • Cannot Use Parallel Approach for Recognitions • Can Only Be Used On a Single Machine At a Time Service Oriented Approach • Distributed Approach • Uses Django REST API services • All recognition applications are services • Parallel request handling for multiple requests • Uses POST request for data • JSON data for each service
  • 48.
  • 49. • PyQt5 • Application UI • Output UI • Training UI
  • 50. Conclusion • To be completed? • Our Integration. • Our Communication Module. • Scope? • Our goals in the future?
  • 51.
  • 53.  Face Detection?  Mmod_human-face_detector used!  Cropped Images
  • 54. • Vgg-Face to create embeddings! • (224,224) Target Image • (1,2262) Dimensional Tensor • Output layer • vgg_face=Model(inputs =model.layers[0].input ,outputs=model.layers [-2].output)
  • 55.
  • 56.
  • 57. Before Discarding Output Layer After Discarding Output Layer
  • 58. • Our Classifier! • Tuning parameters • Learning rate? • Epochs?
  • 59. model.add(Conv2D(32, (3, 3), padding="same", input_shape=inputShape)) model.add(Activation("relu")) model.add(BatchNormalization(axis=chanDim)) model.add(MaxPooling2D(pool_size=(3, 3))) model.add(Dropout(0.25)) # (CONV => RELU) * 2 => POOL model.add(Conv2D(64, (3, 3), padding="same")) model.add(Activation("relu")) model.add(BatchNormalization(axis=chanDim)) model.add(Conv2D(64, (3, 3), padding="same")) model.add(Activation("relu")) model.add(BatchNormalization(axis=chanDim)) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Dropout(0.25)) # (CONV => RELU) * 2 => POOL model.add(Conv2D(128, (3, 3), padding="same")) model.add(Activation("relu")) model.add(BatchNormalization(axis=chanDim)) model.add(Conv2D(128, (3, 3), padding="same")) model.add(Activation("relu")) model.add(BatchNormalization(axis=chanDim)) model.add(MaxPooling2D(pool_size=(2, 2))) model.add(Dropout(0.25)) # first (and only) set of FC => RELU layers model.add(Flatten()) model.add(Dense(1024)) model.add(Activation("relu")) model.add(BatchNormalization()) model.add(Dropout(0.5)) # softmax classifier model.add(Dense(classes)) model.add(Activation(finalAct))
  • 60.
  • 61. • Parts and Pairs? • Heatmaps? Marks Confidence for a Part. • Part Affinity Fields? Position and Orientation of Pairs.
  • 62. • Non Maximum Suppression? Transform Confidence into Certainty. • Extract the Local Maximums • Compare and Suppress!
  • 63. • Bipartite Graph? Connect to Form Pairs. • Assignment Problem! Edge Should Have Weights.
  • 64. • Line Integral! Measure the effect of a field along a connection. • Assignment!
  • 65. • Merging! Keeping in mind the same index. • Results!
  • 66.
  • 67.
  • 68. Object Tracking • Detecting Objects • Analyzing Temporal Information • Challenges! 1. Occlusion 2. Variation in View Points 3. Non-stationary Camera 4. Annotating Training Data
  • 69. Traditional Methods • Centroid Tracking • Meanshift • Optical Flow • Kalman Filter Deep Learning based approaches • ROLO-Recurrent YOLO
  • 70. Centroid Tracking Step 1 – Accept bounding box coordinates and compute centroids
  • 71. Centroid Tracking Step 2 – Compute Euclidean distance between new bounding boxes and existing objects
  • 72. Centroid Tracking Step 3 – Update (x,y) coordinates of existing objects. Lonely objects? Associate centroid with minimum distances between subsequent frames.
  • 73. Centroid Tracking Step 4 – Register new objects. Step 5 – Deregister old objects. Object lost? Disappeared? Left the field of view.
  • 74. Object Tracking Limitations of Centroid Tracking 1 – Using computationally expensive object detector, frame detection pipeline will slow down tremendously. 2 - Underlying assumption of centroid tracking? Overlapping? Object ID switching. 3 – Just Euclidean distance? Need more heuristics.
  • 75. Meanshift or Mode seeking • Used in clustering and unsupervised problems • Replaces centroid technique of calculating clusters with a weighted average • Gives importance to points closer to mean • Find modes in the given data distribution • Extract certain features • Tracks new largest mode in each frame
  • 76. Object Tracking Optical Flow • Uses spatio-temporal image brightness variations at a pixel level • Focus on displacement vector • Assumptions 1 – Brightness Consistency 2 – Spatial Coherence 3 – Temporal Persistence 4 – Limited Motion • Lucas-Kanade method to obtain equation for the velocity of certain points to be tracked.
  • 77. DeepSort The Kalman Filter • Core idea? Use available detections and previous predictions. • Errors? • Constant Velocity Model. • Noise component? Process Noise? Measurement Noise? • Recursive Nature. • Why Kalman works? Gaussian Realm.
  • 78. The Kalman Filter • Our state contains 8 variables (u,v,a,h,u’,v’,a’,h’) • Assumptions? Variables have absolute positions and velocity factors. • Kalman? Good fit for bounding boxes. • For every detection, create a track. • Track, delete tracks and eliminate tracks.
  • 79. DeepSort The Assignment Problem - How to associate new detections with new predictions? We need two things: 1 – A Distance Metric 2 – An Efficient Algorithm
  • 80. The Distance Metric Squared Mahalanobis distance to incorporate the uncertainties from the Kalman filter. The Efficient Algorithm Hungarian Algorithm for simple data association problem. The question is “WHERE IS DEEP LEARNING IN ALL THIS?” New distance metric on the basis of “appearance” of the object. (D = Lambda * D_k + (1 - Lambda) * D_a)