pattern recognition with n-tuple systems simon lucas computer science dept essex university
TRANSCRIPT
![Page 1: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/1.jpg)
Pattern Recognitionwith
N-Tuple SystemsSimon Lucas
Computer Science Dept
Essex University
![Page 2: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/2.jpg)
Overview
• Standard Binary n-tuple
• Dealing with grey-levels– Continuous n-tuple– Bit-plane decomposition
• Dealing with sequences– Scanning N-Tuple
• Future Directions
![Page 3: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/3.jpg)
N-Tuple Systems
• Bledsoe + Browning (late fifties)• Sample a pattern at m sets of n-points per set• Use each sample set to represent a memory
address• Have an n-tuple “bank” for each pattern class• Simple training:
– Note address occurrences for each class
![Page 4: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/4.jpg)
What to store
• Various options– 1-bit: address occurred or not– Freq – weighted: count number of occurs– Prob. – use count to estimate probability
• 1-bit version saturates
• Usually better to use probabilistic version (ML estimate)
![Page 5: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/5.jpg)
N-Tuple Architecture
![Page 6: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/6.jpg)
Standard N-Tuple Features
• Superfast training– As fast as you can read the data in!
• Superfast recognition (ditto)
• Simple
• Applicable to binary images
![Page 7: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/7.jpg)
Grey-level
![Page 8: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/8.jpg)
Threshold?
![Page 9: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/9.jpg)
Niblack?
![Page 10: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/10.jpg)
Beavis?
![Page 11: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/11.jpg)
Continuous N-Tuple
• Samples grey-level image directly• Pre-compiles samples into LUTs• Fills LUT entries with ABS distance to closest
sampled point• Recognition speed not compromised• BUT: slower to train• Memory problems…• Not probabilistic
– Sensitive to spurious training data!
![Page 12: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/12.jpg)
Continuous N-Tuple Results
![Page 13: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/13.jpg)
Bit-Plane Decomposition
• Alternative to continuous n-tuple
• Uses a combination of binary n-tuple classifiers
• One for each bit-plane (so 8 for 256-grey level)
• Good results reported
• Speed sacrifice
![Page 14: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/14.jpg)
Scanning N-Tuple Classifier(SNT)
• Introduced in 1995 (Lucas, Lucas + Amiri)
• Since investigated by other research groups (IBM, Kaist, Kent, Athens)
• In a recent study was one of the best classifiers on UNIPEN dataset
• Simple modification of n-gram model• An n-gram with gaps!!!
![Page 16: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/16.jpg)
Scanning N-Tuple
0 2 3 2
•Chain code image
•Scan sampler along chain code
•Estimate weights of address occurrences
•Classify by summing weights for each class
•Softmax function -> posterior probability
•Train
•DEMO!
![Page 17: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/17.jpg)
Recent Work
• Extensive evaluation (IBM)• Directional + bit-plane decomposition
(Kent) (smaller tables)• Mixture models for table compression
(IBM, KAIST)• Clustering (Athens)• Discriminative Training (Essex)
– Better accuracy (why????)
![Page 18: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/18.jpg)
Terminology
• m – frequency count
• l – log likelihood weights
• a – class activation vector
• y – output vector (posterior prob.)
• t – target vector
![Page 19: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/19.jpg)
Likelihood Score for Class k given Sequence s
![Page 20: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/20.jpg)
Softmax Function
• Interpret as posterior probability y_k
![Page 21: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/21.jpg)
Maximum Likelihood Est.
![Page 22: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/22.jpg)
Discriminative Training
• Maximise probability of correct classification
• Minimise cross-entropy
![Page 23: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/23.jpg)
Cross Entropy Error Term
![Page 24: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/24.jpg)
Weight Update RuleIf k = true class
Apply weight updates
![Page 25: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/25.jpg)
Cross-Entropy v. ML
![Page 26: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/26.jpg)
Design Process
![Page 27: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/27.jpg)
MNIST Results
![Page 28: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/28.jpg)
Future Work
• Improve accuracy further– Mixture Models– Training data deformation models
• Better understanding of discrim v. ML
• Sparse (e.g. trie) SNT
• Optimal (all) threshold version for colour / grey-level images
![Page 29: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/29.jpg)
Why Mixture?To tell A from B !!!A
010111000101001
010110100010101
0101010001011
10100101010101
010101010001011
01010101001010101
B
1111011101111101
00010001000001000
00001000100010001
11110111111011111
….
![Page 30: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/30.jpg)
Why Opti-Thresh?
![Page 31: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/31.jpg)
Global Mean Threshold
![Page 32: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/32.jpg)
Optimally Thresholded Image
![Page 33: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/33.jpg)
Conclusions
• N-Tuple classifiers – fantastic speed
• High degree of design skill needed to make them work well
• Compete with much more complex systems
• Interesting future work to be done!
![Page 34: Pattern Recognition with N-Tuple Systems Simon Lucas Computer Science Dept Essex University](https://reader036.vdocuments.site/reader036/viewer/2022062408/56649f205503460f94c389c0/html5/thumbnails/34.jpg)
Further Reading
• Continuous n-tuple– Simon M. Lucas , Face recognition with the continuous n-tuple
classifier, Proceedings of the British Machine Vision Conference (1997) , pages: 222 -- 231 [pdf]
• Scanning n-tuple– Simon M. Lucas and A. Amiri,, Statistical syntactic Methods for high
performance OCR, IEE Proceedings on Vision, Image and Signal Processing (1996) , v. 143, pages: 23 -- 30 [pdf]
– Simon M. Lucas , Discriminative Training of the Scanning N-Tuple Classifier, International Workshop on Artificial Neural Networks (2003) , pages: 222 -- 229 [pdf] (draft)
• Plus many more references in those papers• Search Google for n-tuple and also for scanning n-
tuple