PDA

View Full Version : Pattern Recognition for Rugs


Paul McGhee
April 12th, 2019, 11:11 AM
I live in Cambridge (UK) where a significant percentage of the population are mathematicians and software developers, many of them obsessed with what they call “pattern recognition”. Showing a computer how to look for patterns in large collections of data usually involves showing it a “training” data set – a lot of known examples of something which it "learns" to recognise – then letting it loose on a random data set and asking what it thinks about a new item.

I’m not a mathematician or a software developer, but my neighbours are, so chatting to them got me thinking. If you wanted to teach a computer to identify where a particular rug comes from, just from a digital image, (so no info about knotting, handle and so forth) how would you do it? And has anyone already done it? My mind seems to work like this:

1) My first impressions of a new rug are always of the overall colour balance – Baluchis will mostly be in four basic gloomy colours, Kazaks will mostly be bright and cheery, Nain’s will mostly be very light.

2) Then I look at the overall shape or aspect ratio. Is it rectangular? Is the rectangle long and thin or fat and stubby? Is it squarish? Then it’s probably a bag or a sofreh.

3) Then I look at the layout. The relationship between the borders and the field seems to be a key factor here, then the contents of the field. Are there medallions? All-over patterns? Niches which suggest prayer rug?

4) At some stage I might spot a distinctive pattern or colour which is a strong indicator of a singular origin, like some Gendge stripes a Seistani green.

5) I could then, like a well-trained computer, say “this rug probably comes from here but I’m not sure”.

I’d be interested to know how other people recognise rugs. I’m sure it would be relatively easy for a computer to distinguish generic colour palettes and to look out for distinctive spikes of a particular hue. It could measure overall aspect ratios and, with a bit more effort, work out what was a border and what was a field. Other stuff might be harder.

As soon as you start thinking about pattern recognition in rugs, you realise that it is a non-trivial problem. For a start, a large percentage of pictures of rugs on the Internet are trapezoidal and you might need to transform them into rectangles before you start doing anything else. They come in various degrees of fuzziness and there aren’t that many really high-definition images. etc. etc.

Then you think about the big data sets. Much of the classification meta-data you might use would be questionable. No-one would set up a field where “Bokhara” was a definition any more, but what about Anatolian or Baluch? Would there need to be standard terms agreed between experts?

Then you think “Would it be good if there was an app that you could feed an image into and get a definitive judgement from an expert system or is it more fun to post it on Turkotek and get human responses?”

I have a feeling that rug recognition is one area where human experts will still have the edge on computers for quite a while. Any thoughts?

Paul

Filiberto Boncompagni2
April 12th, 2019, 05:20 PM
Hi Paul,

:felix:

Hmmm… Considering that nowadays computers are capable of facial recognition, it shouldn’t be too difficult to use the same kind of approach to develop a program (I still call them programs like in the old good times, NOT applications as it became fashionable in this bloody smartphone era) to do what you propose.
a large percentage of pictures of rugs on the Internet are trapezoidal and you might need to transform them into rectangles before you start doing anything else
Faces are three-dimensional, so a trapezoidal rug shouldn’t be a problem.

First, one should prepare a good database and feed it to the machine for the 'training'…

The accuracy of the result will be, of course limited by the visual-only approach: as you observe, the "info about knotting, handle and so forth" will be missing.
But, with more database feed about pictures of the back and details of knots and so on, the program should be able to interact with the user in the same way we do here and give a probability result.

We could put the program on Turkotek and then we could all retire... :nerd2:

Ian Strange
February 12th, 2020, 06:48 PM
Paul
I wonder if there's an algorithm for "The Shahsevan sometimes migrated as far as Kazak, so bear that in mind, computerface".
Ian