36
Image and Video Filtering on Internet Networks Airlangga Cahya Utama 7406.040.006

Image and Video Filtering on Internet Networks

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Image and Video Filtering on Internet Networks

Image and Video Filtering on Internet Networks

Airlangga Cahya Utama7406.040.006

Page 2: Image and Video Filtering on Internet Networks

Background

! Internet as a big source of information

! Not all information is safe to consume

" Example: war, sex, and drugs

! Porn is one of internet problem

! Filter using text based or domain based is difficult to maintain

! SOLUTION: Image or video based filtering

Page 3: Image and Video Filtering on Internet Networks

References! Matthew Turk, Alex Pentland, Eigenfaces for

Recognition, 1991

! Muhammad Fatoni Ashariyanto, Rudy Cahyadi Hario Pribadi, Dadet Pramadihanto, Sistem Seleksi Gambar Khusus Dewasa Melalui Web Proxy Menggunakan Image Processing, 2007

Page 4: Image and Video Filtering on Internet Networks

Capture Packet

! We can capture packed on computer used to access internet (gateway / hop).

" Transport layer

! nCap, pktd, libpcap

" Application layer

! Proxy (icap protocol)

Page 5: Image and Video Filtering on Internet Networks

Transport Layer

! Pro

" Fast

" Didn't need another daemon running

! Cons

" Complicated

" Parsing tcp/ip packet manually

" Combine tcp/ip packet manually, and maintain connection state

Page 6: Image and Video Filtering on Internet Networks

Application Layer - ICAP

! Pro

" Simple (based on HTTP)

" Only need to implement ICAP parser

" Can leverage proxy cache capabilities

! Cons

" A bit slow (request is redirected to proxy, more hops)

" Requirement to run proxy daemon

Page 7: Image and Video Filtering on Internet Networks

ICAP

! Internet Content Adaptation Protocol (RFC 3507).

! Protocol build to support content adaptation on web-proxy.

! Based and using HTTP format.

! Usage: Virus detection, HTML to WML converter, Content optimizer (image size/text compression), Porn Detection

Page 8: Image and Video Filtering on Internet Networks

Squid - ICAP Support

! Squid 3 have built-in ICAP support.

! Squid 3 is already reach mature/stable release

! Squid 2 must be hacked to support ICAP

Page 9: Image and Video Filtering on Internet Networks

ICAP Data Example! RESPMOD icap://127.0.0.1:10000/ ICAP/1.0

! Host: 127.0.0.1:10000

! Encapsulated: req-hdr=0, res-hdr=386, res-body=633

! Allow: 204

! GET http://127.0.0.1/logoITS.jpg HTTP/1.1

! Host: 127.0.0.1

! User-Agent: Mozilla/5.0 Gecko/20100611 Firefox/3.6.4

! HTTP/1.1 200 OK

! ???JFIFHHC??(1#%(:3=<9387@H\N@DWE78PmQ

Page 10: Image and Video Filtering on Internet Networks

System Overview

Page 11: Image and Video Filtering on Internet Networks

ICAP data from Proxy

Page 12: Image and Video Filtering on Internet Networks

Image Detection

Page 13: Image and Video Filtering on Internet Networks

Image Format Detection

! Parse header data (xx first byte data) from ‘intercepted’ content.

! Why?

" Some server provide dynamic content and tell browser via MIME HTTP Header.

! Example: file image but extension type php

" MIME content can’t be trusted either

! Example: downloadable content

Page 14: Image and Video Filtering on Internet Networks

Image Header Example

! PNG File

" 89 50 4E 47 0D 0A 1A 0A – PNG Header

! JPEG File

" FFD8 – Start of image marker

" And followed by another marker such as FFE0, FFDB, FFC4, etc…

Page 15: Image and Video Filtering on Internet Networks

Skin Filtering - Peer Model

Requirement:

R>95 && G>40 && B>20 && (max(R,G,B)-min(R,G,B))>15 && abs(R-G)>15

R>G && R>B && G>BR<(G+150) && R<(B+150) && G<(B+150)

Page 16: Image and Video Filtering on Internet Networks

Result Example of Skin Filtering

Page 17: Image and Video Filtering on Internet Networks

Method Used to Detect Object

! Haar Wavelet

" Rainer Lienhart, Alexander Kuranov, Vadim Pisarevsky

! Eigenfaces

" Matthew Turk, Alex Pentland

Page 18: Image and Video Filtering on Internet Networks

Object Detection Haar Wavelet

Page 19: Image and Video Filtering on Internet Networks

Haar Wavelet

Page 20: Image and Video Filtering on Internet Networks

Eigenfaces – Training Algorithm! Concate Images

! Find mean

! Find image mean

! Build A from image mean

! Find matrix covariant C

! Find eigenvector from C

! Keep some eigenvector with the highest eigenvalue

Page 21: Image and Video Filtering on Internet Networks

Eigenfaces – Training Data

Page 22: Image and Video Filtering on Internet Networks

Eigenfaces – Compare Algorithm! Find weight, from

calculation with eigenvector.

! Projection image to facespaces.

! Measure distance between image and facespaces.

! Compare distance and threshold

Page 23: Image and Video Filtering on Internet Networks

Scanning Method

! Take a 64x64 slice from image

! Compare it

! Move to the next slice

! If all slice checked, resize image to smaller one with nearest neighborhood method

! Move distance is 24 pixel, scale down is 15% ratio.

Page 24: Image and Video Filtering on Internet Networks

Responding to Proxy

Page 25: Image and Video Filtering on Internet Networks

Networking Result

Page 26: Image and Video Filtering on Internet Networks

Networking Result

Page 27: Image and Video Filtering on Internet Networks

Result (Detected - Change Image)

Page 28: Image and Video Filtering on Internet Networks

Result (Not Detected)

Page 29: Image and Video Filtering on Internet Networks

Result (Detected and Not-Detected)

Page 30: Image and Video Filtering on Internet Networks

Object Detection

Page 31: Image and Video Filtering on Internet Networks

Testing

! 200 positive image

" Variation of size

" Variation or colour skin

" All frontal and contain breast object

! 410 negative image

" Variation of size

" Variation of image object

! page banner, thumbnail, and people

Page 32: Image and Video Filtering on Internet Networks

Detection Rate

Page 33: Image and Video Filtering on Internet Networks

Detection Rate

Page 34: Image and Video Filtering on Internet Networks

Performance

Page 35: Image and Video Filtering on Internet Networks

Conclusion

! ICAP filtering method is proved working corectly.

! Eigenfaces speed is comparable to Haar Wavelet.

! Eigenfaces detection is worse than Haar.

! Buffering technique is working only for non-streaming website.

Page 36: Image and Video Filtering on Internet Networks

Image and Video Filtering on Internet Networks

END