Saturday, September 06, 2008

CEP and Shoplifting

Yesterday, I decided to drive the long way for a lunch with an ex-colleague of mine from Morgan Stanley. The local NPR public radio station (WNYC) has replaced the heavy metal station (WSOU) as my primary station in my car (sigh ... the joys of getting older ...), and I caught the last part of the Leonard Lopate show, a very popular news-talk show in New York.

Leonard was interviewing John Colapinto, who had written an article for The New Yorker on loss prevention in stores ... commonly known as shoplifting.

What was fascinating was that, as John was talking about how store detectives monitor customer patterns for shoplifting, it seemed like the perfect thing for Complex Event Processing (I hope that Tim will agree that this is truly Complex).

Now, I am sure that this is not news to the CEP vendors out there. Fraud detection and surveillance is one of the big applications of CEP. But, after each detection pattern Colapinto described, I said to myself "How would we do this in Coral8?".

Some of the patterns Colapinto mentioned included:

1) Customers examining clothing without looking at the price tag.

2) Customers moving randomly from table to table. There seems to be a certain pattern of movement that is common amongst shoplifters.

In the "Shoplifter Alert System" that we would build, there would be multiple levels of complex events (Tim can correct me on the proper terminology to use) :

Level 1 Event
"This person is a shoplifter"

Level 2 Events
"This person is moving too randomly through the store"
"This person does not seem interested in the price"

Level 3 Events
The amount of time a person is spending at each "table" in the store
The amount of time a person handles each garment
A sensor on the price tag to indicate whether the person has looked at the price

Level 4 Events
A person has entered the store
A person has left the store
A person is moving through the store

I would love to hear any anecdotes about how CEP is actually being used in detecting shoplifting, so if you know of anything, please comment.


©2008 Marc Adler - All Rights Reserved.
All opinions here are personal, and have no relation to my employer.

4 comments:

Anonymous said...

Hi Marc,

Excellent topic. Kindly find my follow-up, as requested, here:

Modelling Shoplifting

http://www.thecepblog.com/2008/09/07/modelling-shoplifting/

Yours sincerely, Tim

marc said...

Here is a "60 Minutes" news story on gangs of South American shoplifters:

http://www.cbsnews.com/stories/2004/02/20/60minutes/main601396.shtml

Opher Etzion said...

Hello Marc.

This application can be modelled easily as an "event processing network", and its processing is relatively simple. The main difficulty will be to obtain the raw events needed for processing. Some of it can be done by putting RFID tags on each products, and RFID reader on shelves, shopping carts, checkouts and external door, there are plenty of derived events that can be derived from that, e.g. an item (with cost > X) has been removed from the shelf, and did not reach any checkout within 90 minutes, or an item reached a door and did not go through a chackout cash -- then it should ring (this what mainly exists today).

The more interesting stuff about person's behavior (looking more than T seconds on an expensive product, not looking at price tag...) can be obtained from the analysis of camera's input. I have blogged in the past about getting event from multi-media streams as one of the promising directions; There are systems today that take cameras' input and analyze them to create events (e.g. in automatic toll roads, a camera input shows that a vehicle with a certain plate has moved in the toll area, and this is produced as an event). I think that there is a big promise in advancing such technologies, but today event extraction is restricted to point event like - a person approached the shelf, but not spatio-temporal patterns like - a person stands six minutes watching an item. I know of research projects that are getting closer to this direction.

cheers,

Opher

Anonymous said...

Compare their shoes with the garments they are handling. People with cheap shoes handling expensive garments are a dead give away, people with expensive shoes usually don't need to shoplift (unless you are in LA and are looking to scoop the local insane drugged out celebs).

Sometimes it pays not to overthink (then again, is CEP really trying to sell results? :-)

c.