SlideShare a Scribd company logo
1 of 44
Download to read offline
Robert Collins
CSE486




                 Lecture 27:
                 Skin Color
Robert Collins
CSE486
                   Review: Light Transport
    Source emits photons
                                                        And then some reach
                                                        an eye/camera and
                                                        are measured.


                   Photons travel in a
                   straight line




                                         They hit an object. Some are
                                         absorbed, some bounce off
                                         in a new direction.
Robert Collins
CSE486
                      Color of Light Source
                                             Relative amount of light
         Spectral Power Distribution:        energy at each wavelength
                  Amplitude



                              Wavelength λ


                 UV              Visible             IR
Robert Collins
CSE486
                             Spectral Albedo
     Ratio of incoming to outgoing radiation at different wavelengths.

                    Spectral albedo for several different leaves
Robert Collins
CSE486
                         Spectral Radiance



                                                   to a




                  Spectral     Spectral      Spectral
                 Irradiance     Albedo       Radiance
Robert Collins
CSE486
                 Human Eye: Rods and Cones




                         rods (overall intensity)
                         S cones (blue)
                         M cones (green)
                         L cones (red)
Robert Collins
CSE486
                 Putting it all Together = Color




                                         3 cones




                         COLOR!
Robert Collins
CSE486
                       Describing Color



           Today we consider a sample material, human skin,
           and look at two approaches to describe the color
           of skin in order to find it in images.

           1) physics-based approach
           2) learning-based approach
Robert Collins
CSE486
                 Goal: Label Skin Pixels in an Image




                 Applications:
                   Person finding/tracking
                   Gesture recognition
Robert Collins
CSE486
                      The Physics of Skin Color

          Analytic derivation:
          Moritz Storring, Hans Andersen and Eric Granum, “Skin Colour
          Detection under Changing Lighting Conditions,” 7th Symposium on
          Intelligent Robotics Systems, Coimbra Portugal, July 1999.

          Experimental measurement:
          Birgitta Martinkauppi, “Face Colour Under Varying Illumination:
          Analysis and Applications,” Ph.D. Thesis, Oulu University Press,
          Oulu Finland, 2002.
Robert Collins
CSE486
                   Problem: Color Variation
   Apparent color varies due to lighting color and and camera spectral response.




                   Sample from Oulu Physics-Based Face Database
Robert Collins
CSE486
                    Skin Reflectance Model
       Skin is well-modeled by a dichromatic reflectance model.
        transparent medium (dermis)
        pigmentations (hemaglobin, melanin)
        specular reflection (oil on skin)




                                     Dichromatic reflectance model
Robert Collins
CSE486
                 Measuring Spectral Albedo of Skin
Robert Collins
CSE486
                 Understanding Skin Albedo


                                   red
                     blue
Robert Collins
CSE486
                   Understanding Skin Albedo
                 Increase in melanin yields darker skin, masking
                 the absorbtion band pattern of the hemaglobin.
Robert Collins
CSE486
                             Analytic Model
         Generate different skin albedos by using observed curve for
         caucasian, and calculate the reduction in reflectance due to an
         increase in melanin (a substance that has a known absorbtion)




       Simpler approximation: I1(λ) ~ s I2(λ) ; λ = wavelength
                                                        s = scale factor
Robert Collins
CSE486
                                 Illuminant SPD




           Blackbody sources                Artificial light sources
           (for theoretical calculations)
Robert Collins
CSE486
                 Camera Spectral Response




                   SONY DXC-755P 3CCD
                 (manufacturer can supply this)
Robert Collins
CSE486
                 Skin Color Locus : Analytic Computation




                                          “Normalized Color”
                                              recall simple scaling
                                              of SPD curves
Robert Collins
CSE486
                 Skin Color Locus : Experimental Measure




           Fairly good agreement!
Robert Collins
CSE486
                      Skin Locus Examples
            Histograms of skin color for different lighting
            conditions. Red: high values, blue: low values.
Robert Collins
CSE486
                          Tighter Bounds
           If you know the camera and light source, you can
           derive much tighter analytic bounds on skin color.
Robert Collins
CSE486
                            Example
        Same individual under different lighting conditions.


                                         Subject 1:
                                         Caucasian



                                         Subject 2:
                                         Asian Indian
Robert Collins
CSE486
                      Sample Application
        Face tracking under varying illumination conditions
Robert Collins
CSE486
                           Jones and Rehg, 2002

                 “Statistical Color Models with Application to
                 Skin Detection”, M. J. Jones and J. M. Rehg,
                 Int. J. of Computer Vision, 46(1):81-96, Jan 2002


           General Idea:
           • Drop the physics. Learn from examples instead.
           • Learn distributions of skin and nonskin color
           • Nonparametric distributions: color histograms
           • Bayesian classification of skin pixels
Robert Collins
CSE486
                      Learning from Examples
         First, have some poor grad student hand label thousands of images

         P(rgb | skin) = number of times rgb seen for a skin pixel
                           total number of skin pixels seen
         P(rgb | not skin) = number of times rgb seen for a non-skin pixel
                               total number of non-skin pixels seen

         These statistics stored in two 32x32x32 RGB histograms

                 Skin histogram                Non-Skin histogram


                 R                               R
                                 B                                   B
                       G                                  G
Robert Collins
CSE486
                      Learned Distributions




                 Skin color
                   P(rgb | skin)       Non-Skin color
                                         P(rgb | not skin)
Robert Collins
CSE486
                                Likelihood Ratio
                                      P(rgb | skin)
             Label a pixel skin if                       > Θ
                                     P(rgb | not skin)



                        (cost of false positive) P( seeing not skin)
                 Θ =
                         (cost of false negative) P( seeing skin)


                 0 <= Θ <= 1
Robert Collins
CSE486
                 Sample Pixel Classifications

  Θ = .4
Robert Collins
CSE486
                 Sample Application: HCI
                               Haiying Guan, Matthew
                                     Turk, UCSB
Robert Collins
CSE486
                 Sample Application: HCI
                  Haiying Guan, Matthew Turk, UCSB
Robert Collins
CSE486
                 Sample Use: Adult Image Classification




                  Based on Five Features:
                    • Percentage of pixels detected as skin.
                    • Average probability of the skin pixels.
                    • Size in pixels of the largest connected
                          component of skin.
                    • Number of connected components of skin.
                    • Percentage of colors with no entries in the
                          skin and non-skin histograms

                                                             Jones and Rehg
Robert Collins
CSE486
                 Adult Image Classification
Robert Collins
CSE486
                 Combining Color and Text
Robert Collins
CSE486
                 Adult Image Classification

       Other related work:
         M.M. Fleck, D.A. Forsyth and C. Bregler, “Finding
           Naked People,” Proc. European Conf. on Computer
           Vision, Springer-Verlag, 1996. p. 593-602

         James Wang, Jia Li, Gio Wiederhold and Oscar
            Firschein, “System for Screen Objectionable
            Images” Computer Communications, Vol 21(15),
            pp.1355-1369, Elsevier, 1998.
Robert Collins
CSE486
                 Back to Jones and Rehg Model
          A compact description is provided by converting the
          histogram-based model into a Gaussian Mixture model.
Robert Collins
CSE486
                 Jones and Rehg Mixture Model
Robert Collins
CSE486
                 Jones and Rehg Mixture Model
Robert Collins
CSE486
                 Homework: Due Friday Dec 7




          •Download jrmogskin.m from
             the course web site
          •Try it on your own images!
Robert Collins
CSE486
                       What to Hand In


       A short report, in Angel:
        1) one example where it works wonderfully well
        2) one example showing false positives (things that
             are not skin, but that are labeled as skin).
       3) one example showing false negatives (a patch
             of skin that is not labeled), along with an
             educated guess about why it was missed.
Robert Collins
CSE486
                 Examples Working Well
Robert Collins
CSE486
                 Example of False Positives
Robert Collins
CSE486
                             Examples

           Example of
           False Negatives


          Explanation:
          paint on skin
          changes the
          spectral albedo
Robert Collins
CSE486
                         Important Constraint

                 No X-rated images!!!! Keep it clean
                 for the report.

More Related Content

More from zukun

Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionzukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluationzukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-softwarezukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptorszukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectorszukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-introzukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video searchzukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video searchzukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video searchzukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learningzukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionzukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick startzukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysiszukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structureszukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities zukun
 
Icml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featuresIcml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featureszukun
 
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...zukun
 
Quoc le tera-scale deep learning
Quoc le   tera-scale deep learningQuoc le   tera-scale deep learning
Quoc le tera-scale deep learningzukun
 
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...zukun
 
Lecun 20060816-ciar-01-energy based learning
Lecun 20060816-ciar-01-energy based learningLecun 20060816-ciar-01-energy based learning
Lecun 20060816-ciar-01-energy based learningzukun
 

More from zukun (20)

Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 
Icml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featuresIcml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant features
 
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
ECCV2010: Modeling Temporal Structure of Decomposable Motion Segments for Act...
 
Quoc le tera-scale deep learning
Quoc le   tera-scale deep learningQuoc le   tera-scale deep learning
Quoc le tera-scale deep learning
 
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
 
Lecun 20060816-ciar-01-energy based learning
Lecun 20060816-ciar-01-energy based learningLecun 20060816-ciar-01-energy based learning
Lecun 20060816-ciar-01-energy based learning
 

Lecture27

  • 1. Robert Collins CSE486 Lecture 27: Skin Color
  • 2. Robert Collins CSE486 Review: Light Transport Source emits photons And then some reach an eye/camera and are measured. Photons travel in a straight line They hit an object. Some are absorbed, some bounce off in a new direction.
  • 3. Robert Collins CSE486 Color of Light Source Relative amount of light Spectral Power Distribution: energy at each wavelength Amplitude Wavelength λ UV Visible IR
  • 4. Robert Collins CSE486 Spectral Albedo Ratio of incoming to outgoing radiation at different wavelengths. Spectral albedo for several different leaves
  • 5. Robert Collins CSE486 Spectral Radiance to a Spectral Spectral Spectral Irradiance Albedo Radiance
  • 6. Robert Collins CSE486 Human Eye: Rods and Cones rods (overall intensity) S cones (blue) M cones (green) L cones (red)
  • 7. Robert Collins CSE486 Putting it all Together = Color 3 cones COLOR!
  • 8. Robert Collins CSE486 Describing Color Today we consider a sample material, human skin, and look at two approaches to describe the color of skin in order to find it in images. 1) physics-based approach 2) learning-based approach
  • 9. Robert Collins CSE486 Goal: Label Skin Pixels in an Image Applications: Person finding/tracking Gesture recognition
  • 10. Robert Collins CSE486 The Physics of Skin Color Analytic derivation: Moritz Storring, Hans Andersen and Eric Granum, “Skin Colour Detection under Changing Lighting Conditions,” 7th Symposium on Intelligent Robotics Systems, Coimbra Portugal, July 1999. Experimental measurement: Birgitta Martinkauppi, “Face Colour Under Varying Illumination: Analysis and Applications,” Ph.D. Thesis, Oulu University Press, Oulu Finland, 2002.
  • 11. Robert Collins CSE486 Problem: Color Variation Apparent color varies due to lighting color and and camera spectral response. Sample from Oulu Physics-Based Face Database
  • 12. Robert Collins CSE486 Skin Reflectance Model Skin is well-modeled by a dichromatic reflectance model. transparent medium (dermis) pigmentations (hemaglobin, melanin) specular reflection (oil on skin) Dichromatic reflectance model
  • 13. Robert Collins CSE486 Measuring Spectral Albedo of Skin
  • 14. Robert Collins CSE486 Understanding Skin Albedo red blue
  • 15. Robert Collins CSE486 Understanding Skin Albedo Increase in melanin yields darker skin, masking the absorbtion band pattern of the hemaglobin.
  • 16. Robert Collins CSE486 Analytic Model Generate different skin albedos by using observed curve for caucasian, and calculate the reduction in reflectance due to an increase in melanin (a substance that has a known absorbtion) Simpler approximation: I1(λ) ~ s I2(λ) ; λ = wavelength s = scale factor
  • 17. Robert Collins CSE486 Illuminant SPD Blackbody sources Artificial light sources (for theoretical calculations)
  • 18. Robert Collins CSE486 Camera Spectral Response SONY DXC-755P 3CCD (manufacturer can supply this)
  • 19. Robert Collins CSE486 Skin Color Locus : Analytic Computation “Normalized Color” recall simple scaling of SPD curves
  • 20. Robert Collins CSE486 Skin Color Locus : Experimental Measure Fairly good agreement!
  • 21. Robert Collins CSE486 Skin Locus Examples Histograms of skin color for different lighting conditions. Red: high values, blue: low values.
  • 22. Robert Collins CSE486 Tighter Bounds If you know the camera and light source, you can derive much tighter analytic bounds on skin color.
  • 23. Robert Collins CSE486 Example Same individual under different lighting conditions. Subject 1: Caucasian Subject 2: Asian Indian
  • 24. Robert Collins CSE486 Sample Application Face tracking under varying illumination conditions
  • 25. Robert Collins CSE486 Jones and Rehg, 2002 “Statistical Color Models with Application to Skin Detection”, M. J. Jones and J. M. Rehg, Int. J. of Computer Vision, 46(1):81-96, Jan 2002 General Idea: • Drop the physics. Learn from examples instead. • Learn distributions of skin and nonskin color • Nonparametric distributions: color histograms • Bayesian classification of skin pixels
  • 26. Robert Collins CSE486 Learning from Examples First, have some poor grad student hand label thousands of images P(rgb | skin) = number of times rgb seen for a skin pixel total number of skin pixels seen P(rgb | not skin) = number of times rgb seen for a non-skin pixel total number of non-skin pixels seen These statistics stored in two 32x32x32 RGB histograms Skin histogram Non-Skin histogram R R B B G G
  • 27. Robert Collins CSE486 Learned Distributions Skin color P(rgb | skin) Non-Skin color P(rgb | not skin)
  • 28. Robert Collins CSE486 Likelihood Ratio P(rgb | skin) Label a pixel skin if > Θ P(rgb | not skin) (cost of false positive) P( seeing not skin) Θ = (cost of false negative) P( seeing skin) 0 <= Θ <= 1
  • 29. Robert Collins CSE486 Sample Pixel Classifications Θ = .4
  • 30. Robert Collins CSE486 Sample Application: HCI Haiying Guan, Matthew Turk, UCSB
  • 31. Robert Collins CSE486 Sample Application: HCI Haiying Guan, Matthew Turk, UCSB
  • 32. Robert Collins CSE486 Sample Use: Adult Image Classification Based on Five Features: • Percentage of pixels detected as skin. • Average probability of the skin pixels. • Size in pixels of the largest connected component of skin. • Number of connected components of skin. • Percentage of colors with no entries in the skin and non-skin histograms Jones and Rehg
  • 33. Robert Collins CSE486 Adult Image Classification
  • 34. Robert Collins CSE486 Combining Color and Text
  • 35. Robert Collins CSE486 Adult Image Classification Other related work: M.M. Fleck, D.A. Forsyth and C. Bregler, “Finding Naked People,” Proc. European Conf. on Computer Vision, Springer-Verlag, 1996. p. 593-602 James Wang, Jia Li, Gio Wiederhold and Oscar Firschein, “System for Screen Objectionable Images” Computer Communications, Vol 21(15), pp.1355-1369, Elsevier, 1998.
  • 36. Robert Collins CSE486 Back to Jones and Rehg Model A compact description is provided by converting the histogram-based model into a Gaussian Mixture model.
  • 37. Robert Collins CSE486 Jones and Rehg Mixture Model
  • 38. Robert Collins CSE486 Jones and Rehg Mixture Model
  • 39. Robert Collins CSE486 Homework: Due Friday Dec 7 •Download jrmogskin.m from the course web site •Try it on your own images!
  • 40. Robert Collins CSE486 What to Hand In A short report, in Angel: 1) one example where it works wonderfully well 2) one example showing false positives (things that are not skin, but that are labeled as skin). 3) one example showing false negatives (a patch of skin that is not labeled), along with an educated guess about why it was missed.
  • 41. Robert Collins CSE486 Examples Working Well
  • 42. Robert Collins CSE486 Example of False Positives
  • 43. Robert Collins CSE486 Examples Example of False Negatives Explanation: paint on skin changes the spectral albedo
  • 44. Robert Collins CSE486 Important Constraint No X-rated images!!!! Keep it clean for the report.