59
Content-Based Image Retrieval Charlie Dagli and Thomas S. Huang {dagli,huang}@ifp.uiuc.edu 1

CBIR

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: CBIR

Content-Based Image Retrieval

Charlie Dagli and Thomas S. Huang{dagli,huang}@ifp.uiuc.edu

1

Page 2: CBIR

Munehiro Nakazato and Charlie Dagli

Outline What is CBIR ? Image Features Feature Weighting and Relevance

Feedback User Interface and Visualization

2

Page 3: CBIR

Munehiro Nakazato and Charlie Dagli

What is Content-based Image Retrieval (CBIR)? Image Search Systems that search

for images by image content<-> Keyword-based Image/Video Retrieval

(ex. Google Image Search, YouTube)

3

Page 4: CBIR

Munehiro Nakazato and Charlie Dagli

Applications of CBIR Consumer Digital Photo Albums

Digital Cameras Flickr

Medical Images Digital Museum Trademarks Search MPEG-7 Content Descriptors

4

Page 5: CBIR

Munehiro Nakazato and Charlie Dagli

Basic Components of CBIR Feature Extractor

Create the metadata Query Engine

Calculate similarity User Interface

5

Page 6: CBIR

Munehiro Nakazato and Charlie Dagli

How does CBIR work ? Extract Features from Images Let the user do Query

Query by Sketch Query by Keywords Query by Example

Refine the result by Relevance Feedback Give feedback to the previous result

6

Page 7: CBIR

Munehiro Nakazato and Charlie Dagli

Query by Example

Query Sample

Results

CBIR“Get similar images”

Pick example images, then ask the system to retrieve “similar” images.

What does “similar” mean?

7

Page 8: CBIR

Munehiro Nakazato and Charlie Dagli

Relevance Feedback User gives a feedback to the query results System recalculates feature weights

Initialsample 1st Result

Query

2nd Result

Feedback Feedback

8

Page 9: CBIR

Munehiro Nakazato and Charlie Dagli

Basic Components of CBIR Feature Extractor

Create the metadata Query Engine

Calculate similarity User Interface

9

Page 10: CBIR

Munehiro Nakazato and Charlie Dagli

Image Features (Metadata) Color Texture Structure etc

10

Page 11: CBIR

Munehiro Nakazato and Charlie Dagli

Color Features Which Color Space?

RGB, CMY, YCrCb, CIE, YIQ, HLS, … Our Favorite is HSV

Designed to be similar to human perception

11

Page 12: CBIR

Munehiro Nakazato and Charlie Dagli

HSV Color Space H (Hue)

Dominant color (spectral) S (Saturation)

Amount of white V (Value)

Brightness

How to Use This?

12

Page 13: CBIR

Munehiro Nakazato and Charlie Dagli

Straightforward way to use HSV as color features

Histogram for each H, S, and V Then compare in each bin Is this a good idea?

13

Page 14: CBIR

Munehiro Nakazato and Charlie Dagli

Are these two that different? Histogram comparison is very

sensitive

14

Page 15: CBIR

Munehiro Nakazato and Charlie Dagli

Color Moments [Stricker ‘95]

For each image, the color distribution in each of H, S and V is calculated 1st (mean), 2nd (var) and 3rd moment for HSV

Ei =1N

pijj=1

N∑

σ i = ( 1N

(pij − Eij=1

N∑ )2)1 2

si = ( 1N

(pij − Eij=1

N∑ )3)1 3

i : color channel {i=h,s,v} N = # of pixels in imageTotal 9 features

15

Page 16: CBIR

Munehiro Nakazato and Charlie Dagli

Shape Features

Region-Based Shape Outer Boundary

Contour-Based Shape Features of Contour

Edge-Based Shape Ex. Histogram of edge length and

orientation

16

Page 17: CBIR

Munehiro Nakazato and Charlie Dagli

Region-based vs. Contour-based Region-based

Suitable for Complex objects with disjoint region

Contour-based Suitable when semantics are contained in

the contour

17

Page 18: CBIR

Munehiro Nakazato and Charlie Dagli

Region-based vs. Contour-basedRegion Complexity

ContourComplexity

18

Page 19: CBIR

Munehiro Nakazato and Charlie Dagli

Region-based vs. Contour-based

Good Examples for Region-based shape

Good Examples for Contour-based shape

19

Page 20: CBIR

Munehiro Nakazato and Charlie Dagli

Angular Radial Transformation (ART) [Kim’99]

A Region-based shape Calculate the coefficients based on image

intensities in polar coordinates (n<3, m<12)

Fnm = Vnm (ρ,θ ) f (o1∫0

2π∫ ρ,θ )ρdρdθ

f (ρ,θ )L image intensity in polar coordinatesVnm (ρ,θ )LART basis functionVnm (ρ,θ ) = 1/2π exp( jmθ )Rn (ρ)

Rn (ρ) =1 n = 0

2 cos(πnρ) n ≠ 0

Total 35 coefficients in 140 bits (4 bits/coeff)

20

Page 21: CBIR

Munehiro Nakazato and Charlie Dagli

Curvature Scale-Space (CSS)[Mokhtaarian ‘92]

A contour-based shape1) Apply lowpass filter repeatedly until

concave contours smoothed out2) “How contours are filtered” becomes

the features• Zero crossing in the curvature functions

after each application of the lowpass filter

• CSS Image

21

Page 22: CBIR

Munehiro Nakazato and Charlie Dagli

CSS Image

Smoothing

Tracks zero-crossing locations of each concavity in the contour CurvatureContour

A

A

B

B

F

EF

E

CD 3 ITR

29 ITR

100 ITR

22

Page 23: CBIR

Munehiro Nakazato and Charlie Dagli

CSS Features # of peaks in CSS images Highest peak Circularity (perimeter2/ area) Eccentricity Etc.

23

Page 24: CBIR

Munehiro Nakazato and Charlie Dagli

Texture Features Wavelet-based Texture Features

[Smith’94]

24

Page 25: CBIR

Munehiro Nakazato and Charlie Dagli

Wavelet Filter Bank

Original Image

Detail (high freq)

Coarse Info (low freq)

WaveletFilter

25

Page 26: CBIR

Munehiro Nakazato and Charlie Dagli

Texture Features from Wavelet

WaveletFilterBank

WaveletImage

OriginalImage

FeatureExtraction

f0,vo

f1,v1

f2,v2

f3,v3

f4,v4f5,v5

f6,v6

Take the mean and variance of each subband

Decompose the images into frequency subbands

26

Page 27: CBIR

Munehiro Nakazato and Charlie Dagli

Other approaches: Region-Based Global features often times fail to

capture local content in an image

GLOBAL DESCRIPTION

color, texture, shape{Green, Grassy, Hillside}

No sheep? No fence? No houses?

27

Page 28: CBIR

Munehiro Nakazato and Charlie Dagli

Other approaches: Region-Based Segmentation-Based

Images are segmented by color/texture similarities: Blobworld [Carson ‘99], Netra [Ma and Manjunath ‘99]

Grid-Based Images are partitioned, features are calculated from

blocks: [Tian ‘00],[Moghaddam ‘99]

28

Page 29: CBIR

Munehiro Nakazato and Charlie Dagli

Other approaches: Region-Based Combine Grid and Segmentation: [Dagli and Huang, ‘04]

29

Page 30: CBIR

Munehiro Nakazato and Charlie Dagli

Basic Components of CBIR Feature Extractor

Create the metadata Query Engine

Calculate similarity User Interface

30

Page 31: CBIR

Munehiro Nakazato and Charlie Dagli

Now, We have many features (too many?)

How to express visual “similarity” with these features?

31

Page 32: CBIR

Munehiro Nakazato and Charlie Dagli

Visual Similarity ? “Similarity” is Subjective and Context-

dependent. “Similarity” is High-level Concept.

Cars, Flowers, … But, our features are Low-level features.

Semantic Gap!

32

Page 33: CBIR

Munehiro Nakazato and Charlie Dagli

Which features are most important?

Not all features are always important. “Similarity” measure is always changing The system has to weight features on the fly.

How ?

33

Page 34: CBIR

Munehiro Nakazato and Charlie Dagli

Online Feature Weighting Approach #1 - Manual

Ask the user to specify number“35% of color and 50% of texture…”

Very difficult to determine the numbers Approach #2 - Automatic

Learn feature weights from examples Relevance Feedback

34

Page 35: CBIR

Munehiro Nakazato and Charlie Dagli

Online Feature Weighting From Query Examples, the system

determines feature weighting matrix W

ResultQuery

CBIRCalculate W

distance(r x , r y ) = ( r x −r y )T W ( r x −

r y )

35

Page 36: CBIR

Munehiro Nakazato and Charlie Dagli

How to Calculate W ? No Negative Examples (1-class) Positive and Negative Examples (2-class) One Positive and Many Negative classes

(1+x)-class Many Positive and Many Negative classes

(x+y)-class

36

Page 37: CBIR

Munehiro Nakazato and Charlie Dagli

When there are only relevant images available…

We want to give more weights to common features among example images.

Use the variance. Features with low variance

-> Common features -> Give higher weight

37

Page 38: CBIR

Munehiro Nakazato and Charlie Dagli

One Class Relevance Feedback in MARS [Rui ‘98]

W =

1/σ12 01/σ 2

2

1/σ 32

O

0 1/σ k2

Calculates the Variance among relevant examples. The inverse of variance becomes the weight of each

feature. This means “common features” between positive

examples have larger weights.

W is a k x k diagonal matrix

38

Page 39: CBIR

Munehiro Nakazato and Charlie Dagli

Relevance Feedback as Two-Class Problem (positive and negative)

Fisherʼs Discriminant Analysis (FDA)

positive

negative

Find a W that … minimizes the scatter

of each class cluster (within scatter)

maximizes the scatter between the clusters (between scatter)

39

Page 40: CBIR

Munehiro Nakazato and Charlie Dagli

Two-Class problem

Target function W is full matrix

W = argmaxW

W TSBWW TSWW

SBLBetween Scatter MatrixSW LWithin Scatter Matrix

SW = j∈group # i(x j −mi)(x j −mi)T∑

i=1

2∑

SB = (m1 −m2)(m1 −m2)T

m1,m2Lmean of each class

40

Page 41: CBIR

Munehiro Nakazato and Charlie Dagli

Solution The problem is reduced to

generalized eigenvalue problem

SBwi = λiSWwi

W =ΦΛ1/ 2

ΛLdiagonal matrix of eigenvaluesΦLeigenvectors

41

Page 42: CBIR

Munehiro Nakazato and Charlie Dagli

From Two-class to (1+x)-class

Positive examples are usually from one class such as flower

Negative examples can be from any classes such as “car”, “elephant”, “orange”…

It is not desirable to assume negative images as one class.

42

Page 43: CBIR

Munehiro Nakazato and Charlie Dagli

RF as (1+x)-Class Problem

positivenegative

• Biased Discriminant Analysis [Zhou et al. ‘01]• Negative examples can be any images• Each negative image has its own group

SW = (x −m)(x −m)Tx∈positive

∑SB = (x −m)(x −m)T

x∈negative∑mLmean of positive class

The solution is similar to FDA43

Page 44: CBIR

Munehiro Nakazato and Charlie Dagli

positive

negative

RF as (x+y)-Class Problem Group BDA [Nakazato, Dagli ‘03] Multiple Positive classes Scattered Negative classes

44

Page 45: CBIR

Munehiro Nakazato and Charlie Dagli

positivenegative

Group BDA [Nakazato, Dagli ‘03] Multiple Positive classes Scattered Negative classes

SW = i x∈i(x −mi)(x −mi)T∑∑

SB = (y −mi)(y −mi)T

y∈negative∑i∑miLmean of positive class i

RF as (x+y)-Class Problem

45

Page 46: CBIR

Munehiro Nakazato and Charlie Dagli

Basic Components of CBIR Feature Extractor

Create the metadata Query Engine

Calculate similarity User Interface

46

Page 47: CBIR

Munehiro Nakazato and Charlie Dagli

User Interface and Visualization

Basic GUI Direct Manipulation GUI

El Nino [UC San Diego] Image Grouper [Nakazato and Huang]

3D Virtual Reality Display

47

Page 48: CBIR

Munehiro Nakazato and Charlie Dagli

Traditional GUI for Relevance Feedback User selects

relevant images If good images

are found, add them

When no more images to add, the search converges

Slider or Checkbox

48

Page 49: CBIR

Munehiro Nakazato and Charlie Dagli

ImageGrouper [Nakazato and Huang]

Query by Groups Make a query by creating groups of images Easier to try different combinations of

query sets (trial-and-Error Query)

49

Page 50: CBIR

Munehiro Nakazato and Charlie Dagli

ImageGrouper

Pallete PanelResult View

50

Page 51: CBIR

Munehiro Nakazato and Charlie Dagli

Note Trial-and-Error Query is very important

because Image similarity is subjective and context-

dependent. In addition, we are using low-level image features.

(semantic gap) Thus, it is VERY difficult to express the user’s

concept by these features.

51

Page 52: CBIR

Munehiro Nakazato and Charlie Dagli

Image Retrieval in 3D

Image retrieval and browsing in 3D Virtual Reality

The user can see more images without occlusion

Query results can be displayed in various criteria Results by Color features, by texture, by

combination of color and texture

52

Page 53: CBIR

Munehiro Nakazato and Charlie Dagli

3D MARS

Structure

color

Texture

Initial DisplayResult

53

Page 54: CBIR

Munehiro Nakazato and Charlie Dagli

3D MARS in CAVE™

Shuttered glasses for immersive 3D experience

Click and Drag images by WAND

Fly-through by Joystick

54

Page 55: CBIR

Munehiro Nakazato and Charlie Dagli

Demos Traditional GUI

IBM QBIC• http://wwwqbic.almaden.ibm.com/

UIUC MARS• http://chopin.ifp.uiuc.edu:8080

ImageGrouper http://www.ifp.uiuc.edu/~nakazato/grouper

55

Page 56: CBIR

Munehiro Nakazato and Charlie Dagli

References (Image Features) Bober, M., “MPEG-7 Visual Descriptors,” In IEEE Transactions on Circuits and

Systems for Video Technology, Vol. 11, No. 6, June 2001. Stricker, M. and Orengo, M., “Similarity of Color Images,” In Proceedings of SPIE,

Vol. 2420 (Storage and Retrieval of Image and Video Databases III), SPIE Press, Feb. 1995.

Zhou, X. S. and Huang, T. S., “Edge-based structural feature for content-base image retrieval,” Pattern Recognition Letters, Special issue on Image and Video Indexing, 2000.

Smith, J. R. and Chang S-F. Transform features for texture classification and discrimination in large image databases. In Proceedings of IEEE Intl. Conf. on Image Processing, 1994.

Smith J. R. and Chang S-F. “Quad-Tree Segmentation for Texture-based Image Query.” In Proceedings of ACM 2nd International Conference on Multimedia, 1994.

Dagli, C. K. and Huang, T.S., “A Framework for Color Grid-Based Image Retrieval,” In Proceedings of International Conference on Pattern Recognition, 2004.

Tian, Q. et. al. “Combine user defined region-of-interest and spatial layout in image retrieval,” in IEEE Intl. Conf. on Image Processing, 2000.

Moghaddam B. et. al. “Defining image content with multiple regions-of-interest,” in IEEE Wrkshp on Content-Based Access of Image and Video Libraries, 1999.

56

Page 57: CBIR

Munehiro Nakazato and Charlie Dagli

References (Relevance Feedback)

Rui, Y., et al., “Relevance Feedback: A Power Tool for Interactive Content-Based Image Retrieval,” In IEEE Trans. on Circuits and Video Technology, Vol.8, No.5, Sept. 1998

Zhou, X. S., Petrovic, N. and Huang, T. S. “Comparing Discriminating Transformations and SVM for Learning during Multimedia Retrieval.” In Proceedings of ACM Multimedia ‘01, 2001.

Ishikawa, Y., Subrammanya, R. and Faloutsos, C., “MindReader: Query database through multiple examples,” In Proceedings of the 24th VLDB Conference, 1998.

57

Page 58: CBIR

Munehiro Nakazato and Charlie Dagli

References (User Interfaces and Visualizations)

Nakazato, M. and Huang, T. S. “3D MARS: Immersive Virtual Reality for Content-Based Image Retrieval.“ In Proceedings of 2001 IEEE International Conference on Multimedia and Expo (ICME2001), Tokyo, August 22-25, 2001

Nakazato, M., Manola, L. and Huang, T.S., “ImageGrouper: Search, Annotate and Organize Images by Groups,” In Proc. of 5th Intl. Conf. On Visual Information Systems (VIS’02), 2002.

Nakazato, M., Dagli C.K., and Huang T.S., “Evaluating Group-Based Relevance Feedback for Content-Based Image Retrieval,” In Proceedings of International Conference on Image Processing, 2003.

Santini, S. and Jain, R., “Integrated Browsing and Querying for Image Database,” IEEE Multimedia, Vol. 7, No. 3, 2000, page 26-39.

58

Page 59: CBIR

Munehiro Nakazato and Charlie Dagli

Similar Region Shape, Different Contour

59