SlideShare a Scribd company logo
1 of 17
CASE STUDY
A PLATINUM INSPECTION SYSTEM
USING IMAGE PROCESSING
Darien Pardinas Diaz
1. System concept and setup
• Scanning setup
• Defect types to detect
2. Training and validation dataset development
• Manual annotations with product manager
3. Algorithm development
• Prototyping
• Development tools used
4. Lessons learnt and recommendations
5. Quick Demo
Page 2
Outline
• Tray of up to 15 platinum
strips 480mm x 23mm
• Line scan camera with
100pixels/mm resolution
(600MB)
• 3 Lighting arrangements
targeting different defect
types
• Scanning time less than 5
minutes
Page 3
System concept and scan setup
Page 4
Scanning the tray…
Page 5
Sample scan image
Lighting B Lighting ALighting C
(Never used)
1. Scratches
2. Squiggles
3. Blisters (burst/unburst)
4. Dents
5. Stains
Page 6
Defect types to find
Page 7
Training set development
23 failed strips with a range of defect types and severities
Page 8
Algorithm development
A
Dark blob detection
 Hysteresis threshold
 Coarse blob selection
Classification
(MLP)
Line Detection
 Line gauss operator
with scaled image
 Contour selection
Defects
(Squiggles, some
scratches)
Defects
(Mainly
scratches)
Classification
(MLP)
B
Detect Bright Blobs
• Thresholding
• Coarse blob selection
Paired blobs
Defects
(Pits and
dents)
Detect Dark Blobs
• Thresholding
• Coarse blob selection
Classification
(MLP)
Defects
(Pits, Deep
scratches)
Defects
(Squiggles,
stains)
Classification
(MLP)
Classification
(MLP)
Image normalisation
Page 9
Dark blob detection - example
hysteresis_threshold
Page 10
Lines detection - scratches
line_gauss
Page 11
Intensity normalisation
subtract mean image
Page 12
Paired blob detection – dents, pits
Blob pairing algorithm
Morphological features (blob contour) Texture features (pixel intensity)
area
contlength
circularity
compactness
dist_sigma
roundness
entropy
anisotropy
anisometry
bulkiness
structure_factor
phi
length
convexity
mean_gray
std_gray
energy
correlation
homogeneity
mean_gray
std_gray
energy
correlation
homogeneity
contrast
entropy
anisotropy
Invetech confidential file: File name/number (use macro : alt+f8
> Run ‘footer’)
Features for classification
MLP training – Overfitting problem
- Adjusted the number of neurons in the hidden layer (30 neurons)
- Used PCA to reduce the number of neurons in the input layer
- Multiple scans of the same annotated strip – evaluate repeatability
Page 14
DevelopmentTools - HDevelop
 Great REPL
experience
 Detailed
feature
inspection
 Interactive
region
filtering
 100+ real life
examples out
of the box
 Export to
C/C++/C#
 $7000 Developer license
 $2000 Runtime license
 Not all operators have
equivalent in OpenCV
Page 15
Algorithm prototyping with HDevelop
1. Early prototyping is critical to mitigate project risk
2. Invest as much effort as possible on developing a large, high-quality
validation set of images and ideal results
• Helps to understand the problem space
• Provide confidence in the robustness of the algorithms
3. Involve the client in the annotation process of a validation set (if the
project contains supervised training)
• Manage client expectation on what the system will be capable of
4. Get the client to agree on objective measurements of system
performance
• Transparency on the outcome of the project
• Non technical stakeholders usually have high expectation of what ComputerVision can
do
Page 16
Lessons learnt and recommendations
Page 17
Thank you!
DEMO time!

More Related Content

Similar to Platinum Inspection Case Study Using Image Processing

Enabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial IntelligenceEnabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial IntelligenceLionel Briand
 
2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction 2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction Mark Billinghurst
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareJustin Basilico
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkIvo Andreev
 
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...Lionel Briand
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareJustin Basilico
 
Predicting Azure Churn with Deep Learning and Explaining Predictions with LIME
Predicting Azure Churn with Deep Learning and Explaining Predictions with LIMEPredicting Azure Churn with Deep Learning and Explaining Predictions with LIME
Predicting Azure Churn with Deep Learning and Explaining Predictions with LIMEFeng Zhu
 
AutoML for user segmentation: how to match millions of users with hundreds of...
AutoML for user segmentation: how to match millions of users with hundreds of...AutoML for user segmentation: how to match millions of users with hundreds of...
AutoML for user segmentation: how to match millions of users with hundreds of...Institute of Contemporary Sciences
 
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGESA DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGESPNandaSai
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expertgaoliang641
 
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and TacticalTLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and TacticalAnna Royzman
 
Machine Learning: How small businesses can enter the race
Machine Learning: How small businesses can enter the raceMachine Learning: How small businesses can enter the race
Machine Learning: How small businesses can enter the raceScaleway
 
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 TuningjClarity
 
SourceWarp AST 2023.pdf
SourceWarp AST 2023.pdfSourceWarp AST 2023.pdf
SourceWarp AST 2023.pdfJulian Thome
 
Making Netflix Machine Learning Algorithms Reliable
Making Netflix Machine Learning Algorithms ReliableMaking Netflix Machine Learning Algorithms Reliable
Making Netflix Machine Learning Algorithms ReliableJustin Basilico
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用CHENHuiMei
 
Intro to Machine Learning by Microsoft Ventures
Intro to Machine Learning by Microsoft VenturesIntro to Machine Learning by Microsoft Ventures
Intro to Machine Learning by Microsoft Venturesmicrosoftventures
 

Similar to Platinum Inspection Case Study Using Image Processing (20)

Enabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial IntelligenceEnabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial Intelligence
 
2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction 2013 Lecture 5: AR Tools and Interaction
2013 Lecture 5: AR Tools and Interaction
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning Software
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it Work
 
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning Software
 
Predicting Azure Churn with Deep Learning and Explaining Predictions with LIME
Predicting Azure Churn with Deep Learning and Explaining Predictions with LIMEPredicting Azure Churn with Deep Learning and Explaining Predictions with LIME
Predicting Azure Churn with Deep Learning and Explaining Predictions with LIME
 
AutoML for user segmentation: how to match millions of users with hundreds of...
AutoML for user segmentation: how to match millions of users with hundreds of...AutoML for user segmentation: how to match millions of users with hundreds of...
AutoML for user segmentation: how to match millions of users with hundreds of...
 
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGESA DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
 
When Should I Use Simulation?
When Should I Use Simulation?When Should I Use Simulation?
When Should I Use Simulation?
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expert
 
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and TacticalTLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
 
Machine Learning: How small businesses can enter the race
Machine Learning: How small businesses can enter the raceMachine Learning: How small businesses can enter the race
Machine Learning: How small businesses can enter the race
 
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
 
SourceWarp AST 2023.pdf
SourceWarp AST 2023.pdfSourceWarp AST 2023.pdf
SourceWarp AST 2023.pdf
 
Making Netflix Machine Learning Algorithms Reliable
Making Netflix Machine Learning Algorithms ReliableMaking Netflix Machine Learning Algorithms Reliable
Making Netflix Machine Learning Algorithms Reliable
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用
 
Intro to Machine Learning by Microsoft Ventures
Intro to Machine Learning by Microsoft VenturesIntro to Machine Learning by Microsoft Ventures
Intro to Machine Learning by Microsoft Ventures
 
Foutse_Khomh.pptx
Foutse_Khomh.pptxFoutse_Khomh.pptx
Foutse_Khomh.pptx
 
ExplainableAI.pptx
ExplainableAI.pptxExplainableAI.pptx
ExplainableAI.pptx
 

Recently uploaded

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 

Platinum Inspection Case Study Using Image Processing

  • 1. CASE STUDY A PLATINUM INSPECTION SYSTEM USING IMAGE PROCESSING Darien Pardinas Diaz
  • 2. 1. System concept and setup • Scanning setup • Defect types to detect 2. Training and validation dataset development • Manual annotations with product manager 3. Algorithm development • Prototyping • Development tools used 4. Lessons learnt and recommendations 5. Quick Demo Page 2 Outline
  • 3. • Tray of up to 15 platinum strips 480mm x 23mm • Line scan camera with 100pixels/mm resolution (600MB) • 3 Lighting arrangements targeting different defect types • Scanning time less than 5 minutes Page 3 System concept and scan setup
  • 5. Page 5 Sample scan image Lighting B Lighting ALighting C (Never used)
  • 6. 1. Scratches 2. Squiggles 3. Blisters (burst/unburst) 4. Dents 5. Stains Page 6 Defect types to find
  • 7. Page 7 Training set development 23 failed strips with a range of defect types and severities
  • 8. Page 8 Algorithm development A Dark blob detection  Hysteresis threshold  Coarse blob selection Classification (MLP) Line Detection  Line gauss operator with scaled image  Contour selection Defects (Squiggles, some scratches) Defects (Mainly scratches) Classification (MLP) B Detect Bright Blobs • Thresholding • Coarse blob selection Paired blobs Defects (Pits and dents) Detect Dark Blobs • Thresholding • Coarse blob selection Classification (MLP) Defects (Pits, Deep scratches) Defects (Squiggles, stains) Classification (MLP) Classification (MLP) Image normalisation
  • 9. Page 9 Dark blob detection - example hysteresis_threshold
  • 10. Page 10 Lines detection - scratches line_gauss
  • 12. Page 12 Paired blob detection – dents, pits Blob pairing algorithm
  • 13. Morphological features (blob contour) Texture features (pixel intensity) area contlength circularity compactness dist_sigma roundness entropy anisotropy anisometry bulkiness structure_factor phi length convexity mean_gray std_gray energy correlation homogeneity mean_gray std_gray energy correlation homogeneity contrast entropy anisotropy Invetech confidential file: File name/number (use macro : alt+f8 > Run ‘footer’) Features for classification MLP training – Overfitting problem - Adjusted the number of neurons in the hidden layer (30 neurons) - Used PCA to reduce the number of neurons in the input layer - Multiple scans of the same annotated strip – evaluate repeatability
  • 14. Page 14 DevelopmentTools - HDevelop  Great REPL experience  Detailed feature inspection  Interactive region filtering  100+ real life examples out of the box  Export to C/C++/C#  $7000 Developer license  $2000 Runtime license  Not all operators have equivalent in OpenCV
  • 16. 1. Early prototyping is critical to mitigate project risk 2. Invest as much effort as possible on developing a large, high-quality validation set of images and ideal results • Helps to understand the problem space • Provide confidence in the robustness of the algorithms 3. Involve the client in the annotation process of a validation set (if the project contains supervised training) • Manage client expectation on what the system will be capable of 4. Get the client to agree on objective measurements of system performance • Transparency on the outcome of the project • Non technical stakeholders usually have high expectation of what ComputerVision can do Page 16 Lessons learnt and recommendations

Editor's Notes

  1. So, what I’ll do today is to run through one of the machine inspection systems I developed while working at BE This project was for a client who manufactures platinum to be used mainly in medical implants, such as cochlear implants The problem they were facing was that they had inspect manually the platinum strips they produce and assess the quality of the surface, so they wanted to automate this process and hired BE to look at the problem So I joined BE about 2 years after this project started, but at that time the image processing algorithms that were designed didn’t provide the results the client requested. So, my first assignment was to start looking at the existing algorithms and come up with new approaches that would solve this problem.
  2. 2
  3. -So the system consisted of a tray where you could lay up to 15 platinum strips of approximately 480mm by 23mm and image them with a line scan camera. -The image resolution was about 100pixels/mm, producing grayscale images that were 600MB each uncompressed. -Each strip is imaged progressively under 3 different lighting arrangement with the aim of highlighting a range of defect types with each one. -This system is capable of imaging and processing the tray in less than 5min and show the defects found. -As a note, each of this strips costs over $1000, so you can understand now why I’m not bringing one of them as sample 
  4. In this video you can see how the strips are scanned with an X/Y robot. The line scan camera is coupled to the Y motor encoder to trigger the acquisition of lines as the scan goes along.
  5. So this is what the acquired scan image looks like. On every scan, 3 different strips are imaged at once, each illuminated with a different light arrangement. Then the camera is moved to the right, one strip position at the time. For a 15 strip scan, you end up with 17 scan images. There is a pre-processing step to segment each scan image into individual strip images so that we end up with 3 strip images referring to the same strip. In the final setup, we ended up just using lighting A and B, as defects showing up on C would always show better in either A or B light.
  6. In this slide you can see the most common defect types that the system had to be able to detect. They include scratches, squiggles, blisters (both burst and unburst blisters), dents, stains, pits, inclusions, etc.
  7. Given the range of defect types and severities in which they could appear it becomes really important to develop a dataset as large as possible that contains a representative sample of each of the defect types to find So for this project I developed an annotation tool that would allow us to annotate the defects we were trying to find as well as things that would look just like a defect, but weren’t, for example lint dust that remained on top of the strip after cleaning them with a “lint-free” cloth. This was really important in order to provide the machine learning algorithm good quality input. So I went onsite and spent a couple of days with the production manager imaging and annotating as many failed strips as we could (23 in total) This is a really tedious work, but the effort you put into it really have an impact in the success or failure of a project For example, while going through the annotation process we found that some defects showed well the image, but were hardly visible on the strips by the naked eye and vice-versa – and this is because the platinum is highly reflective and the defect visibility is extremely sensitive to the illumination angle and the eye location The fact that the production manager was involved in this annotation process helped initiate discussions that ultimately ended up adjusting the client’s expectation on the system and gave them the proper view that this project had a huge research component that translated in project risk. In order to keep things as transparent as possible, I regularly provided algorithm performance measures such as sensitivity/specificity and accuracy across the range of defects and severities – those are well known metrics that apply to most detection and classification systems While it was hard for them to understand what these numbers actually mean, at least gave them a sense that we were making progress while the algorithms were refined and tuned.
  8. So to cover the broad range of defect types I designed several algorithms to extract potential defective blobs from the strip images For the strip image under lighting A, I simply applied a hysteresis thresholding algorithm to extract dark blobs In this lighting, defects such as scratches were visible but really challenging to detect, so I used a line detection operator that is really good at joining weak and broken lines together For the strips image under lighting B, things were more complicated, in this case there was a number of defects that would either show as dark regions or bright regions depending on the surface relief of the strip. In this case, I had to normalise the image intensity range and they apply traditional thresholding techniques to segment potential defective blobs. Once the potential candidates are found the next step is to extract a feature vector for each of them and pass them to the classification model, which will evaluate each input and provide a score on how likely this blob is a defect based on the learning from the training stage.
  9. In this image you can see for example a well defined squiggle somewhat overlapping with a short scratch, in this case you can see how a simple hysteresis thresholding algorithm can perfectly segment the defect. Hysteresis thresholding is similar to normal thresholding but has the advantage of adding less defined pixels to the blob as long as they are over a minimum threshold intensity and certain distance of a well defined pixel (upper threshold)
  10. In this image you can see how the scratch detection algorithm works. The line detector operator I used works by estimating for each pixel, if they were part of a line, in what direction that line would run and how likely is that that pixel is part of a line. Then, depending on how selective the algorithm is configured, it will output a collection of contours which you can filter out, for example, these short lines on the left are immediately ignored because their length is too short.
  11. Here you can see the normalisation algorithm in action. On the left you get the original image taken under lighting B, which shows a surface illuminated unevenly and in the right side you can see the normalised image, which makes easer to parameterise a segmenting algorithm.
  12. This is one of my favourite contributions to this project In order to detect defects like dents, I came up with a simple and effective algorithm: I found that if I pair dark and bright blobs that satisfied certain Area / Intensity and maximum separation distance, I could detect defects like dents with really good accuracy.
  13. Once the potential blobs are detected you need to classify them into defect or non defect using some classification model For this project, I chose a MLPs networks (that’s a type of ANN) with a single hidden layer of neurons One of the biggest problem with ANN and machine learning in general is that is hard provide a meaningful input and at the same time avoid the overfitting problem. The overfitting problem happens when the size of the network too large for the training set. In this case, the algorithm learns extremely well to classify correctly your training data, but performs poorly on other validation data of your problem domain. Because the amount of training data was short, I had to limit both the number of neurons in the input and hidden layer. For the input layer, I used PCA, which reduces the dimension of the input feature vector. For the hidden layer I just used the rule of thumb that recommends the double of the number of neurons in the input layer. To evaluate algorithm repeatability – which proved to be an issue in some cases – I scanned the same strip multiple times and validate classification against them to find out how consistent the results were.
  14. So to prototype all these algorithms I mainly used a machine vision software package developed by a German company called MVTec This machine vision kit is called HALCON (Falcon) and includes an IDE called HDevelop with a simple yet powerful scripting language To the best of my knowledge there isn’t anything as helpful as this tool for prototyping image processing algorithms: It has a great REPL – you can set the executing cursor in whatever line you want to execute next, you can overlay images and regions to see intermediate results without having to write any code whatsoever You can do detailed feature inspection, create custom selection filters interactively to filter regions of interest and so much more. It also comes with more than 100 different real life examples sorted by industry, method, etc. that you can study and adapt to your specific problem with little effort The downside is that as good as it sounds it is about $7000 per developer license and $2000 for run-time license – only useful for prototyping or if developing some really expensive instrument or system (e.g. MRI, CAT scanner) Also not all operators have a direct equivalent in OpenCV – but usually enough documentation is provided to understand how the algorithm works so that it could be implemented if needed (reference to research papers)
  15. This screenshot for example shows the algorithm prototyped to detect blobs in lighting A On the top left you have a graphics window where you can see the results on each execution step if run step by step Below you get the list of iconic variables in your executing procedure and you can clear the window and overlay the results as you like A bit below are the control tuples – that is, the control variables you use to configure your operators (list of integers, doubles and strings) On the right hand side you can see the algorithm code you are developing and testing. The green arrow is the next executing instruction, which you can change to point anywhere in the procedure or outside of it.
  16. Firstly, Early prototyping is critical to mitigate project risk – this is no news for anyone here, but where there is image processing involved, there is always uncertainty and this is because a camera never produces the same image twice. I have worked in projects that you get to a solution that works fine 99.9% of the time, but from there to get to 100% of the requirement could take 2 or 3 times more. Secondly, spend as much effort as possible in developing a large, high-quality validation set of images and ideal results Helps to understand the problem space which is really important when prototyping Provide confidence in the robustness of the algorithms – you know you are covering a big chunk of the problem space Thirdly, Involve the client in the annotation process of a validation set (if the project contains supervised training) Finally, get the client to agree on objective measurements of system performance - Non technical people usually have high expectations on what computer vision can do – I blame Hollywood for this